提交 da6070e2 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 3f6aa04d
...@@ -2,6 +2,7 @@ package com.zrqx.file.mapper; ...@@ -2,6 +2,7 @@ package com.zrqx.file.mapper;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.zrqx.core.commons.model.file.FileInfo; import com.zrqx.core.commons.model.file.FileInfo;
...@@ -10,8 +11,12 @@ import com.zrqx.core.mapper.BaseMapper; ...@@ -10,8 +11,12 @@ import com.zrqx.core.mapper.BaseMapper;
public interface FileMapper extends BaseMapper<FileInfo>{ public interface FileMapper extends BaseMapper<FileInfo>{
@Select("<script>" @Select("<script>"
+ "SELECT * FROM fileinfo where suffixName='.jpg' or suffixName='.png' or suffixName='.gif' or suffixName='.jpeg' or suffixName='.JPG' or suffixName='.wbmp'" + "SELECT * FROM fileinfo where (suffixName='.jpg' or suffixName='.png' or suffixName='.gif' or suffixName='.jpeg' or suffixName='.JPG' or suffixName='.wbmp')"
+ "<if test='sl_path != null and sl_path != \"\"'>"
+ "and path like concat(#{sl_path},'%') "
+ "</if>"
+ "</script>") + "</script>")
List<FileInfo> selectImages(); List<FileInfo> selectImages(@Param("sl_path")String sl_path);
//SELECT * FROM fileinfo where (suffixName='.jpg' or suffixName='.png' or suffixName='.gif' or suffixName='.jpeg' or suffixName='.JPG' or suffixName='.wbmp') and path like '19787502156633030001_2(解析失败)/images%'
} }
...@@ -24,5 +24,5 @@ public interface FileService extends BaseService<FileInfo, Integer>{ ...@@ -24,5 +24,5 @@ public interface FileService extends BaseService<FileInfo, Integer>{
*/ */
FileInfo uploadImg(MultipartFile file,String type); FileInfo uploadImg(MultipartFile file,String type);
public List<FileInfo> selectImages(); public List<FileInfo> selectImages(String sl_path);
} }
...@@ -280,8 +280,8 @@ public class FileServiceImpl extends BaseServiceImpl<FileInfo, Integer> implemen ...@@ -280,8 +280,8 @@ public class FileServiceImpl extends BaseServiceImpl<FileInfo, Integer> implemen
} }
@Override @Override
public List<FileInfo> selectImages() { public List<FileInfo> selectImages(String sl_path) {
List<FileInfo> list = mapper.selectImages(); List<FileInfo> list = mapper.selectImages(sl_path);
return list; return list;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论