fix:licenseList

This commit is contained in:
guohb
2024-05-14 18:37:47 +08:00
parent 56bc411383
commit c3b41b7a4a
2 changed files with 4 additions and 2 deletions

View File

@@ -13,7 +13,7 @@ public interface ApplyLicenseMapper extends Mapper<LicenseTransactDO> {
List<LicenseListResponse> licenseList(@Param("request") LicenseListRequest request, List<LicenseListResponse> licenseList(@Param("request") LicenseListRequest request,
@Param("userId") String userId, @Param("userId") String userId,
@Param("fightRegions") List<RegionDO> fightRegions); @Param("fightRegions") List<String> fightRegions);
void updateByShopId(@Param("entity") LicenseTransactDO licenseTransactDO); void updateByShopId(@Param("entity") LicenseTransactDO licenseTransactDO);

View File

@@ -174,11 +174,13 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
return new PageInfo<>(); return new PageInfo<>();
} }
List<RegionDO> fightRegion = regionDao.getFightRegionByRegionIds(regionIds); List<RegionDO> fightRegion = regionDao.getFightRegionByRegionIds(regionIds);
List<String> fightRegionIds = fightRegion.stream().map(RegionDO::getRegionId).collect(Collectors.toList());
if (CollectionUtils.isEmpty(fightRegion)) { if (CollectionUtils.isEmpty(fightRegion)) {
return new PageInfo<>(); return new PageInfo<>();
} }
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
licenseListResponses = applyLicenseMapper.licenseList(request, null, fightRegion); licenseListResponses = applyLicenseMapper.licenseList(request, null, fightRegionIds);
} else { } else {
PageHelper.startPage(request.getPageNum(), request.getPageSize()); PageHelper.startPage(request.getPageNum(), request.getPageSize());
licenseListResponses = applyLicenseMapper.licenseList(request, user.getUserId(), null); licenseListResponses = applyLicenseMapper.licenseList(request, user.getUserId(), null);