diff --git a/src/main/java/com/huoran/iasf/controller/SysFilesController.java b/src/main/java/com/huoran/iasf/controller/SysFilesController.java index 0445775..f098a80 100644 --- a/src/main/java/com/huoran/iasf/controller/SysFilesController.java +++ b/src/main/java/com/huoran/iasf/controller/SysFilesController.java @@ -74,6 +74,7 @@ public class SysFilesController { } UpdateWrapper 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 iPage = sysFilesService.page(sysFiles.getQueryPage(),queryWrapper); return R.success(iPage); } diff --git a/src/main/java/com/huoran/iasf/entity/SysFilesEntity.java b/src/main/java/com/huoran/iasf/entity/SysFilesEntity.java index 6090b4e..83c15ca 100644 --- a/src/main/java/com/huoran/iasf/entity/SysFilesEntity.java +++ b/src/main/java/com/huoran/iasf/entity/SysFilesEntity.java @@ -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; diff --git a/src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java b/src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java index 6b7a4e3..6b17218 100644 --- a/src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java +++ b/src/main/java/com/huoran/iasf/service/impl/SysFilesServiceImpl.java @@ -100,6 +100,7 @@ public class SysFilesServiceImpl extends ServiceImpl