文件管理修改

master
chen 2 years ago
parent 01f5d044b2
commit 561116ce43
  1. 3
      src/main/java/com/huoran/iasf/controller/SysFilesController.java
  2. 3
      src/main/java/com/huoran/iasf/entity/SysFilesEntity.java
  3. 1
      src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java
  4. 3
      src/main/java/com/huoran/iasf/vo/UEditorResultVO.java
  5. 3
      src/main/java/com/huoran/iasf/vo/req/FileParameters.java

@ -74,6 +74,7 @@ public class SysFilesController {
}
UpdateWrapper<SysFilesEntity> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("quote",fileParameters.getQuote()).
set("is_release",fileParameters.getIsRelease()).
eq("site",fileParameters.getSite()).
eq("id", fileParameters.getId());
return sysFilesService.update(updateWrapper) ? R.success() : R.fail("更新失败");
@ -121,6 +122,8 @@ public class SysFilesController {
}
queryWrapper.orderByDesc(SysFilesEntity::getCreateDate);
queryWrapper.isNotNull(SysFilesEntity::getQuote);
//只查看已发布的文件
queryWrapper.eq(SysFilesEntity::getIsRelease,1);
IPage<SysFilesEntity> iPage = sysFilesService.page(sysFiles.getQueryPage(),queryWrapper);
return R.success(iPage);
}

@ -45,6 +45,9 @@ public class SysFilesEntity extends BaseEntity implements Serializable {
@ApiModelProperty(value = "文件大小")
private Integer fileSize;
@ApiModelProperty(value = "是否发布(默认0未发布,1已发布)")
private Integer isRelease;
@ApiModelProperty(value = "上传人")
private String uploader;

@ -100,6 +100,7 @@ public class SysFilesServiceImpl extends ServiceImpl<SysFilesMapper, SysFilesEnt
UEditorResultVO uEditorResult = new UEditorResultVO();
uEditorResult.setState("SUCCESS");
uEditorResult.setUrl(url);
uEditorResult.setId(sysFilesEntity.getId());
uEditorResult.setTitle(fileNameNew);
uEditorResult.setOriginal(fileName);
return uEditorResult;

@ -30,5 +30,8 @@ public class UEditorResultVO {
*/
@ApiModelProperty(value = "文件路径")
private String url;
@ApiModelProperty(value = "id")
private String id;
}

@ -23,4 +23,7 @@ public class FileParameters {
@ApiModelProperty(value = "文件id")
private String id;
@ApiModelProperty(value = "是否发布(默认0未发布,1已发布)")
private Integer isRelease;
}

Loading…
Cancel
Save