|  |  | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.time.LocalDateTime; | 
 |  |  | import java.time.format.DateTimeFormatter; | 
 |  |  | import java.util.List; | 
 |  |  | import java.util.Map; | 
 |  |  |  | 
 |  |  | 
 |  |  |  | 
 |  |  |     public QueryResultVo<List<VoCancel>> getCancels(QueryVo queryVo) { | 
 |  |  |         //完善查询注销记录的起止时间 | 
 |  |  |         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd"); | 
 |  |  |  | 
 |  |  |         LocalDateTime cancelTimeStart = queryVo.cancelTimeStart; | 
 |  |  |         LocalDateTime cancelTimeStop = queryVo.cancelTimeStop; | 
 |  |  |         String cancelTimeStart = queryVo.cancelTimeStart; | 
 |  |  |         String cancelTimeStop = queryVo.cancelTimeStop; | 
 |  |  |         if(cancelTimeStart != null) { | 
 |  |  |             cancelTimeStart = LocalDateTime.parse(df.format(cancelTimeStart) + " 00:00:00", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
 |  |  |             cancelTimeStart = cancelTimeStart + " 00:00:00"; | 
 |  |  |             queryVo.setCancelTimeStart(cancelTimeStart); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  |         if(cancelTimeStop != null) { | 
 |  |  |             cancelTimeStop = LocalDateTime.parse(df.format(cancelTimeStop) + " 23:59:59", DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); | 
 |  |  |             cancelTimeStop = cancelTimeStop + " 23:59:59"; | 
 |  |  |             queryVo.setCancelTimeStop(cancelTimeStop); | 
 |  |  |         } | 
 |  |  |  | 
 |  |  | 
 |  |  |         Long itemTotal = seCancelMapper.getRecordCount(params); | 
 |  |  |  | 
 |  |  |         QueryResultVo<List<VoCancel>> rsVo = new QueryResultVo<>() ; | 
 |  |  |         rsVo.pageSize = queryVo.pageSize ; | 
 |  |  |         rsVo.pageCurr = queryVo.pageCurr ; | 
 |  |  |         Integer pageCurr = 0; | 
 |  |  |         Integer pageSize = 10000; | 
 |  |  |         rsVo.pageCurr = 1; | 
 |  |  |         rsVo.pageSize = 10000; | 
 |  |  |         if(queryVo.pageSize != null && queryVo.pageCurr != null) { | 
 |  |  |             rsVo.pageSize = queryVo.pageSize ; | 
 |  |  |             rsVo.pageCurr = queryVo.pageCurr; | 
 |  |  |             pageSize = queryVo.pageSize ; | 
 |  |  |             pageCurr = (Integer.parseInt(params.get("pageCurr").toString()) - 1) * Integer.parseInt(params.get("pageSize").toString()); | 
 |  |  |         } | 
 |  |  |         params.put("pageCurr", pageCurr); | 
 |  |  |         params.put("pageSize", pageSize); | 
 |  |  |  | 
 |  |  |         rsVo.calculateAndSet(itemTotal, params); | 
 |  |  |         rsVo.obj = seCancelMapper.getCancels(params); | 
 |  |  |         return rsVo ; |