refactor(mcwl-pay): 优化订单交易服务和用户支付账户日志服务
parent
447cd262ad
commit
60949dfa90
|
@ -703,16 +703,10 @@ public class OrderTradeServiceImpl extends ServiceImpl<OrderTradeMapper, OrderTr
|
|||
redisCache.setCacheObject(CommissionRationEnum.COMMISSION_RATION_INVITER_USER.getName(), commissionRationInviterUser);
|
||||
}
|
||||
|
||||
Double rationMerchant = redisCache.getCacheObject(CommissionRationMerchant);
|
||||
Double rationInviterUser = redisCache.getCacheObject(commissionRationInviterUser);
|
||||
|
||||
rationMerchant = rationMerchant == null ? 0.0 : rationMerchant;
|
||||
rationInviterUser = rationInviterUser == null ? 0.0 : rationInviterUser;
|
||||
|
||||
// 将模型价格、抽取商家金额比例、佣金配给邀请者用户比例转换为BigDecimal类型
|
||||
BigDecimal priceBigDecimal = new BigDecimal(price.toString());
|
||||
BigDecimal rationMerchantBigDecimal = new BigDecimal(rationMerchant.toString());
|
||||
BigDecimal rationInviterUserBigDecimal = new BigDecimal(rationInviterUser.toString());
|
||||
BigDecimal rationMerchantBigDecimal = new BigDecimal(CommissionRationMerchant);
|
||||
BigDecimal rationInviterUserBigDecimal = new BigDecimal(commissionRationInviterUser);
|
||||
|
||||
// 邀请人获取的金额 = 模型价格 * 抽取商家金额比例 * 邀请人提成比例
|
||||
BigDecimal inviterUserAmount = priceBigDecimal
|
||||
|
|
|
@ -40,7 +40,8 @@ public class SysUserPayAccountLogServiceImpl extends ServiceImpl<SysUserPayAccou
|
|||
Page<SysUserPayAccountLog> page = new Page<>(withdrawalPageRes.getPageNum(), withdrawalPageRes.getPageSize());
|
||||
|
||||
baseMapper.selectPage(page, new LambdaQueryWrapper<SysUserPayAccountLog>()
|
||||
.select(SysUserPayAccountLog::getAmount, SysUserPayAccountLog::getAccount, SysUserPayAccountLog::getCreateTime)
|
||||
.select(SysUserPayAccountLog::getAmount, SysUserPayAccountLog::getAccount,
|
||||
SysUserPayAccountLog::getWallet, SysUserPayAccountLog::getCreateTime)
|
||||
.eq(SysUserPayAccountLog::getUserId, userId)
|
||||
.orderByDesc(SysUserPayAccountLog::getCreateTime));
|
||||
|
||||
|
|
Loading…
Reference in New Issue