Bläddra i källkod

处理删除目录bug
列表反正祖先字段

wuweihao 2 år sedan
förälder
incheckning
8c7b1787f3

+ 3 - 0
720yun_fd_manage/gis_domain/src/main/java/com/gis/domain/vo/FodderVo.java

@@ -67,6 +67,9 @@ public class FodderVo {
     @ApiModelProperty(value = "目录名称")
     private String dirName;
 
+    @ApiModelProperty(value = "目录祖先, 目录类型使用")
+    private String ancestors;
+
 //    @ApiModelProperty(value = "目录名称")
 //    private Integer sortType;
 

+ 5 - 3
720yun_fd_manage/gis_service/src/main/java/com/gis/service/impl/FodderServiceImpl.java

@@ -404,10 +404,11 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
         String searchKey = param.getSearchKey();
         Long dirId = param.getDirId();
         StringBuilder builder = new StringBuilder();
+        // 目录
         builder.append("( ");
         builder.append("select a.id,a.create_time,a.update_time,a.name, null as status, IFNULL(null,'dir') as type,a.user_id, null as icon,null as preview_icon,  " +
                 "null as file_name, null as file_size,null as oss_path, null as scene_code,null as dpi,null as temp_id,a.parent_id as dir_id, b.name as dirName, " +
-                "IFNULL(null, 1) as sortType from tb_dir a left join tb_dir b on b.id=a.parent_id where a.is_delete=0") ;
+                "IFNULL(null, 1) as sortType, a.ancestors from tb_dir a left join tb_dir b on b.id=a.parent_id where a.is_delete=0") ;
         builder.append(" and a.user_id='").append(userName).append("'");
         builder.append(" and a.type='").append(type).append("'");
 
@@ -425,9 +426,10 @@ public class FodderServiceImpl extends IBaseServiceImpl<FodderEntity, Long> impl
 
         builder.append(" )  union all ( ");
 
-        // 字段顺序要对应
+        // 字段顺序要对应, 素材
         builder.append("select a.id,a.create_time,a.update_time,a.name, a.status,a.type,a.user_id, a.icon,a.preview_icon, a.file_name, " +
-                "a.file_size, a.oss_path, a.scene_code,a.dpi,a.temp_id, a.dir_id, b.name as dirName, if(a.id=0, 2, 2) as sortType " +
+                "a.file_size, a.oss_path, a.scene_code,a.dpi,a.temp_id, a.dir_id, b.name as dirName, if(a.id=0, 2, 2) as sortType," +
+                " null as  ancestors " +
                 "from tb_fodder a left join tb_dir b on b.id=a.dir_id where a.is_delete=0");