修复相册管理器bug

This commit is contained in:
TinyAnts 2022-08-09 10:14:48 +08:00
parent ba0432b2b1
commit cc4ba32145
2 changed files with 20 additions and 16 deletions

View File

@ -70,6 +70,10 @@ public class AlbumController {
} }
List<Integer> ids = ArrayUtil.objectToListAsInt(params.get("ids")); List<Integer> ids = ArrayUtil.objectToListAsInt(params.get("ids"));
if (ids.size() <= 0) {
return AjaxResult.failed("请至少选择一个文件");
}
iAlbumService.albumMove(ids, Integer.parseInt(params.get("cid").toString())); iAlbumService.albumMove(ids, Integer.parseInt(params.get("cid").toString()));
return AjaxResult.success(); return AjaxResult.success();
} }

View File

@ -41,7 +41,7 @@ public class AlbumServiceImpl implements IAlbumService {
AlbumCateMapper albumCateMapper; AlbumCateMapper albumCateMapper;
/** /**
* 文件列表 * 相册文件列表
* *
* @author fzr * @author fzr
* @param pageParam 分页参数 * @param pageParam 分页参数
@ -67,8 +67,8 @@ public class AlbumServiceImpl implements IAlbumService {
} }
albumMapper.setSearch(queryWrapper, params, new String[]{ albumMapper.setSearch(queryWrapper, params, new String[]{
"like:keyword:str", "=:type:int",
"=:type:int" "like:keyword@name:str"
}); });
IPage<Album> iPage = albumMapper.selectPage(new Page<>(page, limit), queryWrapper); IPage<Album> iPage = albumMapper.selectPage(new Page<>(page, limit), queryWrapper);
@ -89,7 +89,7 @@ public class AlbumServiceImpl implements IAlbumService {
} }
/** /**
* 文件重命名 * 相册文件重命名
* *
* @author fzr * @author fzr
* @param id 文件ID * @param id 文件ID
@ -110,7 +110,7 @@ public class AlbumServiceImpl implements IAlbumService {
} }
/** /**
* 文件移动 * 相册文件移动
* *
* @author fzr * @author fzr
* @param ids 文件ID * @param ids 文件ID
@ -139,7 +139,7 @@ public class AlbumServiceImpl implements IAlbumService {
} }
/** /**
* 文件新增 * 相册文件新增
* *
* @author fzr * @author fzr
* @param params 文件信息参数 * @param params 文件信息参数
@ -162,7 +162,7 @@ public class AlbumServiceImpl implements IAlbumService {
} }
/** /**
* 文件删除 * 相册文件删除
* *
* @author fzr * @author fzr
* @param ids 文件ID * @param ids 文件ID
@ -184,7 +184,7 @@ public class AlbumServiceImpl implements IAlbumService {
} }
/** /**
* 分类列表 * 相册分类列表
* *
* @param params 搜索参数 * @param params 搜索参数
* @return JSONArray * @return JSONArray