mirror of https://gitee.com/stylefeng/roses
【7.0.4】删除没用到的接口
parent
c2474c4722
commit
acdcc1d4f1
|
@ -251,20 +251,6 @@ public class SysFileInfoController {
|
|||
return new SuccessResponseData(this.sysFileInfoService.fileInfoListPage(sysFileInfoRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认替换附件
|
||||
* <p>
|
||||
* 在替换接口替换文件以后,需要调用本接口替换操作才会生效
|
||||
*
|
||||
* @author majianguo
|
||||
* @date 2020/12/27 13:18
|
||||
*/
|
||||
@PostResource(name = "确认替换附件", path = "/sysFileInfo/confirmReplaceFile", requiredPermission = false)
|
||||
public ResponseData confirmReplaceFile(@RequestBody List<Long> fileIdList) {
|
||||
this.sysFileInfoService.confirmReplaceFile(fileIdList);
|
||||
return new SuccessResponseData();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看详情文件信息表
|
||||
*
|
||||
|
|
|
@ -51,33 +51,4 @@ public interface SysFileInfoMapper extends BaseMapper<SysFileInfo> {
|
|||
*/
|
||||
List<SysFileInfoListResponse> fileInfoList(@Param("page") Page<SysFileInfoListResponse> page, @Param("sysFileInfoRequest") SysFileInfoRequest sysFileInfoRequest);
|
||||
|
||||
/**
|
||||
* 获取所有附件信息的code集合
|
||||
*
|
||||
* @param fileIdList 文件ID列表
|
||||
* @author majianguo
|
||||
* @date 2020/12/27 12:57
|
||||
*/
|
||||
List<Long> getFileCodeByFileIds(@Param("fileIdList") List<Long> fileIdList);
|
||||
|
||||
/**
|
||||
* 修改fielCodes下所有附件状态
|
||||
*
|
||||
* @param fileCodeList 文件CODE列表
|
||||
* @param delFlag 是否删除
|
||||
* @author majianguo
|
||||
* @date 2020/12/27 12:56
|
||||
*/
|
||||
void updateDelFlagByFileCodes(@Param("fileCodeList") List<Long> fileCodeList, @Param("delFlag") String delFlag);
|
||||
|
||||
/**
|
||||
* 修改fileIds下所有附件状态
|
||||
*
|
||||
* @param fileIdList 文件ID列表
|
||||
* @param delFlag 是否删除
|
||||
* @author majianguo
|
||||
* @date 2020/12/27 12:56
|
||||
*/
|
||||
void updateDelFlagByFileIds(@Param("fileIdList") List<Long> fileIdList, @Param("delFlag") String delFlag);
|
||||
|
||||
}
|
||||
|
|
|
@ -131,15 +131,6 @@ public interface SysFileInfoService extends IService<SysFileInfo> {
|
|||
*/
|
||||
void preview(SysFileInfoRequest sysFileInfoRequest, HttpServletResponse response);
|
||||
|
||||
/**
|
||||
* 替换附件回调
|
||||
*
|
||||
* @param fileIdList 文件id列表
|
||||
* @author majianguo
|
||||
* @date 2020/12/27 12:52
|
||||
*/
|
||||
void confirmReplaceFile(List<Long> fileIdList);
|
||||
|
||||
/**
|
||||
* 版本回退
|
||||
*
|
||||
|
|
|
@ -294,26 +294,6 @@ public class SysFileInfoServiceImpl extends ServiceImpl<SysFileInfoMapper, SysFi
|
|||
this.renderPreviewFile(response, fileSuffix, fileBytes);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void confirmReplaceFile(List<Long> fileIdList) {
|
||||
|
||||
// 获取所有附件信息的code集合
|
||||
if (fileIdList == null || fileIdList.size() == 0) {
|
||||
throw new FileException(FileExceptionEnum.FILE_IDS_EMPTY);
|
||||
}
|
||||
List<Long> fileCodeList = this.baseMapper.getFileCodeByFileIds(fileIdList);
|
||||
if (fileCodeList == null || fileCodeList.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// 修改该codes下所有附件删除状态为Y
|
||||
this.baseMapper.updateDelFlagByFileCodes(fileCodeList, YesOrNotEnum.Y.getCode());
|
||||
|
||||
// 修改当前fileIds下所有附件删除状态为N
|
||||
this.baseMapper.updateDelFlagByFileIds(fileIdList, YesOrNotEnum.N.getCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public SysFileInfoResponse versionBack(SysFileInfoRequest sysFileInfoRequest) {
|
||||
|
|
Loading…
Reference in New Issue