支持支付宝获取用户手机号
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user