|
@@ -2,6 +2,7 @@ package com.rongwei.zhsw.system.controller.weChat;
|
|
|
|
|
|
import com.rongwe.zhsw.system.vo.PaymentRocordVo;
|
|
import com.rongwe.zhsw.system.vo.PaymentRocordVo;
|
|
import com.rongwei.rwcommon.base.R;
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
|
+import com.rongwei.zhsw.system.utils.WxApi;
|
|
import com.rongwei.zhsw.system.wechat.PaymentRecordService;
|
|
import com.rongwei.zhsw.system.wechat.PaymentRecordService;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.slf4j.LoggerFactory;
|
|
@@ -10,6 +11,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+import java.util.UUID;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
@RestController
|
|
@RestController
|
|
@RequestMapping("/wechat/payment")
|
|
@RequestMapping("/wechat/payment")
|
|
@@ -23,4 +27,11 @@ public class PayMentController {
|
|
private R info(@RequestBody PaymentRocordVo payMentRocordVo) {
|
|
private R info(@RequestBody PaymentRocordVo payMentRocordVo) {
|
|
return paymentRecordService.getPaymentRecordList(payMentRocordVo);
|
|
return paymentRecordService.getPaymentRecordList(payMentRocordVo);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("/getSign")
|
|
|
|
+ public R getSign(@RequestBody Map<String, String> map) {
|
|
|
|
+ WxApi wxApi = new WxApi();
|
|
|
|
+ wxApi.initMerchant();
|
|
|
|
+ return R.ok(wxApi.prepayWithRequestPayment());
|
|
|
|
+ }
|
|
}
|
|
}
|