|
@@ -1,5 +1,6 @@
|
|
|
package com.yonge.cooleshow.admin.controller.open;
|
|
|
|
|
|
+import cn.hutool.extra.servlet.ServletUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.huifu.adapay.core.AdapayCore;
|
|
@@ -94,7 +95,8 @@ public class UserPaymentClient {
|
|
|
|
|
|
@ApiOperation(value = "用户付款", notes = "用户付款")
|
|
|
@PostMapping("/executePayment/v2")
|
|
|
- public R<UserPaymentOrderWrapper.PaymentReq> executePayment(@Validated @RequestBody UserPaymentOrderWrapper.PaymentOrderReqConfig config) {
|
|
|
+ public R<UserPaymentOrderWrapper.PaymentReq> executePayment(@Validated @RequestBody UserPaymentOrderWrapper.PaymentOrderReqConfig config,
|
|
|
+ HttpServletRequest request) {
|
|
|
|
|
|
// 用户登录状态校验
|
|
|
if (StringUtils.isBlank(config.getUserId())) {
|
|
@@ -104,6 +106,11 @@ public class UserPaymentClient {
|
|
|
// 用户下单请求
|
|
|
UserPaymentOrderWrapper.PaymentOrderReqConfig reqConfig = UserPaymentOrderWrapper.PaymentOrderReqConfig.from(config.jsonString());
|
|
|
|
|
|
+ // 支付三方
|
|
|
+ reqConfig.setPaymentVendor(config.getPaymentVendor());
|
|
|
+ // 请示IP地址
|
|
|
+ reqConfig.setIp(ServletUtil.getClientIP(request));
|
|
|
+
|
|
|
JwtUserInfo<Object> userInfo = JwtUserInfo.builder()
|
|
|
.userId(config.getUserId())
|
|
|
.clientType(config.getUserType().getCode())
|