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);
}
/**
* 收到交易记录 处理订单
* @param data
*/
private void processOrder(TransactionRecordsData data) {
String transactionCode = data.getTransactionCode();
// 根据交易流水号查询订单信息

View File

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