Merge branch 'prod' into test

This commit is contained in:
2026-01-20 14:49:54 +08:00
30 changed files with 128 additions and 109 deletions

View File

@@ -68,7 +68,7 @@ public class NotifyController {
*/
@RequestMapping("/native/pay/{platform}")
public String pay(@PathVariable String platform, @RequestBody JSONObject json) {
if (PayCst.Platform.WECHAT.equalsIgnoreCase(platform)) {
if (PayCst.Type.WECHAT.equalsIgnoreCase(platform)) {
// 微信
WechatNotifyReqDto reqDto = JSONObject.parseObject(json.toJSONString(), WechatNotifyReqDto.class);
log.info("【微信支付回调】收到微信支付回调 data: {}", JSONObject.toJSONString(reqDto));
@@ -80,7 +80,7 @@ public class NotifyController {
PayNotifyRespDTO respDTO = dataDto.convertToPayNotifyRespDTO();
orderInfoCustomService.payCallBackOrder(respDTO.getMchOrderNo(), respDTO, PayChannelCst.NATIVE, 0);
return "success";
} else if (PayCst.Platform.ALIPAY.equalsIgnoreCase(platform)) {
} else if (PayCst.Type.ALIPAY.equalsIgnoreCase(platform)) {
// 支付宝
return "success";
}
@@ -92,7 +92,7 @@ public class NotifyController {
*/
@RequestMapping("/native/refund/{platform}")
public String refund(@PathVariable String platform, @RequestBody JSONObject json) {
if (PayCst.Platform.WECHAT.equalsIgnoreCase(platform)) {
if (PayCst.Type.WECHAT.equalsIgnoreCase(platform)) {
// 微信
WechatNotifyReqDto reqDto = JSONObject.parseObject(json.toJSONString(), WechatNotifyReqDto.class);
log.info("【微信退款回调】收到微信退款回调 data: {}", JSONObject.toJSONString(reqDto));
@@ -100,7 +100,7 @@ public class NotifyController {
log.info("【微信退款回调】解密数据 {}", decrypted);
return "success";
} else if (PayCst.Platform.ALIPAY.equalsIgnoreCase(platform)) {
} else if (PayCst.Type.ALIPAY.equalsIgnoreCase(platform)) {
// 支付宝
return "success";
}

View File

@@ -30,7 +30,7 @@ public class DistributionPayController {
/**
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/ltPayOrder")
@@ -42,7 +42,7 @@ public class DistributionPayController {
/**
* 运营端小程序余额充值
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
*/
@PostMapping("/mchRecharge")
@Debounce(value = "#payParam.userId")

View File

@@ -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;
@@ -59,7 +61,7 @@ public class OrderPayController {
/**
* 充值并付款
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/rechargePayOrder")
@@ -99,7 +101,7 @@ public class OrderPayController {
/**
* js支付
* <p>
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/jsPay")
@@ -111,7 +113,7 @@ public class OrderPayController {
/**
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/ltPayOrder")
@@ -167,13 +169,21 @@ public class OrderPayController {
}
/**
* payType 必填 支付方式aliPay 支付宝wechatPay 微信
* 空订单支付/h5页面支付
* payType 必填 支付方式ALIPAY 支付宝WECHAT 微信
* openId 必填
* checkOrderPay.orderAmount 必填
*/
@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);
}

View File

@@ -53,7 +53,7 @@ public class VipPayController {
/**
* js支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/jsPayVip")
@@ -66,7 +66,7 @@ public class VipPayController {
/**
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/ltPayVip")
@@ -139,6 +139,7 @@ public class VipPayController {
}
/**
* 会员退款
* cashRefund 是否是现金退款
* 会员退款(先调用 退款前置接口 refundVipBefore)
* 最大退款金额为 充值金额 inAmount

View File

@@ -90,7 +90,7 @@ public class UGbOrderController {
/**
* 生成订单
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/exchange")

View File

@@ -54,7 +54,7 @@ public class UPointGoodsController {
/**
* 生成订单
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/exchange")

View File

@@ -45,7 +45,7 @@ public class UPpOrderController {
/**
* 小程序支付
* payType 必填 支付方式,aliPay 支付宝wechatPay 微信
* payType 必填 支付方式,ALIPAY 支付宝WECHAT 微信
* openId 必填
*/
@PostMapping("/pay")

View File

@@ -62,11 +62,11 @@ public class EntryManagerMqListener {
channel.basicNack(deliveryTag, false, false);
return;
}
Long shopId = Long.valueOf(split[0]);
if (shopId == null) {
if (split[0]==null) {
channel.basicNack(deliveryTag, false, false);
return;
}
Long shopId = Long.valueOf(split[0]);
if (hasMessageId(msg)) {
return;
}
@@ -81,10 +81,10 @@ public class EntryManagerMqListener {
EntryManager.uploadParamImage(entry);
List<String> platform = new ArrayList<>();
if (PayCst.EntryStatus.WAIT.equals(entry.getAlipayStatus())) {
platform.add(PayCst.Platform.ALIPAY);
platform.add(PayCst.Type.ALIPAY);
}
if (PayCst.EntryStatus.WAIT.equals(entry.getWechatStatus())) {
platform.add(PayCst.Platform.WECHAT);
platform.add(PayCst.Type.WECHAT);
}
EntryRespDto resp = EntryManager.entryMerchant(entry, platform.toArray(new String[0]));
ShopDirectMerchant merchant = new ShopDirectMerchant();