分润问题
This commit is contained in:
parent
249f857c9e
commit
0bc204460e
|
|
@ -220,7 +220,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
public Map<String, Object> updateInvite(UserEntity userEntity, String format, Long userId, BigDecimal price) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
if (userEntity != null && userId != null && price != null) {
|
||||
Invite invite1 = inviteDao.selectInviteByUser(userEntity.getUserId(), userId, 1);
|
||||
Invite invite1 = inviteDao.selectInviteByUser(userEntity.getUserId(), userId, 1);// 1级好友
|
||||
if (invite1 == null) {
|
||||
Invite invite = new Invite();
|
||||
invite.setState(0);
|
||||
|
|
@ -235,8 +235,8 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
UserEntity userEntity1 = userService.selectUserById(userId);
|
||||
BigDecimal oneMoney = BigDecimal.ZERO;
|
||||
BigDecimal twoMoney = BigDecimal.ZERO;
|
||||
if (userEntity.getRate() != null && userEntity.getRate().doubleValue() > 0) {
|
||||
BigDecimal rateMoney = price.multiply(userEntity.getRate()).setScale(2, BigDecimal.ROUND_HALF_UP);
|
||||
if (userEntity.getRate() != null && userEntity.getRate().doubleValue() > 0) {//一级推广
|
||||
BigDecimal rateMoney = userEntity.getRate();
|
||||
oneMoney = rateMoney;
|
||||
Double money = rateMoney.doubleValue();
|
||||
invite1.setUserType(1);
|
||||
|
|
@ -274,7 +274,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
invite2 = inviteDao.selectInviteByUser(two.getUserId(), userId, 2);
|
||||
}
|
||||
if (two.getTwoRate() != null && two.getTwoRate().doubleValue() > 0) {
|
||||
BigDecimal rateMoney = price.multiply(two.getTwoRate()).setScale(2, RoundingMode.HALF_UP);
|
||||
BigDecimal rateMoney = two.getTwoRate();
|
||||
twoMoney = rateMoney;
|
||||
Double money = rateMoney.doubleValue();
|
||||
invite2.setUserType(2);
|
||||
|
|
|
|||
Loading…
Reference in New Issue