Selaa lähdekoodia

档案系统-文件收集-查询文件数量的子查询单独resultMap封装

LHB 1 kuukausi sitten
vanhempi
commit
3ae34502ab

+ 42 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml

@@ -132,13 +132,52 @@
         <result column="reviewer" property="reviewer"/>
         <result column="specification" property="specification"/>
         <result column="archive_name_suffix" property="archiveNameSuffix"/>
-<!--        <result column="tree_number" property="treeNumber"/>-->
+        <result column="tree_number" property="treeNumber"/>
+    </resultMap>
+    <!-- 档案树-文件子查询 -->
+    <resultMap id="ArchiveTreeContractVO3ResultMap" type="org.springblade.manager.vo.ArchiveTreeContractVO2">
+        <id column="id" property="id"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="title" property="title"/>
+        <result column="value" property="value"/>
+        <result column="key" property="key"/>
+        <result column="contract_id" property="contractId"/>
+        <result column="project_id" property="projectId"/>
+        <result column="has_children" property="hasChildren"/>
+        <result column="displayHierarchy" property="displayHierarchy"/>
+        <result column="majorDataType" property="majorDataType"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isDisplayTree" property="isDisplayTree"/>
+        <result column="isStorageNode" property="isStorageNode"/>
+        <result column="isBuiltDrawing" property="isBuiltDrawing"/>
+        <result column="association_type" property="associationType"/>
+        <result column="nodeType" property="nodeType"/>
+        <result column="postType" property="postType"/>
+        <result column="project_type" property="projectType"/>
+        <result column="storage_type" property="storageType"/>
+        <result column="ext_type" property="extType"/>
+        <result column="ext_id" property="extId"/>
+        <result column="ext_key_id" property="extKeyId"/>
+        <result column="exp_data_type" property="expDataType"/>
+        <result column="from_id" property="fromId"/>
+        <result column="archive_auto_type" property="archiveAutoType"/>
+        <result column="archive_auto_node_id" property="archiveAutoNodeId"/>
+        <result column="archive_auto_group_select" property="archiveAutoGroupSelect"/>
+        <result column="archive_auto_group_id" property="archiveAutoGroupId"/>
+        <result column="tree_sort" property="treeSort"/>
+        <result column="tree_code" property="treeCode"/>
+        <result column="file_number_prefix" property="fileNumberPrefix"/>
+        <result column="storage_time" property="storageTime"/>
+        <result column="rollor" property="rollor"/>
+        <result column="reviewer" property="reviewer"/>
+        <result column="specification" property="specification"/>
+        <result column="archive_name_suffix" property="archiveNameSuffix"/>
+        <!--        <result column="tree_number" property="treeNumber"/>-->
         <association property="treeNumber" javaType="java.lang.Integer" select="selectFileNumber"
                      column="{id=id,projectId=project_id,code=code,contractId=contract_id,extType=ext_type}"/>
     </resultMap>
 
 
-
     <select id="lazyTree" resultMap="treeNodeResultMap">
         SELECT
         d.id,
@@ -203,7 +242,7 @@
         ORDER BY sort
     </select>
 
-    <select id="lazyTree2" resultMap="ArchiveTreeContractVO2ResultMap">
+    <select id="lazyTree2" resultMap="ArchiveTreeContractVO3ResultMap">
         SELECT
         d.id,
         d.parent_id,