From 1a07db181c732729abc1d6ec71ae206ecffca86d Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期三, 24 五月 2023 18:33:45 +0800
Subject: [PATCH] 迁移链接类型后台接口,修正属性字段,增加元数据查找应用范围功能

---
 Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/AttributeMapper.xml |   44 +++++++++++++++++++-------------------------
 1 files changed, 19 insertions(+), 25 deletions(-)

diff --git a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/AttributeMapper.xml b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/AttributeMapper.xml
index 7da922c..2baadc1 100644
--- a/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/AttributeMapper.xml
+++ b/Source/UBCS/ubcs-service/ubcs-omd/src/main/resources/mapper/AttributeMapper.xml
@@ -4,10 +4,9 @@
 
     <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 -->
     <resultMap id="baseResultMap" type="com.vci.ubcs.omd.entity.Attribute">
-        <id column="id" property="id"/>
-        <result column="tenant_id" property="tenantId"/>
-        <result column="key" property="key"/>
-        <result column="label" property="label"/>
+        <id column="oid" property="oid"/>
+        <result column="id" property="id"/>
+        <result column="name" property="name"/>
         <result column="type_code" property="typeCode"/>
         <result column="type_key" property="typeKey"/>
         <result column="hashtag" property="hashtag" jdbcType="VARCHAR"/>
@@ -23,13 +22,12 @@
         <result column="dict_code" property="dictCode"/>
         <result column="dict_key" property="dictKey"/>
         <result column="default_value" property="defaultValue"/>
-        <result column="status" property="status"/>
-        <result column="is_deleted" property="isDeleted"/>
-        <result column="create_user" property="createUser" jdbcType="VARCHAR"/>
-        <result column="create_dept" property="createDept" jdbcType="VARCHAR"/>
         <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
-        <result column="update_user" property="updateUser" jdbcType="VARCHAR"/>
-        <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
+        <result column="creator" property="creator" jdbcType="VARCHAR"/>
+        <result column="owner" property="owner" jdbcType="VARCHAR"/>
+        <result column="last_modifier" property="lastModifier" jdbcType="VARCHAR"/>
+        <result column="last_modify_time" property="lastModifyTime" jdbcType="TIMESTAMP"/>
+        <result column="btm_name" property="btmName" jdbcType="TIMESTAMP"/>
         <result column="ts" property="ts" jdbcType="TIMESTAMP"/>
     </resultMap>
 
@@ -38,9 +36,9 @@
     </resultMap>
 
     <sql id="base_query_column">
-        id, tenant_id ,key ,label ,type_code , type_key , hashtag , description, nullable , max_length, precision,
-            refer_type_code, refer_type_key, refer_to_id, refer_to_name, using_dict, dict_code, dict_key, default_value,
-            status, is_deleted, create_user, create_dept, create_time, update_user, update_time , ts
+        oid, id, name, type_code, type_key, hashtag, description, nullable, max_length, precision,
+            refer_type_code, refer_type_key, refer_to_id, refer_to_name, using_dict, dict_code, dict_key,
+            default_value, create_time, creator, owner, last_modifier, last_modify_time, btm_name, ts
     </sql>
     <sql id="tableName">
         pl_omd_attribute
@@ -51,18 +49,14 @@
         from
         <include refid="tableName"/>
     </select>
-    <select id="selectByPrimaryKeyCollection" resultMap="baseResultMap">
-        select DISTINCT <include refid="base_query_column" />
-        from <include refid="tableName"/>
-        <where>
-            <foreach collection="oids" item="item" index="arrayindex" open=" OID in ( " close=")" >
-                #{item,jdbcType=VARCHAR}
-                <if test="(arrayindex != oids.size() -1)">
-                    ,
-                </if>
-            </foreach>
-        </where>
+    <select id="selectApplyRange" resultType="com.vci.ubcs.omd.entity.BtmType">
+        select
+            btm.name,
+            btm.ID
+        from pl_omd_btm_type btm
+        join pl_omd_btm_type_attribute btmAttr on btmAttr.pk_btm_type = btm.oid
+        join <include refid="tableName"/> attr on attr.id = btmAttr.id
+        where attr.oid = #{oid}
     </select>
-
 
 </mapper>

--
Gitblit v1.9.3