Authored by wujiexiang

分账记录任务id

... ... @@ -428,10 +428,10 @@ public class MerchantOrderPaymentService extends AbstractOrderPaymentService {
}
// 下架商品(卖家+系统):明细记录+退款表记录
public void unshelveAddWalletDetail(SellerWallet sw, List<OrderInfo> orderList) {
public void unshelveAddWalletDetail(SellerWallet sw, MerchantOrderAttachInfo attachInfo,List<OrderInfo> orderList) {
SellerWalletDetail.Type type = SellerWalletDetail.Type.SELLER_OFF;
for(OrderInfo oi : orderList) {
SellerWalletDetail swd = addWalletDetail(sw, null,oi.getOrderCode(), oi.getAmount(), type);
SellerWalletDetail swd = addWalletDetail(sw, attachInfo, oi.getOrderCode(), oi.getAmount(), type);
addRefundRecord(swd, oi.getAmount());
}
}
... ...
... ... @@ -95,7 +95,6 @@ public class SellerDownShelfTaskHandler extends AbstractSellerTaskHandler<Map<In
SellerWallet sellerWallet = postRefundEarnest(uid, taskId, isSuper, result, successOrders);
//明细
addWalletDetail(uid, taskId, isSuper, sellerWallet, successOrders);
//消息盒子
inboxNotify(uid, skupDtoMap);
... ... @@ -140,7 +139,8 @@ public class SellerDownShelfTaskHandler extends AbstractSellerTaskHandler<Map<In
List<OrderInfo> orderList = successOrders.parallelStream().map(so -> OrderInfo.builder()
.orderCode(so.getOrderCode()).amount(so.getEarnestMoney()).build()).collect(Collectors.toList());
try {
merchantOrderPaymentService.unshelveAddWalletDetail(sellerWallet, orderList);
MerchantOrderAttachInfo attachInfo = MerchantOrderAttachInfo.builder().seriNo(String.valueOf(taskId)).build();
merchantOrderPaymentService.unshelveAddWalletDetail(sellerWallet, attachInfo, orderList);
log.info("[{}-{}] end to add wallet detail success", uid, taskId);
} catch (Exception ex) {
log.error("[{}-{}] exception happened when add wallet detail", uid, taskId, ex);
... ...
... ... @@ -386,7 +386,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServi
if (!isSurper) {
List<OrderInfo> orderList = soList.parallelStream().map(so -> OrderInfo.builder()
.orderCode(so.getOrderCode()).amount(so.getEarnestMoney()).build()).collect(Collectors.toList());
merchantOrderPaymentService.unshelveAddWalletDetail(sellerWallet, orderList);
merchantOrderPaymentService.unshelveAddWalletDetail(sellerWallet, null, orderList);
}
SkupDto skupDto = tskupMap.values().iterator().next();
SellerOrderGoods sellerOrderGoods = skupDto.getSellerOrderGoods();
... ...