代码更新

dev
1178634255 2 years ago
parent 22f96a53e9
commit 0f1d57bcfa

@ -81,6 +81,7 @@ public class SupCompanyController {
@AuthRuleAnnotation("")
@GetMapping("/api/pur/getSupComapnys")
public BaseResponse getSupComapnys(FilterSupCompanyRequest companyRequest) {
System.out.println(companyRequest.toString());
List<SupCompanyEntity> companyEntities = companyService.filterCompany(companyRequest);
PageInfo<SupCompanyEntity> pageInfo = new PageInfo<>(companyEntities);
PageSimpleResponse<SupCompanyEntity> pageSimpleResponse = new PageSimpleResponse<>();

@ -36,9 +36,8 @@ public class SupCompanyServiceImpl extends ServiceImpl<SupCompanyDao,SupCompanyE
if (companyRequest == null) {
return Collections.emptyList();
}
if (companyRequest.getPage() != null) {
int offset = (companyRequest.getPage() - 1) * companyRequest.getLimit();
PageHelper.offsetPage(offset, companyRequest.getLimit());
if (null != companyRequest.getPage() && null != companyRequest.getLimit()) {
PageHelper.offsetPage((companyRequest.getPage() - 1) * companyRequest.getLimit(), companyRequest.getLimit());
}
return supCompanyDao.filterCompany(companyRequest);
}

Loading…
Cancel
Save