|
@@ -1,153 +0,0 @@
|
|
|
-<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
-<!DOCTYPE mapper
|
|
|
-PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
-"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<mapper namespace="com.kgraph.graph.knowledge.mapper.EntityClassAttributeMapper">
|
|
|
-
|
|
|
- <resultMap type="EntityClassAttribute" id="EntityClassAttributeResult">
|
|
|
- <result property="attrClsID" column="attr_cls_id" />
|
|
|
- <result property="attrClsName" column="attr_cls_name" />
|
|
|
- <result property="attrUnit" column="attr_unit" />
|
|
|
- <result property="entAndAttrType" column="ent_and_attr_type" />
|
|
|
- <result property="attrType" column="attr_type" />
|
|
|
- <result property="entClsID" column="ent_cls_id" />
|
|
|
- <result property="attrClsMemo" column="attr_cls_memo" />
|
|
|
- <result property="valueType" column="value_type" />
|
|
|
- <result property="attrValueType" column="attr_value_type" />
|
|
|
- <result property="domainKey" column="domain_key" />
|
|
|
- <result property="domain" column="domain" />
|
|
|
- <result property="isPublic" column="is_public" />
|
|
|
- <result property="maxValue" column="max_value" />
|
|
|
- <result property="minValue" column="min_value" />
|
|
|
- <result property="notNull" column="not_null" />
|
|
|
- <result property="entUseCount" column="ent_use_count" />
|
|
|
- <result property="isEdit" column="is_edit" />
|
|
|
- <result property="createBy" column="create_by" />
|
|
|
- <result property="createTime" column="create_time" />
|
|
|
- <result property="updateBy" column="update_by" />
|
|
|
- <result property="updateTime" column="update_time" />
|
|
|
- </resultMap>
|
|
|
-
|
|
|
- <sql id="selectEntityClassAttributeVo">
|
|
|
- select attr_cls_id, attr_cls_name, attr_unit, ent_and_attr_type, attr_type, ent_cls_id, attr_cls_memo, value_type, attr_value_type, domain_key, domain, is_public, max_value, min_value, not_null, ent_use_count, is_edit, create_by, create_time, update_by, update_time from entity_class_attribute
|
|
|
- </sql>
|
|
|
-
|
|
|
- <select id="selectEntityClassAttributeList" parameterType="EntityClassAttribute" resultMap="EntityClassAttributeResult">
|
|
|
- <include refid="selectEntityClassAttributeVo"/>
|
|
|
- <where>
|
|
|
- <if test="attrClsName != null and attrClsName != ''"> and attr_cls_name like concat('%', #{attrClsName}, '%')</if>
|
|
|
- <if test="attrUnit != null and attrUnit != ''"> and attr_unit = #{attrUnit}</if>
|
|
|
- <if test="entAndAttrType != null and entAndAttrType != ''"> and ent_and_attr_type = #{entAndAttrType}</if>
|
|
|
- <if test="attrType != null and attrType != ''"> and attr_type = #{attrType}</if>
|
|
|
- <if test="entClsID != null and entClsID != ''"> and ent_cls_id = #{entClsID}</if>
|
|
|
- <if test="attrClsMemo != null and attrClsMemo != ''"> and attr_cls_memo = #{attrClsMemo}</if>
|
|
|
- <if test="valueType != null and valueType != ''"> and value_type = #{valueType}</if>
|
|
|
- <if test="attrValueType != null and attrValueType != ''"> and attr_value_type = #{attrValueType}</if>
|
|
|
- <if test="domainKey != null and domainKey != ''"> and domain_key = #{domainKey}</if>
|
|
|
- <if test="domain != null and domain != ''"> and domain = #{domain}</if>
|
|
|
- <if test="isPublic != null "> and is_public = #{isPublic}</if>
|
|
|
- <if test="maxValue != null and maxValue != ''"> and max_value = #{maxValue}</if>
|
|
|
- <if test="minValue != null and minValue != ''"> and min_value = #{minValue}</if>
|
|
|
- <if test="notNull != null "> and not_null = #{notNull}</if>
|
|
|
- <if test="entUseCount != null "> and ent_use_count = #{entUseCount}</if>
|
|
|
- <if test="isEdit != null and isEdit != ''"> and is_edit = #{isEdit}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <select id="selectEntityClassAttributeByAttrClsId" parameterType="String" resultMap="EntityClassAttributeResult">
|
|
|
- <include refid="selectEntityClassAttributeVo"/>
|
|
|
- where attr_cls_id = #{attrClsID}
|
|
|
- </select>
|
|
|
-
|
|
|
- <insert id="insertEntityClassAttribute" parameterType="EntityClassAttribute">
|
|
|
- insert into entity_class_attribute
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="attrClsID != null">attr_cls_id,</if>
|
|
|
- <if test="attrClsName != null">attr_cls_name,</if>
|
|
|
- <if test="attrUnit != null">attr_unit,</if>
|
|
|
- <if test="entAndAttrType != null">ent_and_attr_type,</if>
|
|
|
- <if test="attrType != null">attr_type,</if>
|
|
|
- <if test="entClsID != null">ent_cls_id,</if>
|
|
|
- <if test="attrClsMemo != null">attr_cls_memo,</if>
|
|
|
- <if test="valueType != null">value_type,</if>
|
|
|
- <if test="attrValueType != null">attr_value_type,</if>
|
|
|
- <if test="domainKey != null">domain_key,</if>
|
|
|
- <if test="domain != null">domain,</if>
|
|
|
- <if test="isPublic != null">is_public,</if>
|
|
|
- <if test="maxValue != null">max_value,</if>
|
|
|
- <if test="minValue != null">min_value,</if>
|
|
|
- <if test="notNull != null">not_null,</if>
|
|
|
- <if test="entUseCount != null">ent_use_count,</if>
|
|
|
- <if test="isEdit != null">is_edit,</if>
|
|
|
- <if test="createBy != null">create_by,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="updateBy != null">update_by,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="attrClsID != null">#{attrClsID},</if>
|
|
|
- <if test="attrClsName != null">#{attrClsName},</if>
|
|
|
- <if test="attrUnit != null">#{attrUnit},</if>
|
|
|
- <if test="entAndAttrType != null">#{entAndAttrType},</if>
|
|
|
- <if test="attrType != null">#{attrType},</if>
|
|
|
- <if test="entClsID != null">#{entClsID},</if>
|
|
|
- <if test="attrClsMemo != null">#{attrClsMemo},</if>
|
|
|
- <if test="valueType != null">#{valueType},</if>
|
|
|
- <if test="attrValueType != null">#{attrValueType},</if>
|
|
|
- <if test="domainKey != null">#{domainKey},</if>
|
|
|
- <if test="domain != null">#{domain},</if>
|
|
|
- <if test="isPublic != null">#{isPublic},</if>
|
|
|
- <if test="maxValue != null">#{maxValue},</if>
|
|
|
- <if test="minValue != null">#{minValue},</if>
|
|
|
- <if test="notNull != null">#{notNull},</if>
|
|
|
- <if test="entUseCount != null">#{entUseCount},</if>
|
|
|
- <if test="isEdit != null">#{isEdit},</if>
|
|
|
- <if test="createBy != null">#{createBy},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="updateBy != null">#{updateBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
-
|
|
|
- <update id="updateEntityClassAttribute" parameterType="EntityClassAttribute">
|
|
|
- update entity_class_attribute
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="attrClsName != null">attr_cls_name = #{attrClsName},</if>
|
|
|
- <if test="attrUnit != null">attr_unit = #{attrUnit},</if>
|
|
|
- <if test="entAndAttrType != null">ent_and_attr_type = #{entAndAttrType},</if>
|
|
|
- <if test="attrType != null">attr_type = #{attrType},</if>
|
|
|
- <if test="entClsID != null">ent_cls_id = #{entClsID},</if>
|
|
|
- <if test="attrClsMemo != null">attr_cls_memo = #{attrClsMemo},</if>
|
|
|
- <if test="valueType != null">value_type = #{valueType},</if>
|
|
|
- <if test="attrValueType != null">attr_value_type = #{attrValueType},</if>
|
|
|
- <if test="domainKey != null">domain_key = #{domainKey},</if>
|
|
|
- <if test="domain != null">domain = #{domain},</if>
|
|
|
- <if test="isPublic != null">is_public = #{isPublic},</if>
|
|
|
- <if test="maxValue != null">max_value = #{maxValue},</if>
|
|
|
- <if test="minValue != null">min_value = #{minValue},</if>
|
|
|
- <if test="notNull != null">not_null = #{notNull},</if>
|
|
|
- <if test="entUseCount != null">ent_use_count = #{entUseCount},</if>
|
|
|
- <if test="isEdit != null">is_edit = #{isEdit},</if>
|
|
|
- <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
- </trim>
|
|
|
- where attr_cls_id = #{attrClsID}
|
|
|
- </update>
|
|
|
-
|
|
|
- <delete id="deleteEntityClassAttributeByAttrClsId" parameterType="String">
|
|
|
- delete from entity_class_attribute where attr_cls_id = #{attrClsID}
|
|
|
- </delete>
|
|
|
-
|
|
|
- <delete id="deleteEntityClassAttributeByAttrClsIds" parameterType="String">
|
|
|
- delete from entity_class_attribute where attr_cls_id in
|
|
|
- <foreach item="attrClsID" collection="array" open="(" separator="," close=")">
|
|
|
- #{attrClsID}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
- <select id="selectNoneEntityClassAttributeByEntClsID" parameterType="String" resultMap="EntityClassAttributeResult">
|
|
|
- <include refid="selectEntityClassAttributeVo"/>
|
|
|
- where (attr_type is null or attr_type = 'NONE') and ent_cls_id = #{entClsID}
|
|
|
- </select>
|
|
|
-</mapper>
|