Merge remote-tracking branch 'origin/test' into test

This commit is contained in:
张松
2025-10-29 17:21:23 +08:00

View File

@@ -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());