|
|
@ -9,6 +9,7 @@ import com.iflytop.gd.app.model.dto.PhotoSaveDTO; |
|
|
|
import com.iflytop.gd.app.model.dto.PhotoTakeDTO; |
|
|
|
import com.iflytop.gd.app.model.entity.Ores; |
|
|
|
import com.iflytop.gd.app.model.entity.Photos; |
|
|
|
import com.iflytop.gd.app.model.vo.OresCraftsListVO; |
|
|
|
import com.iflytop.gd.app.model.vo.PhotoListVO; |
|
|
|
import com.iflytop.gd.app.model.vo.PhotoVO; |
|
|
|
import com.iflytop.gd.app.service.device.module.SolutionModuleService; |
|
|
@ -51,10 +52,11 @@ public class PhotosService extends ServiceImpl<PhotosMapper, Photos> { |
|
|
|
@Value("${photo.path}") |
|
|
|
private String path; |
|
|
|
|
|
|
|
public List<PhotoListVO> getList(BasePageQuery pageQuery) { |
|
|
|
public IPage<PhotoListVO> getList(BasePageQuery pageQuery) { |
|
|
|
LambdaQueryWrapper<Photos> queryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
queryWrapper.orderByDesc(Photos::getCreateTime); |
|
|
|
IPage<Photos> result = this.page(new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize()), queryWrapper); |
|
|
|
long count = this.count(); |
|
|
|
List<PhotoListVO> dataList = new ArrayList<>(); |
|
|
|
for (Photos photos : result.getRecords()) { |
|
|
|
PhotoListVO photoListVO = new PhotoListVO(); |
|
|
@ -66,7 +68,10 @@ public class PhotosService extends ServiceImpl<PhotosMapper, Photos> { |
|
|
|
photoListVO.setUpdateTime(photos.getUpdateTime()); |
|
|
|
dataList.add(photoListVO); |
|
|
|
} |
|
|
|
return dataList; |
|
|
|
Page<PhotoListVO> resultPage = new Page<>(pageQuery.getPageNum(), pageQuery.getPageSize()); |
|
|
|
resultPage.setTotal(count); |
|
|
|
resultPage.setRecords(dataList); |
|
|
|
return resultPage; |
|
|
|
} |
|
|
|
|
|
|
|
public PhotoVO get(Long id) { |
|
|
|