1
0
mirror of https://gitee.com/bookshelfplus/bookshelfplus synced 2025-10-14 03:35:14 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

文件关联书籍功能完成

This commit is contained in:
2022-04-23 10:16:05 +08:00
parent 4bf2d6ed9a
commit 7c452b851d
8 changed files with 293 additions and 1 deletions

View File

@@ -164,6 +164,22 @@ public class FileServiceImpl implements FileService {
return fileDO;
}
/**
* 更新文件
*
* @return
*/
@Override
public Integer updateSelective(FileModel fileModel) {
FileDO fileDO = convertFromFileModel(fileModel);
// 如果文件 id 不对,那么不能更新
if (fileDO.getId() == 0 || fileDO.getId() == null) {
return 0;
}
return fileDOMapper.updateByPrimaryKeySelective(fileDO);
}
/**
* 取消文件和书籍的关联
*

View File

@@ -60,6 +60,14 @@ public interface FileService {
*/
Boolean addFile(FileModel fileModel) throws InvocationTargetException, IllegalAccessException;
/**
* 更新文件对象
*
* @param fileModel
* @return
*/
Integer updateSelective(FileModel fileModel);
/**
* 取消文件和书籍的关联
*