This commit is contained in:
2023-09-26 11:12:54 +08:00
parent 4cc8059355
commit 7897dd6876
9 changed files with 69 additions and 121 deletions

View File

@@ -12,6 +12,7 @@ import com.google.common.collect.Sets;
import com.huifu.adapay.core.AdapayCore;
import com.huifu.adapay.core.util.AdapaySign;
import com.jsowell.adapay.response.PaymentReverseResponse;
import com.jsowell.adapay.vo.PaymentInfo;
import com.jsowell.common.constant.CacheConstants;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
@@ -1007,9 +1008,12 @@ public class OrderService {
memberTransactionRecordService.insertSelective(record);
if (StringUtils.equals(scenarioType, ScenarioEnum.ORDER.getValue())) { // 1-订单支付
JSONObject json = new JSONObject();
json.put("paymentId", paymentId);
json.put("amount", amount);
// JSONObject json = new JSONObject();
// json.put("paymentId", paymentId);
// json.put("amount", amount);
PaymentInfo paymentInfo = new PaymentInfo();
paymentInfo.setPaymentId(paymentId);
paymentInfo.setAmount(amount.toString());
// 记录订单支付流水
OrderPayRecord orderPayRecord = OrderPayRecord.builder()
@@ -1017,7 +1021,7 @@ public class OrderService {
.payMode(OrderPayRecordEnum.WECHATPAY_PAYMENT.getValue())
.payAmount(amount)
.acquirer(AcquirerEnum.ADAPAY.getValue())
.deductionRecord(json.toJSONString())
.deductionRecord(JSON.toJSONString(Lists.newArrayList(paymentInfo)))
.createBy(null)
.delFlag(DelFlagEnum.NORMAL.getValue())
.build();