会员信息相关接口
This commit is contained in:
@@ -182,4 +182,18 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
||||
|
||||
return date + platformNumber + shopIdLastTwoDigits + randomPart;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CzgResult<Boolean> join(Long shopId, Long userId, ShopUserAddDTO shopUserAddDTO) {
|
||||
ShopUser shopUser = getOne(new QueryWrapper().eq(ShopUser::getShopId, shopId).eq(ShopUser::getUserId, userId));
|
||||
if (shopUser != null) {
|
||||
throw new ApiNotPrintException("您已加入店铺会员");
|
||||
}
|
||||
|
||||
shopUser = BeanUtil.copyProperties(shopUserAddDTO, ShopUser.class);
|
||||
shopUser.setIsVip(1);
|
||||
// shopUser.setCode();
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user