会员信息相关接口

This commit is contained in:
张松
2025-02-27 15:16:23 +08:00
parent 2871e9f7ee
commit 3be9ca1710
4 changed files with 38 additions and 4 deletions

View File

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