Commit 2d040fee by 崔彦峰

refactor(approval): 调整分页查询逻辑位置

- 将 PageHelper.startPage 调用从方法开始处移至条件处理之后
- 确保客户类型筛选条件应用后再执行分页设置
- 保持相同的分页参数传递给 PageHelper
1 parent bf3d73cb
......@@ -151,7 +151,6 @@ public class ApprovalRecordService {
* @return
*/
public Page<H5ApprovalRecordDTO> getH5ApprovalRecordList(RpcPagination<H5ApprovalRecordRequest> pagination) {
Page<H5ApprovalRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount());
if (pagination.getCondition().getCustType() != null) {
Example example = new Example(NbCbCustInfo.class);
example.createCriteria().andEqualTo("delFlag",0)
......@@ -161,6 +160,7 @@ public class ApprovalRecordService {
pagination.getCondition().setCustId(nbCbCustInfos.get(0).getCustId());
}
}
Page<H5ApprovalRecordDTO> page = PageHelper.startPage(pagination.getPageNum(), pagination.getPageSize(), pagination.isNeedCount());
approvalRecordsMapper.getH5ApprovalRecordList(pagination.getCondition());
return page;
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!