绑定手机号 判断 是否成为 会员
This commit is contained in:
@@ -22,6 +22,8 @@ import com.czg.market.vo.InviteUserVO;
|
||||
import com.czg.market.vo.MemberConfigVO;
|
||||
import com.czg.order.entity.OrderInfo;
|
||||
import com.czg.service.account.mapper.ShopUserMapper;
|
||||
import com.czg.service.account.util.FunUtil;
|
||||
import com.czg.utils.FunUtils;
|
||||
import com.czg.utils.PageUtil;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -61,6 +63,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
private MemberLevelConfigService memberLevelConfigService;
|
||||
@DubboReference
|
||||
private TbMemberConfigService memberConfigService;
|
||||
|
||||
private ShopUser getUserInfo(Long shopUserId) {
|
||||
ShopUser shopUser = queryChain().eq(ShopUser::getId, shopUserId).one();
|
||||
if (shopUser == null) {
|
||||
@@ -240,9 +243,13 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
shopUser.setBirthDay(null);
|
||||
}
|
||||
shopUser.setNickName(userInfo.getNickName());
|
||||
if (shopUser.getJoinTime() == null) {
|
||||
shopUser.setJoinTime(LocalDateTime.now());
|
||||
// if (shopUser.getJoinTime() == null) {
|
||||
// shopUser.setJoinTime(LocalDateTime.now());
|
||||
// }
|
||||
boolean b = saveOrUpdate(shopUser);
|
||||
if (b) {
|
||||
FunUtils.transactionSafeRun(() -> memberConfigService.joinMemberByCondition(shopId, userId, shopUser));
|
||||
}
|
||||
return saveOrUpdate(shopUser);
|
||||
return b;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.czg.market.entity.MkPointsUser;
|
||||
import com.czg.market.entity.MkShopCouponRecord;
|
||||
import com.czg.market.service.MkPointsUserService;
|
||||
import com.czg.market.service.MkShopCouponRecordService;
|
||||
import com.czg.market.service.TbMemberConfigService;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.service.RedisService;
|
||||
import com.czg.service.account.mapper.ShopConfigMapper;
|
||||
|
||||
Reference in New Issue
Block a user