下级佣金不可大于渠道商佣金

This commit is contained in:
wangw 2024-12-17 18:57:01 +08:00
parent 0a3c890507
commit bf60074bd4
1 changed files with 9 additions and 2 deletions

View File

@ -175,8 +175,15 @@ public class UserController {
if (sysUserEntity == null) {
return Result.error("渠道码不正确!");
}
if (sysUserEntity.getQdRate().compareTo(userEntity.getRate()) < 0 || sysUserEntity.getQdRate().compareTo(userEntity.getTwoRate()) < 0 ) {
return Result.error("下级佣金不可大于渠道商佣金");
if (userEntity.getRate() != null) {
if (sysUserEntity.getQdRate().compareTo(userEntity.getRate()) < 0) {
return Result.error("下级佣金不可大于渠道商佣金");
}
}
if (userEntity.getTwoRate() != null) {
if (sysUserEntity.getQdRate().compareTo(userEntity.getTwoRate()) < 0) {
return Result.error("下级佣金不可大于渠道商佣金");
}
}
}
userService.updateById(userEntity);