update 批量退款接口

This commit is contained in:
2023-07-10 15:49:54 +08:00
parent 5b7cfa9009
commit c271ad249d
7 changed files with 91 additions and 0 deletions

View File

@@ -289,4 +289,6 @@ public interface IOrderBasicInfoService {
void analysisPileParameter(BasicPileDTO dto);
Map<String, Object> payOrder(PayOrderDTO dto) throws Exception;
void batchRefund(QueryOrderDTO dto);
}

View File

@@ -2174,6 +2174,27 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
return resultMap;
}
@Override
public void batchRefund(QueryOrderDTO dto) {
if (CollectionUtils.isEmpty(dto.getOrderCodeList())) {
return;
}
List<RefundOrder> list = orderBasicInfoMapper.batchRefundQuery(dto.getOrderCodeList());
if (CollectionUtils.isEmpty(list)) {
return;
}
WeChatRefundDTO weChatRefundDTO = null;
for (RefundOrder refundOrder : list) {
if (StringUtils.isBlank(refundOrder.getRefundAmount())) {
continue;
}
weChatRefundDTO = new WeChatRefundDTO();
weChatRefundDTO.setOrderCode(refundOrder.getOrderCode());
weChatRefundDTO.setRefundAmount(new BigDecimal(refundOrder.getRefundAmount()));
this.refundForOrderWithAdapay(weChatRefundDTO);
}
}
/**
* 白名单支付订单逻辑
*