|
|
@ -200,6 +200,21 @@ public class SysOssServiceImpl extends ServiceImpl<SysOssDao, SysOssEntity> impl |
|
|
return fileNo; |
|
|
return fileNo; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
@Transactional |
|
|
|
|
|
public void updateOssFileRemark(Long id, String fileRemark) { |
|
|
|
|
|
if (id == null) { |
|
|
|
|
|
throw new IllegalArgumentException("附件ID不能为空"); |
|
|
|
|
|
} |
|
|
|
|
|
boolean updated = lambdaUpdate() |
|
|
|
|
|
.set(SysOssEntity::getFileRemark, fileRemark == null ? "" : fileRemark) |
|
|
|
|
|
.eq(SysOssEntity::getId, id) |
|
|
|
|
|
.update(); |
|
|
|
|
|
if (!updated) { |
|
|
|
|
|
throw new IllegalArgumentException("附件不存在或更新失败"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
public void previewOssFileById(Integer id, HttpServletResponse response) { |
|
|
public void previewOssFileById(Integer id, HttpServletResponse response) { |
|
|
SysOssEntity oss = this.getById(id); |
|
|
SysOssEntity oss = this.getById(id); |
|
|
|