绑定手机号 判断 是否成为 会员

This commit is contained in:
2025-12-26 11:42:18 +08:00
parent 233c226dca
commit 5595a8009b
2 changed files with 11 additions and 3 deletions

View File

@@ -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;
}
}

View File

@@ -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;