diff --git a/src/main/java/com/yn/bftl/thirdparty/modules/business/service/impl/SubaccountServiceImpl.java b/src/main/java/com/yn/bftl/thirdparty/modules/business/service/impl/SubaccountServiceImpl.java index 0a2a4db..ee1dee9 100644 --- a/src/main/java/com/yn/bftl/thirdparty/modules/business/service/impl/SubaccountServiceImpl.java +++ b/src/main/java/com/yn/bftl/thirdparty/modules/business/service/impl/SubaccountServiceImpl.java @@ -2727,9 +2727,17 @@ // Company platformCompany = companyRepository.findByWalletId(balanceAcctId); BusinessRelations businessRelations = businessRelationsRepository.findFirstBySourceCompany(order.getSellerCompany()); List confirmsDetailDTOList = new ArrayList<>(); +// if (statement.getSubaccountType().equals(SubaccountType)) + String profitSharingWalletId = ""; + switch (statement.getSubaccountType()) { + case GOODS_COST: profitSharingWalletId = order.getSellerCompany().getWalletId();break; + case BRAND_FEE: profitSharingWalletId = order.getBrandCompany().getWalletId();break; + case SERVICE_FEE: profitSharingWalletId = order.getDeviseCompany().getWalletId();break; + default: throw new YnceErrorException("分账失败,分账类型不正确"); + } ByxChinaumsGuaranteePayConfirmsDetailDTO confirmsDetailDTO = ByxChinaumsGuaranteePayConfirmsDetailDTO .builder() - .profitSharingWalletId(businessRelations.getSourceCompany().getWalletId()) + .profitSharingWalletId(profitSharingWalletId) .profitSharingAmt(subaccount.getSubaccountAmount().multiply(new BigDecimal(100)).longValue()) .build(); confirmsDetailDTOList.add(confirmsDetailDTO);