|
|
@@ -77,9 +77,6 @@ public class PartnerUserServiceImpl extends ServiceImpl<PartnerUserMapper, Partn
|
|
|
@Autowired
|
|
|
private PartnerRuleService partnerRuleService;
|
|
|
|
|
|
- @Autowired
|
|
|
- private PartnerExpiredCommissionMapper expiredCommissionMapper;
|
|
|
-
|
|
|
@Value("${partner.expireDays}")
|
|
|
private Long expireDays;
|
|
|
|
|
|
@@ -1360,6 +1357,16 @@ public class PartnerUserServiceImpl extends ServiceImpl<PartnerUserMapper, Partn
|
|
|
@Override
|
|
|
public PartnerPartnerAccount newGetFee(String userId) {
|
|
|
PartnerPartnerAccount account = partnerPartnerAccountMapper.selectByUserId(userId);
|
|
|
+
|
|
|
+ List<PartnerUser> partnerUsers = baseMapper.selectList(new LambdaQueryWrapper<>(PartnerUser.class).eq(PartnerUser::getUserId, userId));
|
|
|
+ BigDecimal commissionTotal = BigDecimal.ZERO;
|
|
|
+ for (PartnerUser user : partnerUsers) {
|
|
|
+ BigDecimal commission = liftingRecordService.queryLockCommission(user.getUserId(), String.valueOf(user.getGrade()));
|
|
|
+ if (commission != null) {
|
|
|
+ commissionTotal = commissionTotal.add(commission);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ account.setCashFee(account.getCashFee().subtract(commissionTotal));
|
|
|
return account;
|
|
|
}
|
|
|
|