mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
重试分账接口
This commit is contained in:
@@ -827,7 +827,7 @@ public class TempController extends BaseController {
|
||||
public RestApiResponse<?> retryOrderSplit(@RequestBody QueryOrderDTO dto) {
|
||||
RestApiResponse<?> response;
|
||||
try {
|
||||
tempService.retrySplittingMethod(dto.getOrderCode());
|
||||
tempService.retrySplittingMethod(dto);
|
||||
response = new RestApiResponse<>();
|
||||
} catch (Exception e) {
|
||||
logger.error("重试分账接口error,", e);
|
||||
|
||||
@@ -999,6 +999,27 @@ public class TempService {
|
||||
}
|
||||
}
|
||||
|
||||
public void retrySplittingMethod(QueryOrderDTO dto) {
|
||||
List<String> orderCodeList = Lists.newArrayList();
|
||||
|
||||
if (StringUtils.isNotBlank(dto.getOrderCode())) {
|
||||
orderCodeList.add(dto.getOrderCode());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(dto.getOrderCodeList())) {
|
||||
orderCodeList.addAll(dto.getOrderCodeList());
|
||||
}
|
||||
|
||||
if (CollectionUtils.isNotEmpty(orderCodeList)) {
|
||||
for (String orderCode : orderCodeList) {
|
||||
try {
|
||||
retrySplittingMethod(orderCode);
|
||||
} catch (Exception e) {
|
||||
logger.error("retrySplittingMethod error, orderCode:{}", orderCode, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 重试分账逻辑
|
||||
* 用于订单金额都已经计算好, 但是没有分账, 用来重新执行分账
|
||||
|
||||
Reference in New Issue
Block a user