用户接口修改
This commit is contained in:
@@ -252,17 +252,16 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
userInfoService.updateById(userInfo);
|
||||
|
||||
ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, shopId).eq(ShopUser::getUserId, userId));
|
||||
if (shopUser != null) {
|
||||
if (shopUser != null && shopUser.getIsVip() == 1) {
|
||||
throw new ApiNotPrintException("您已加入店铺会员");
|
||||
}
|
||||
|
||||
shopUser = BeanUtil.copyProperties(shopUserAddDTO, ShopUser.class);
|
||||
shopUser.setIsVip(1);
|
||||
shopUser.setCode(generateCode(shopId));
|
||||
shopUser.setJoinTime(DateUtil.date().toLocalDateTime());
|
||||
shopUser.setShopId(shopId);
|
||||
shopUser.setUserId(userId);
|
||||
return save(shopUser);
|
||||
return saveOrUpdate(shopUser);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user