店铺用户不存在
This commit is contained in:
@@ -193,7 +193,15 @@ public class AShopUserServiceImpl implements AShopUserService {
|
|||||||
@Override
|
@Override
|
||||||
public ShopUser getDetail(Integer id, Integer userId) {
|
public ShopUser getDetail(Integer id, Integer userId) {
|
||||||
Long mainId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
|
Long mainId = shopInfoService.getMainIdByShopId(StpKit.USER.getShopId());
|
||||||
ShopUser shopUser = shopUserService.getOne(new QueryWrapper().eq(ShopUser::getMainShopId, mainId).eq(ShopUser::getId, id).eq(ShopUser::getUserId, userId));
|
ShopUser shopUser;
|
||||||
|
if (id == null) {
|
||||||
|
shopUser = shopUserService.getShopUserInfo(StpKit.USER.getShopId(), userId);
|
||||||
|
} else {
|
||||||
|
shopUser = shopUserService.getById(id);
|
||||||
|
if (shopUser == null) {
|
||||||
|
throw new CzgException("用户不存在");
|
||||||
|
}
|
||||||
|
}
|
||||||
long count = couponRecordService.count(new QueryWrapper()
|
long count = couponRecordService.count(new QueryWrapper()
|
||||||
.eq(MkShopCouponRecord::getShopUserId, shopUser.getId())
|
.eq(MkShopCouponRecord::getShopUserId, shopUser.getId())
|
||||||
.eq(MkShopCouponRecord::getStatus, 0)
|
.eq(MkShopCouponRecord::getStatus, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user