店铺用户不存在
This commit is contained in:
@@ -143,7 +143,7 @@ public class AShopUserServiceImpl implements AShopUserService {
|
||||
List<ShopUserDTO> dtoList = shopUserMapper.selectPageByKeyAndIsVip(mainIdByShopId, isVip, key, null);
|
||||
|
||||
// 将 dtoList 转换为 ShopUserExportDTO 列表
|
||||
List<ShopUserExportDTO> exportList = BeanUtil.copyToList(dtoList, ShopUserExportDTO.class);
|
||||
List<ShopUserExportDTO> exportList = BeanUtil.copyToList(dtoList, ShopUserExportDTO.class);
|
||||
ExcelExportUtil.exportToResponse(exportList, ShopUserExportDTO.class, shopInfo == null ? "店铺用户列表" : shopInfo.getShopName() + "_用户列表", response);
|
||||
}
|
||||
|
||||
@@ -193,7 +193,15 @@ public class AShopUserServiceImpl implements AShopUserService {
|
||||
@Override
|
||||
public ShopUser getDetail(Integer id, Integer userId) {
|
||||
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()
|
||||
.eq(MkShopCouponRecord::getShopUserId, shopUser.getId())
|
||||
.eq(MkShopCouponRecord::getStatus, 0)
|
||||
|
||||
Reference in New Issue
Block a user