空值处理
This commit is contained in:
parent
ffde41dd97
commit
1e1474659e
|
|
@ -275,10 +275,12 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||
newShopUser.setDistributionUserParentId(parent.getParentId());
|
||||
newShopUser.setInviteTime(LocalDateTime.now());
|
||||
shopUserService.updateById(newShopUser);
|
||||
//更新自己的下级 的上级的上级 为自己的上级
|
||||
ShopUser childShopUser = new ShopUser();
|
||||
childShopUser.setDistributionUserParentId(parent.getParentId());
|
||||
shopUserService.update(childShopUser, QueryWrapper.create().eq(ShopUser::getDistributionUserId, shopUser.getId()));
|
||||
if (parent.getParentId() != null) {
|
||||
//更新自己的下级 的上级的上级 为自己的上级
|
||||
ShopUser childShopUser = new ShopUser();
|
||||
childShopUser.setDistributionUserParentId(parent.getParentId());
|
||||
shopUserService.update(childShopUser, QueryWrapper.create().eq(ShopUser::getDistributionUserId, shopUser.getId()));
|
||||
}
|
||||
|
||||
MkDistributionUser newDistributionUser = new MkDistributionUser();
|
||||
newDistributionUser.setId(parent.getId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue