This commit is contained in:
2023-07-07 15:34:27 +08:00
parent 62a0cfd486
commit 1cd193934a
2 changed files with 20 additions and 17 deletions

View File

@@ -582,6 +582,10 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
return getResult(ykcDataProtocol, concatMsgBody); return getResult(ykcDataProtocol, concatMsgBody);
} }
/**
* 收到交易记录 处理订单
* @param data
*/
private void processOrder(TransactionRecordsData data) { private void processOrder(TransactionRecordsData data) {
String transactionCode = data.getTransactionCode(); String transactionCode = data.getTransactionCode();
// 根据交易流水号查询订单信息 // 根据交易流水号查询订单信息

View File

@@ -1,7 +1,6 @@
package com.jsowell.pile.service.impl; package com.jsowell.pile.service.impl;
import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONArray;
import com.alibaba.fastjson2.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@@ -1868,22 +1867,22 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
refundParams.put("notify_url", ADAPAY_REFUND_CALLBACK_URL); refundParams.put("notify_url", ADAPAY_REFUND_CALLBACK_URL);
// 分账对象信息 // 分账对象信息
OrderBasicInfo orderBasicInfo = getOrderInfoByOrderCode(dto.getOrderCode()); // OrderBasicInfo orderBasicInfo = getOrderInfoByOrderCode(dto.getOrderCode());
if (orderBasicInfo != null) { // if (orderBasicInfo != null) {
String adapayMemberId = adapayMemberAccountService.selectAdapayMemberIdByStationId(orderBasicInfo.getStationId()); // String adapayMemberId = adapayMemberAccountService.selectAdapayMemberIdByStationId(orderBasicInfo.getStationId());
if (StringUtils.isNotBlank(adapayMemberId)) { // if (StringUtils.isNotBlank(adapayMemberId)) {
JSONObject jsonObject = new JSONObject(); // JSONObject jsonObject = new JSONObject();
jsonObject.put("member_id", adapayMemberId); // jsonObject.put("member_id", adapayMemberId);
jsonObject.put("amount", amount); // jsonObject.put("amount", amount);
jsonObject.put("fee_flag", Constants.Y); // jsonObject.put("fee_flag", Constants.Y);
//
// 分账对象信息列表最多仅支持7个分账方json 数组形式 // // 分账对象信息列表最多仅支持7个分账方json 数组形式
JSONArray jsonArray = new JSONArray(); // JSONArray jsonArray = new JSONArray();
jsonArray.add(jsonObject); // jsonArray.add(jsonObject);
// 分账对象信息 // // 分账对象信息
refundParams.put("div_members", jsonArray.toString()); // refundParams.put("div_members", jsonArray.toString());
} // }
} // }
try { try {
Map<String, Object> response = Refund.create(id, refundParams); Map<String, Object> response = Refund.create(id, refundParams);
logger.info("汇付支付创建退款对象:{}", JSON.toJSONString(response)); logger.info("汇付支付创建退款对象:{}", JSON.toJSONString(response));