绑定问题
This commit is contained in:
@@ -327,11 +327,8 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
||||
if (shopUserInvite != null && shopUserInvite.getParentUserId() != null) {
|
||||
throw new CzgException("店铺用户已存在上级");
|
||||
}
|
||||
MkDistributionUser parent = getOne(QueryWrapper.create().eq(MkDistributionUser::getId, fromUserId));
|
||||
MkDistributionUser parent = getOne(QueryWrapper.create().eq(MkDistributionUser::getId, fromUserId).eq(MkDistributionUser::getShopId, shopId));
|
||||
AssertUtil.isNull(parent, "邀请人不存在");
|
||||
if (!parent.getShopId().equals(shopId)) {
|
||||
throw new CzgException("邀请人不是本店铺的分销员");
|
||||
}
|
||||
if (parent.getId().equals(shopUser.getId())) {
|
||||
throw new CzgException("不能绑定自己为上级");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user