Merge branch 'tkk' into test

This commit is contained in:
Tankaikai
2024-09-26 17:24:06 +08:00
4 changed files with 110 additions and 33 deletions

View File

@@ -1,6 +1,7 @@
package com.chaozhanggui.system.cashierservice.controller;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.chaozhanggui.system.cashierservice.annotation.LimitSubmit;
import com.chaozhanggui.system.cashierservice.service.PayService;
import com.chaozhanggui.system.cashierservice.sign.Result;
@@ -40,8 +41,17 @@ public class PayController {
return Result.fail("订单号不允许为空");
}
if (!map.containsKey("payType")) {
return Result.fail("支付类型不允许为空");
}
String payType = map.get("payType");
if (StrUtil.isEmpty(payType)) {
return Result.fail("支付类型不允许为空");
}
try {
return payService.payOrder(openId, map.get("orderId"), IpUtil.getIpAddr(request));
return payService.payOrderTest(openId, map.get("orderId"), payType, IpUtil.getIpAddr(request));
} catch (Exception e) {
e.printStackTrace();
}