|
@@ -1,14 +1,9 @@
|
|
|
package com.qs.mp.pay.service.impl;
|
|
|
|
|
|
-import cn.hutool.json.JSON;
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.qs.mp.channel.service.IChannelOrderService;
|
|
|
import com.qs.mp.common.enums.BizTypeEnum;
|
|
|
import com.qs.mp.common.enums.MqTopicType;
|
|
|
-import com.qs.mp.common.enums.PayOrderStatusEnum;
|
|
|
import com.qs.mp.common.exception.ServiceException;
|
|
|
import com.qs.mp.common.pulsar.PulsarClientService;
|
|
|
import com.qs.mp.common.utils.DateUtils;
|
|
@@ -21,15 +16,12 @@ import com.qs.mp.pay.service.IWalletService;
|
|
|
import com.qs.mp.system.service.id.BizIdGenerator;
|
|
|
import com.qs.mp.user.service.IUserDeliverOrderService;
|
|
|
import com.qs.mp.user.service.IUserTicketOrderService;
|
|
|
-import java.util.List;
|
|
|
import org.apache.pulsar.client.api.PulsarClientException;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
-import org.springframework.scheduling.annotation.Async;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
/**
|
|
|
* @auther duota
|
|
@@ -85,7 +77,8 @@ public class WalletServiceImpl implements IWalletService {
|
|
|
private static final String PAY_RESOURCE_TYPE = "1017"; //2:微信小程序
|
|
|
|
|
|
@Override
|
|
|
- public JSONObject pay(BizTypeEnum bizType, String bizId, String openId, int money) {
|
|
|
+ public JSONObject pay(BizTypeEnum bizType, String bizId, String openId, int money,
|
|
|
+ String orderRemark) {
|
|
|
String reqUrl = baseUrl + "/pay/payMoneyCTB";
|
|
|
String appId = channelAppId;
|
|
|
String payShopNo = channelPayShopNo;
|
|
@@ -95,7 +88,7 @@ public class WalletServiceImpl implements IWalletService {
|
|
|
payShopNo = userPayShopNo;
|
|
|
paySign = userPaySign;
|
|
|
}
|
|
|
- JSONObject params = buildPayOrderReqData(payShopNo, paySign, money, openId, appId);
|
|
|
+ JSONObject params = buildPayOrderReqData(payShopNo, paySign, money, openId, appId, orderRemark);
|
|
|
String result = OkHttpUtil.postJsonParams(reqUrl, params.toJSONString());
|
|
|
logger.info("request params:" + params.toJSONString() + " result:" + result);
|
|
|
if (StringUtils.isBlank(result)) {
|
|
@@ -229,7 +222,7 @@ public class WalletServiceImpl implements IWalletService {
|
|
|
return payOrder;
|
|
|
}
|
|
|
|
|
|
- private JSONObject buildPayOrderReqData(String shopNo, String sign, int money, String openId, String appId) {
|
|
|
+ private JSONObject buildPayOrderReqData(String shopNo, String sign, int money, String openId, String appId, String orderRemark) {
|
|
|
|
|
|
JSONObject sendData = new JSONObject();
|
|
|
sendData.put("shop_no" , shopNo);
|
|
@@ -238,7 +231,7 @@ public class WalletServiceImpl implements IWalletService {
|
|
|
sendData.put("pay_resource" , PAY_RESOURCE); //支付来源 1:支付宝 2:微信支付 5:云闪付
|
|
|
sendData.put("trans_type_code" , PAY_RESOURCE_TYPE); //1017:微信小程序
|
|
|
sendData.put("transaction_amount" , money);
|
|
|
- sendData.put("order_remark" , "");
|
|
|
+ sendData.put("order_remark" , orderRemark);
|
|
|
sendData.put("timestamp" , System.currentTimeMillis());
|
|
|
sendData.put("callback_url" , callbackUrl);
|
|
|
|