Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -204,12 +204,12 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
ShopUser shopUser = shopUserService.getById(param.getShopUserId());
|
ShopUser shopUser = shopUserService.getById(param.getShopUserId());
|
||||||
AssertUtil.isNull(shopUser, "店铺用户不存在");
|
AssertUtil.isNull(shopUser, "店铺用户不存在");
|
||||||
AssertUtil.isNull(shopUser.getDistributionUserId(), "店铺用户已绑定分销员");
|
AssertUtil.isNull(shopUser.getDistributionUserId(), "店铺用户已绑定分销员");
|
||||||
MkDistributionUser mkDistributionUser = this.getById(param.getParentId());
|
MkDistributionUser parent = getOne(QueryWrapper.create().eq(MkDistributionUser::getInviteCode, param.getInviteCount()));
|
||||||
AssertUtil.isNull(mkDistributionUser, "上级分销员不存在");
|
AssertUtil.isNull(parent, "邀请人不存在");
|
||||||
ShopUser newShopUser = new ShopUser();
|
ShopUser newShopUser = new ShopUser();
|
||||||
newShopUser.setId(shopUser.getId());
|
newShopUser.setId(shopUser.getId());
|
||||||
newShopUser.setDistributionUserId(mkDistributionUser.getId());
|
newShopUser.setDistributionUserId(parent.getId());
|
||||||
newShopUser.setDistributionUserParentId(mkDistributionUser.getParentId());
|
newShopUser.setDistributionUserParentId(parent.getParentId());
|
||||||
shopUserService.updateById(newShopUser);
|
shopUserService.updateById(newShopUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user