Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
commit
292f799820
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue