用户接口修改
This commit is contained in:
@@ -271,7 +271,13 @@ public class ShopUserServiceImpl extends ServiceImpl<ShopUserMapper, ShopUser> i
|
|||||||
long couponNum = 0;
|
long couponNum = 0;
|
||||||
if (shopUser == null) {
|
if (shopUser == null) {
|
||||||
UserInfo userInfo = userInfoService.getById(userId);
|
UserInfo userInfo = userInfoService.getById(userId);
|
||||||
|
if (userInfo == null) {
|
||||||
|
throw new ApiNotPrintException("用户信息不存在");
|
||||||
|
}
|
||||||
shopUser = BeanUtil.copyProperties(userInfo, ShopUser.class);
|
shopUser = BeanUtil.copyProperties(userInfo, ShopUser.class);
|
||||||
|
shopUser.setShopId(shopId);
|
||||||
|
shopUser.setId(null);
|
||||||
|
shopUser.setUserId(userId);
|
||||||
save(shopUser);
|
save(shopUser);
|
||||||
}else {
|
}else {
|
||||||
couponNum = shopActivateCouponRecordService.count(new QueryWrapper().eq(ShopActivateCouponRecord::getShopUserId, shopUser.getId()).eq(ShopActivateCouponRecord::getStatus, 0));
|
couponNum = shopActivateCouponRecordService.count(new QueryWrapper().eq(ShopActivateCouponRecord::getShopUserId, shopUser.getId()).eq(ShopActivateCouponRecord::getStatus, 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user