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