mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update 重试运营商分账接口
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.jsowell.service;
|
||||
|
||||
import com.huifu.adapay.core.exception.BaseAdaPayException;
|
||||
import com.jsowell.adapay.service.AdapayService;
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.pile.domain.OrderSplitRecord;
|
||||
import com.jsowell.pile.dto.DebugOrderDTO;
|
||||
@@ -22,20 +24,25 @@ public class SplitBillService {
|
||||
|
||||
@Autowired
|
||||
private TempService tempService;
|
||||
@Autowired
|
||||
private AdapayService adapayService;
|
||||
|
||||
/**
|
||||
* 重试运营商分账
|
||||
* @param dto
|
||||
*/
|
||||
public void retryMerchantSplit(QueryOrderSplitRecordDTO dto) {
|
||||
public void retryMerchantSplit(QueryOrderSplitRecordDTO dto) throws BaseAdaPayException {
|
||||
// 首先根据 merchantId、startTime、endTime 查出日期区间内所有订单信息(包括 paymentId)
|
||||
List<OrderSplitRecord> recordList = orderBasicInfoService.getSplitOrders(dto);
|
||||
// 获取 paymentIdList
|
||||
List<String> paymentIdList = recordList.stream()
|
||||
.map(OrderSplitRecord::getPaymentId)
|
||||
.collect(Collectors.toList());
|
||||
// 判断订单是否已经成功分账
|
||||
// adapayService.checkOrderSplitStatus(list);
|
||||
// 将未分账的订单进行筛选、汇总
|
||||
List<String> paymenIdList = new ArrayList<>();
|
||||
List<String> unSplitPaymentIdList = adapayService.getSplitInfoByPaymentIdList(paymentIdList);
|
||||
// 将 paymentIdList 与 recordList 进行匹配,筛选出 orderCodeList
|
||||
Set<String> paymentIdSet = new HashSet<>(paymenIdList);
|
||||
Set<String> paymentIdSet = new HashSet<>(unSplitPaymentIdList);
|
||||
List<String> orderCodeList = recordList.stream()
|
||||
.filter(record -> paymentIdSet.contains(record.getPaymentId()))
|
||||
.map(OrderSplitRecord::getOrderCode)
|
||||
|
||||
Reference in New Issue
Block a user