支付方式问题
This commit is contained in:
@@ -2,8 +2,10 @@ package com.czg.controller.pay;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.core.util.URLUtil;
|
||||
import com.czg.PayCst;
|
||||
import com.czg.annotation.Debounce;
|
||||
import com.czg.constants.ParamCodeCst;
|
||||
import com.czg.exception.CzgException;
|
||||
import com.czg.market.service.OrderInfoService;
|
||||
import com.czg.order.dto.CheckOrderPay;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
@@ -175,6 +177,13 @@ public class OrderPayController {
|
||||
@PostMapping("/shopPayApi/js2Pay")
|
||||
@Debounce(value = "#payParam.checkOrderPay.orderId")
|
||||
public CzgResult<Map<String, Object>> js2PayOrder(HttpServletRequest request, @RequestBody OrderPayParamDTO payParam) {
|
||||
if ("alipay".equals(payParam.getPayType())) {
|
||||
payParam.setPayType(PayCst.Type.ALIPAY);
|
||||
} else if ("wechatPay".equals(payParam.getPayType())) {
|
||||
payParam.setPayType(PayCst.Type.WECHAT);
|
||||
} else {
|
||||
throw new CzgException(payParam.getPayType() + "支付方式错误");
|
||||
}
|
||||
return orderPayService.js2PayOrder(ServletUtil.getClientIP(request), payParam);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user