|
@@ -5,17 +5,12 @@ import com.rongwe.zhsw.system.vo.PaymentRocordVo;
|
|
|
import com.rongwe.zhsw.system.vo.PrepayNoticeVo;
|
|
|
import com.rongwe.zhsw.system.vo.WxPrepayOrderVo;
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
-import com.rongwei.zhsw.system.utils.WxPayApi;
|
|
|
import com.rongwei.zhsw.system.wechat.PaymentRecordService;
|
|
|
import com.rongwei.zhsw.system.wechat.impl.PayMentServiceImpl;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
-import java.util.UUID;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
@RestController
|
|
|
@RequestMapping("/wechat/payment")
|
|
@@ -34,6 +29,7 @@ public class PayMentController {
|
|
|
|
|
|
/**
|
|
|
* 生成缴费记录
|
|
|
+ *
|
|
|
* @param createPaymentRecordVo
|
|
|
* @return
|
|
|
*/
|
|
@@ -41,23 +37,26 @@ public class PayMentController {
|
|
|
private R createRecord(@RequestBody CreatePaymentRecordVo createPaymentRecordVo) {
|
|
|
return paymentRecordService.createRecord(createPaymentRecordVo);
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* 预下单
|
|
|
+ *
|
|
|
* @param vo
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/prepayOrder")
|
|
|
public R prepayOrder(@RequestBody WxPrepayOrderVo vo) {
|
|
|
- return payMentService.paymentInitiation(vo);
|
|
|
+ return payMentService.paymentInitiation(vo);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 微信支付成功回调函数
|
|
|
+ *
|
|
|
* @param prepayNoticeVo
|
|
|
* @return
|
|
|
*/
|
|
|
- @PostMapping("/prepay/notice")
|
|
|
- public R prepayNotice(@RequestBody PrepayNoticeVo prepayNoticeVo) {
|
|
|
- return payMentService.prepayNotice(prepayNoticeVo);
|
|
|
+ @PostMapping("/prepay/notice/{dskey}")
|
|
|
+ public R prepayNotice(@RequestBody PrepayNoticeVo prepayNoticeVo, @PathVariable("dskey") String dskey) {
|
|
|
+ return payMentService.prepayNotice(prepayNoticeVo, dskey);
|
|
|
}
|
|
|
}
|