| | |
| | | import com.ruoyi.project.mapper.ServiceTransportMapper; |
| | | import com.ruoyi.project.service.IServiceTransportFileService; |
| | | import com.ruoyi.project.service.IServiceTransportService; |
| | | import org.apache.commons.lang3.ObjectUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | LambdaQueryWrapper<ServiceTransport> wrappers = getWrappers(serviceTransport); |
| | | // 添加create_time不为空的条件 |
| | | wrappers.isNotNull(ServiceTransport::getCreateTime); |
| | | |
| | | // 然后进行倒序排序 |
| | | wrappers.orderByDesc(ServiceTransport::getCreateTime); |
| | | // 创建分页对象,设置页码和每页大小 |
| | |
| | | |
| | | private LambdaQueryWrapper<ServiceTransport> getWrappers(ServiceTransport serviceTransport) { |
| | | LambdaQueryWrapper<ServiceTransport> wrappers = Wrappers.lambdaQuery(); |
| | | if (ObjectUtils.isNotEmpty(serviceTransport.getId() )) { |
| | | wrappers.eq(ServiceTransport::getId, serviceTransport.getId()); |
| | | } |
| | | if (serviceTransport.getReportId() != null) { |
| | | wrappers.eq(ServiceTransport::getReportId, serviceTransport.getReportId()); |
| | | } |