绑定上下级
This commit is contained in:
@@ -261,7 +261,6 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
shopUser.setParentUserId(parentShopUser.getId());
|
shopUser.setParentUserId(parentShopUser.getId());
|
||||||
shopUser.setGradeUserId(parentShopUser.getParentUserId());
|
shopUser.setGradeUserId(parentShopUser.getParentUserId());
|
||||||
|
|
||||||
//更新自己的下级 的上级的上级 为自己的上级
|
|
||||||
ShopUser upShopUser1 = new ShopUser();
|
ShopUser upShopUser1 = new ShopUser();
|
||||||
upShopUser1.setParentUserId(parentShopUser.getId());
|
upShopUser1.setParentUserId(parentShopUser.getId());
|
||||||
upShopUser1.setGradeUserId(parentShopUser.getParentUserId());
|
upShopUser1.setGradeUserId(parentShopUser.getParentUserId());
|
||||||
@@ -352,6 +351,7 @@ public class MkDistributionUserServiceImpl extends ServiceImpl<MkDistributionUse
|
|||||||
ShopUser upShopUser1 = new ShopUser();
|
ShopUser upShopUser1 = new ShopUser();
|
||||||
upShopUser1.setParentUserId(parentShopUser.getId());
|
upShopUser1.setParentUserId(parentShopUser.getId());
|
||||||
upShopUser1.setGradeUserId(parentShopUser.getParentUserId());
|
upShopUser1.setGradeUserId(parentShopUser.getParentUserId());
|
||||||
|
upShopUser1.setInviteTime(LocalDateTime.now());
|
||||||
shopUserService.update(upShopUser1, QueryWrapper.create().eq(ShopUser::getId, shopUser.getId()));
|
shopUserService.update(upShopUser1, QueryWrapper.create().eq(ShopUser::getId, shopUser.getId()));
|
||||||
|
|
||||||
if (shopUser.getParentUserId() != null) {
|
if (shopUser.getParentUserId() != null) {
|
||||||
|
|||||||
@@ -62,7 +62,10 @@ public class MkShareBaseServiceImpl extends ServiceImpl<MkShareBaseMapper, MkSha
|
|||||||
}
|
}
|
||||||
//绑定上下级
|
//绑定上下级
|
||||||
if (StrUtil.isNotBlank(inviteCode)) {
|
if (StrUtil.isNotBlank(inviteCode)) {
|
||||||
FunUtils.asyncSafeRunVoid(() -> distributionUserService.bindInviteUser(fromUserId, toUserId, shopId));
|
FunUtils.safeRun(() -> {
|
||||||
|
distributionUserService.bindInviteUser(fromUserId, toUserId, shopId);
|
||||||
|
return null;
|
||||||
|
}, "shareClaim绑定上下级");
|
||||||
}
|
}
|
||||||
MkShareBase shareBase = getById(shopId);
|
MkShareBase shareBase = getById(shopId);
|
||||||
if (shareBase == null || !shareBase.getIsEnabled().equals(1) || StrUtil.isBlank(shareBase.getRewardSharePages())) {
|
if (shareBase == null || !shareBase.getIsEnabled().equals(1) || StrUtil.isBlank(shareBase.getRewardSharePages())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user