fix(app):在岗情况、检查信息根据创建时间倒序排列
| | |
| | | @ApiOperation(value = "【APP】岗位列表") |
| | | @PostMapping("/position/list") |
| | | public Result<PageRespMp<Position>> list(@Validated @RequestBody PageReq pageReq) { |
| | | Page<Position> page = positionService.lambdaQuery().page(new Page<>(pageReq.getPage(), pageReq.getSize())); |
| | | Page<Position> page = positionService.lambdaQuery().orderByDesc(Position::getId).page(new Page<>(pageReq.getPage(), pageReq.getSize())); |
| | | return Result.success(PageRespMp.of(page)); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public PageRespMp<Check> listCheckInfoRecords(Integer checkTaskId, Integer creatorId, PageReq pageReq) { |
| | | Page<Check> page = lambdaQuery().eq(Check::getCheckTaskId, checkTaskId).eq(Objects.nonNull(creatorId), Check::getCreatorId, creatorId) |
| | | .orderByDesc(Check::getCreateTime) |
| | | .page(new Page<>(pageReq.getPage(), pageReq.getSize())); |
| | | // 将 Spring Data Page 转换为自定义 PageResp |
| | | return PageRespMp.of(page); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.estate.expert.admin.domain.business.check.Check; |
| | | import com.estate.expert.admin.domain.business.client.Client; |
| | | import com.estate.expert.admin.domain.business.onduty.OnDuty; |
| | | import com.estate.expert.admin.domain.business.onduty.OnDutyVo; |
| | |
| | | @Override |
| | | public PageRespMp<OnDuty> listOnDutyRecords(Integer checkTaskId, Integer creatorId, PageReq pageReq) { |
| | | Page<OnDuty> page = lambdaQuery().eq(OnDuty::getCheckTaskIdId, checkTaskId).eq(Objects.nonNull(creatorId), OnDuty::getCreatorId, creatorId) |
| | | .orderByDesc(OnDuty::getCreateTime) |
| | | .page(new Page<>(pageReq.getPage(), pageReq.getSize())); |
| | | //转换为 PageRespMp |
| | | return PageRespMp.of(page); |