用户接口修改
This commit is contained in:
parent
3757d92cba
commit
592518daca
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in New Issue