文件管理修改

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

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

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

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

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

Loading…
Cancel
Save