|
@@ -403,12 +403,16 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
|
|
|
String userName = getUserNameForToken();
|
|
|
String type = param.getType();
|
|
|
String searchKey = param.getSearchKey();
|
|
|
+ Long dirId = param.getDirId();
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
builder.append("( ");
|
|
|
builder.append("select id,create_time,update_time,name, null as status, IFNULL(null,'dir') as type,user_id, null as icon,null as preview_icon, " +
|
|
|
- "null as file_name, null as file_size,null as scene_code,null as dpi,null as temp_id,null as dir_id, null as dirName from tb_dir where is_delete=0") ;
|
|
|
+ "null as file_name, null as file_size,null as scene_code,null as dpi,null as temp_id,parent_id as dir_id, null as dirName from tb_dir where is_delete=0") ;
|
|
|
builder.append(" and user_id='").append(userName).append("'");
|
|
|
builder.append(" and type='").append(type).append("'");
|
|
|
+ if (dirId != null){
|
|
|
+ builder.append(" and parent_id=").append(dirId);
|
|
|
+ }
|
|
|
|
|
|
if (StrUtil.isNotBlank(searchKey)){
|
|
|
searchKey = RegexUtil.sqlReplaceSpecialStr(searchKey);
|
|
@@ -425,6 +429,10 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
|
|
|
builder.append(" and a.user_id='").append(userName).append("'");
|
|
|
builder.append(" and a.type='").append(type).append("'");
|
|
|
|
|
|
+ if (dirId != null){
|
|
|
+ builder.append(" and a.dir_id=").append(dirId);
|
|
|
+ }
|
|
|
+
|
|
|
if (StrUtil.isNotBlank(searchKey)){
|
|
|
searchKey = RegexUtil.sqlReplaceSpecialStr(searchKey);
|
|
|
builder.append(" and a.name like '%").append(searchKey).append("%'");
|