Commit 76fb2c53 by zhangkb

修改文件上传管理功能查看上传文件接口

parent 1f6258b7
...@@ -59,10 +59,10 @@ public class UploadFileCtrl { ...@@ -59,10 +59,10 @@ public class UploadFileCtrl {
@ApiOperation(value = "根据条件加载下载文件信息", notes = "根据条件加载下载文件信息") @ApiOperation(value = "根据条件加载下载文件信息", notes = "根据条件加载下载文件信息")
@PostMapping(value = "/getByPageAndKeywordAndCode") @PostMapping(value = "/getByPageAndKeywordAndCode")
public Map<String,Object> getByPageAndKeywordAndCode(@RequestParam List<String> codes, public Map<String,Object> getByPageAndKeywordAndCode(@RequestParam String code,
@RequestParam(required = false)String keyword,@RequestParam(defaultValue = "0")int page, @RequestParam(required = false)String keyword,@RequestParam(defaultValue = "0")int page,
@RequestParam(defaultValue = "10")int rows)throws Exception{ @RequestParam(defaultValue = "10")int rows)throws Exception{
return uploadFileService.getByPageAndKeywordAndCodeIn(codes, keyword, page, rows); return uploadFileService.getByPageAndKeywordAndCodeIn(code, keyword, page, rows);
} }
@ApiOperation(value = "批量删除文件信息", notes = "批量删除文件信息") @ApiOperation(value = "批量删除文件信息", notes = "批量删除文件信息")
......
...@@ -77,11 +77,11 @@ public class UploadFileService { ...@@ -77,11 +77,11 @@ public class UploadFileService {
} }
//加载上传文件列表 //加载上传文件列表
public Map<String,Object> getByPageAndKeywordAndCodeIn(List<String> codes,String keyword, public Map<String,Object> getByPageAndKeywordAndCodeIn(String code,String keyword,
int page,int rows)throws Exception{ int page,int rows)throws Exception{
Map<String,Object> resultMap = new HashMap<>(); Map<String,Object> resultMap = new HashMap<>();
Map<String,Object> paramMap = new HashMap<>(); Map<String,Object> paramMap = new HashMap<>();
paramMap.put("codes", codes); paramMap.put("code", code+"%");
if(StringUtils.isBlank(keyword)) { if(StringUtils.isBlank(keyword)) {
paramMap.put("keyword", null); paramMap.put("keyword", null);
}else { }else {
......
...@@ -6,10 +6,7 @@ ...@@ -6,10 +6,7 @@
from indi_upload_file from indi_upload_file
where where
file_status="1" and file_status="1" and
code in code like #{code}
<foreach item="code" collection="codes" open="(" close=")" separator=",">
#{code}
</foreach>
<if test="keyword!=null"> <if test="keyword!=null">
and file_name like #{keyword} and file_name like #{keyword}
</if> </if>
...@@ -22,10 +19,7 @@ ...@@ -22,10 +19,7 @@
from indi_upload_file from indi_upload_file
where where
file_status="1" and file_status="1" and
code in code like #{code}
<foreach item="code" collection="codes" open="(" close=")" separator=",">
#{code}
</foreach>
<if test="keyword!=null"> <if test="keyword!=null">
and file_name like #{keyword} and file_name like #{keyword}
</if> </if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment