Merge remote-tracking branch 'origin/master'

This commit is contained in:
wangw 2025-03-11 18:01:13 +08:00
commit 868aa1bf0f
1 changed files with 4 additions and 1 deletions

View File

@ -256,6 +256,7 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
shopUser = new ShopUser(); shopUser = new ShopUser();
shopUser.setShopId(shopId); shopUser.setShopId(shopId);
shopUser.setUserId(userId); shopUser.setUserId(userId);
save(shopUser);
} else if (shopUser.getIsVip() == 1) { } else if (shopUser.getIsVip() == 1) {
throw new ApiNotPrintException("您已加入店铺会员"); throw new ApiNotPrintException("您已加入店铺会员");
} }
@ -263,8 +264,10 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
shopUser.setIsVip(1); shopUser.setIsVip(1);
shopUser.setCode(generateCode(shopId)); shopUser.setCode(generateCode(shopId));
shopUser.setJoinTime(DateUtil.date().toLocalDateTime()); shopUser.setJoinTime(DateUtil.date().toLocalDateTime());
shopUser.setUserId(null);
shopUser.setShopId(null);
return saveOrUpdate(shopUser); return updateById(shopUser);
} }
@Override @Override