mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update
This commit is contained in:
@@ -234,7 +234,8 @@ public class TempController extends BaseController {
|
||||
throw new BusinessException("", "查询信息为空");
|
||||
}
|
||||
String appId = pileMerchantInfoService.queryAppIdByMerchantId(merchantId);
|
||||
orderBasicInfoService.doBalancePaymentWithDelay(orderBasicInfo, adapayMemberAccount, appId);
|
||||
// orderBasicInfoService.doBalancePaymentWithDelay(orderBasicInfo, adapayMemberAccount, appId);
|
||||
tempService.doBalancePaymentTemp(orderBasicInfo, adapayMemberAccount, appId);
|
||||
} catch (Exception e) {
|
||||
logger.error("临时接口交易确认接口 error,", e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_WEIXIN_REFUND_ERROR);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -20,6 +20,8 @@ import com.jsowell.pile.dto.QueryOrderDTO;
|
||||
import com.jsowell.pile.dto.SettleOrderReportDTO;
|
||||
import com.jsowell.pile.mapper.OrderBasicInfoMapper;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.service.orderlogic.AbstractOrderLogic;
|
||||
import com.jsowell.pile.service.orderlogic.DelayMerchantOrderLogic;
|
||||
import com.jsowell.pile.transaction.service.TransactionService;
|
||||
import com.jsowell.pile.vo.web.ClearingBillVO;
|
||||
import com.jsowell.pile.vo.web.OrderListVO;
|
||||
@@ -448,4 +450,26 @@ public class TempService {
|
||||
List<MemberAdapayRecord> memberAdapayRecordList = memberAdapayRecordService.selectAdapayRecordList(memberId, ScenarioEnum.BALANCE.getValue());
|
||||
|
||||
}
|
||||
|
||||
public void doBalancePaymentTemp(OrderBasicInfo orderBasicInfo, AdapayMemberAccount adapayMemberAccount, String appId) {
|
||||
String orderCode = orderBasicInfo.getOrderCode();
|
||||
// 查询订单支付记录
|
||||
List<OrderPayRecord> orderPayRecordList = orderPayRecordService.getOrderPayRecordList(orderCode);
|
||||
if (CollectionUtils.isEmpty(orderPayRecordList)) {
|
||||
return;
|
||||
}
|
||||
OrderPayRecord record = orderPayRecordList.get(0);
|
||||
String deductionRecord = record.getDeductionRecord();
|
||||
AbstractOrderLogic orderLogic = new DelayMerchantOrderLogic();
|
||||
List<JSONObject> jsonObjects = orderLogic.parseDeductionRecord(deductionRecord);
|
||||
// 通过paymentId查询 分账记录
|
||||
|
||||
// 找到orderCode的分账记录
|
||||
|
||||
// 校验是不是分给正确的商户
|
||||
|
||||
// 撤销原分账
|
||||
|
||||
// 重新分账
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user