@Test public void getCommonLogList() { long current = System.currentTimeMillis(); Long traceLogCount = traceLogMapper.getTraceLogCount(); TraceLogParams traceLogParams = new TraceLogParams(); traceLogParams.setGtValue(traceLogCount); traceLogParams.setPageSize(100); traceLogParams.setPageNo(20000); List<TraceLog> traceLogList = traceLogMapper.getTraceLogList(traceLogParams); PageResultPlus<TraceLog> pageResultPlus = new PageResultPlus<>(); pageResultPlus.setRows(traceLogList); pageResultPlus.setTotal(traceLogCount); pageResultPlus.setCurrent(20000L); pageResultPlus.setSize(100L); long a = traceLogCount % 100 == 0 ? 0 : 1; pageResultPlus.setTotalPage((long) (a + traceLogCount / 100)); System.out.println(System.currentTimeMillis() - current); }
public PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams) { Long traceLogCount = this.baseMapper.getTraceLogCount(); if (traceLogCount == null) { traceLogCount = 0L; } if (traceLogParams.getGtValue() == null) { traceLogParams.setGtValue(traceLogCount); } List<TraceLog> commonLogList = this.baseMapper.getTraceLogList(traceLogParams); return TraceLogFactory.getResponse(commonLogList, traceLogCount, traceLogParams); }
TraceLogService extends ServiceImpl<TraceLogMapper, TraceLog> { public PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams) { Long traceLogCount = this.baseMapper.getTraceLogCount(); if (traceLogCount == null) { traceLogCount = 0L; } if (traceLogParams.getGtValue() == null) { traceLogParams.setGtValue(traceLogCount); } List<TraceLog> commonLogList = this.baseMapper.getTraceLogList(traceLogParams); return TraceLogFactory.getResponse(commonLogList, traceLogCount, traceLogParams); } }
TraceLogService extends ServiceImpl<TraceLogMapper, TraceLog> { public PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams) { Long traceLogCount = this.baseMapper.getTraceLogCount(); if (traceLogCount == null) { traceLogCount = 0L; } if (traceLogParams.getGtValue() == null) { traceLogParams.setGtValue(traceLogCount); } List<TraceLog> commonLogList = this.baseMapper.getTraceLogList(traceLogParams); return TraceLogFactory.getResponse(commonLogList, traceLogCount, traceLogParams); }  }
TraceLogService extends ServiceImpl<TraceLogMapper, TraceLog> { public PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams) { Long traceLogCount = this.baseMapper.getTraceLogCount(); if (traceLogCount == null) { traceLogCount = 0L; } if (traceLogParams.getGtValue() == null) { traceLogParams.setGtValue(traceLogCount); } List<TraceLog> commonLogList = this.baseMapper.getTraceLogList(traceLogParams); return TraceLogFactory.getResponse(commonLogList, traceLogCount, traceLogParams); }  PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams); PageResultPlus<TraceLog> getTraceLogListByCondition(TraceLogCondition traceLogCondition); }
TraceLogService extends ServiceImpl<TraceLogMapper, TraceLog> { public PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams) { Long traceLogCount = this.baseMapper.getTraceLogCount(); if (traceLogCount == null) { traceLogCount = 0L; } if (traceLogParams.getGtValue() == null) { traceLogParams.setGtValue(traceLogCount); } List<TraceLog> commonLogList = this.baseMapper.getTraceLogList(traceLogParams); return TraceLogFactory.getResponse(commonLogList, traceLogCount, traceLogParams); }  PageResultPlus<TraceLog> getTraceLogList(TraceLogParams traceLogParams); PageResultPlus<TraceLog> getTraceLogListByCondition(TraceLogCondition traceLogCondition);  }