| | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="baseResultMap" type="com.vci.ubcs.omd.entity.Attribute"> |
| | | <id column="id" property="id"/> |
| | | <result column="create_user" property="createUser"/> |
| | | <result column="create_dept" property="createDept"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_user" property="updateUser"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="status" property="status"/> |
| | | <result column="is_deleted" property="isDeleted"/> |
| | | <result column="tenant_id" property="tenantId"/> |
| | | <result column="key" property="key"/> |
| | | <result column="label" property="label"/> |
| | | <result column="create_user" property="createUser" jdbcType="NUMERIC"/> |
| | | <result column="create_dept" property="createDept" jdbcType="NUMERIC"/> |
| | | <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/> |
| | | <result column="update_user" property="updateUser" jdbcType="NUMERIC"/> |
| | | <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> |
| | | <result column="status" property="status" jdbcType="NUMERIC"/> |
| | | <result column="is_deleted" property="isDeleted" jdbcType="NUMERIC"/> |
| | | <result column="tenant_id" property="tenantId" jdbcType="NUMERIC"/> |
| | | <result column="key" property="key" jdbcType="VARCHAR"/> |
| | | <result column="label" property="label" jdbcType="VARCHAR"/> |
| | | <result column="type_code" property="typeCode"/> |
| | | <result column="type_key" property="typeKey"/> |
| | | <result column="hashtag" property="hashtag" jdbcType="VARCHAR"/> |
| | | <result column="description" property="description" jdbcType="VARCHAR"/> |
| | | <result column="nullable" property="nullable"/> |
| | | <result column="max_length" property="maxLength"/> |
| | | <result column="precision" property="precision"/> |
| | | <result column="refer_type_code" property="referTypeCode"/> |
| | | <result column="refer_type_key" property="referTypeKey"/> |
| | | <result column="refer_to_id" property="referToId" jdbcType="VARCHAR"/> |
| | | <result column="refer_to_name" property="referToName"/> |
| | | <result column="using_dict" property="usingDict"/> |
| | | <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="ts" property="ts" jdbcType="TIMESTAMP"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="extraResultMap" type="com.vci.ubcs.omd.entity.Attribute"> |
| | | <result column="nullable" property="nullable" jdbcType="VARCHAR"/> |
| | | <result column="max_length" property="maxLength" jdbcType="NUMERIC"/> |
| | | <result column="precision" property="precision" jdbcType="NUMERIC"/> |
| | | <result column="refer_to_id" property="referToId" jdbcType="NUMERIC"/> |
| | | <result column="refer_type_code" property="referTypeCode" jdbcType="VARCHAR"/> |
| | | <result column="refer_type_key" property="referTypeKey" jdbcType="VARCHAR"/> |
| | | <result column="refer_to_name" property="referToName" jdbcType="VARCHAR"/> |
| | | <!-- <result column="using_dict" property="usingDict" jdbcType="VARCHAR"/>--> |
| | | <!-- <result column="dict_code" property="dictCode" jdbcType="VARCHAR"/>--> |
| | | <!-- <result column="dict_key" property="dictKey" jdbcType="VARCHAR"/>--> |
| | | <result column="default_value" property="defaultValue" jdbcType="VARCHAR"/> |
| | | |
| | | </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 |
| | | </sql> |
| | | <sql id="tableName"> |
| | | pl_omd_attribute |
| | | </sql> |
| | | <select id="selectAll" resultMap="baseResultMap"> |
| | | select |
| | | <include refid="base_query_column"/> |
| | | 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> |
| | | |
| | | |
| | | </mapper> |