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