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

This commit is contained in:
张松 2025-10-27 20:53:13 +08:00
commit 292f799820
1 changed files with 4 additions and 4 deletions

View File

@ -204,12 +204,12 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
ShopUser shopUser = shopUserService.getById(param.getShopUserId());
AssertUtil.isNull(shopUser, "店铺用户不存在");
AssertUtil.isNull(shopUser.getDistributionUserId(), "店铺用户已绑定分销员");
MkDistributionUser mkDistributionUser = this.getById(param.getParentId());
AssertUtil.isNull(mkDistributionUser, "上级分销员不存在");
MkDistributionUser parent = getOne(QueryWrapper.create().eq(MkDistributionUser::getInviteCode, param.getInviteCount()));
AssertUtil.isNull(parent, "邀请人不存在");
ShopUser newShopUser = new ShopUser();
newShopUser.setId(shopUser.getId());
newShopUser.setDistributionUserId(mkDistributionUser.getId());
newShopUser.setDistributionUserParentId(mkDistributionUser.getParentId());
newShopUser.setDistributionUserId(parent.getId());
newShopUser.setDistributionUserParentId(parent.getParentId());
shopUserService.updateById(newShopUser);
}