资料中心通过id查询

This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-16 17:43:00 +08:00
parent e0f4eb3d0f
commit 71354b944f
3 changed files with 14 additions and 2 deletions
@@ -78,7 +78,7 @@ public class FileMaterialController extends BaseController<FileMaterial> {
@PutMapping @PutMapping
@ApiOperation("修改文件资料组") @ApiOperation("修改文件资料组")
public ResponseMessage updateFileMaterial(FileMaterial fileMaterial){ public ResponseMessage updateFileMaterial(@RequestBody FileMaterial fileMaterial){
boolean b = iFileMaterialService.updateById(fileMaterial); boolean b = iFileMaterialService.updateById(fileMaterial);
return Result.success(b); return Result.success(b);
@@ -8,6 +8,8 @@ import lombok.Data;
@Data @Data
public class FileMaterialPage { public class FileMaterialPage {
private String id;
private String dataTitle; private String dataTitle;
private String dataType; private String dataType;
@@ -52,7 +52,17 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
queryPage.getEndDataUploadTime()); queryPage.getEndDataUploadTime());
} }
return this.page(new Page<>(queryPage.getPage(),queryPage.getPageSize()),queryWrapper); if (queryPage.getId()!=null && !"".equals(queryPage.getId()) ){
queryWrapper.eq("id",queryPage.getId());
}
IPage<FileMaterial> page=null;
if (queryPage.getPage()==null || queryPage .getPageSize()==null){
page=new Page<>(1,1);
}else {
page=new Page<>(queryPage.getPage(),queryPage.getPageSize());
}
return this.page(page,queryWrapper);
} }
@Override @Override