|
|
|
@@ -0,0 +1,188 @@ |
|
|
|
<?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.ruoyi.platform.mapper.kg.KgEntityInfoMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.ruoyi.platform.domain.kg.KgEntityInfo"> |
|
|
|
<id column="id" jdbcType="INTEGER" property="id" /> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
|
<result column="description" jdbcType="VARCHAR" property="description" /> |
|
|
|
<result column="bk_color" jdbcType="VARCHAR" property="bkColor" /> |
|
|
|
<result column="display_x" jdbcType="INTEGER" property="displayX" /> |
|
|
|
<result column="display_y" jdbcType="INTEGER" property="displayY" /> |
|
|
|
<result column="icon" jdbcType="VARCHAR" property="icon" /> |
|
|
|
<result column="ontology_id" jdbcType="INTEGER" property="ontologyId" /> |
|
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
|
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
|
|
|
<result column="del_flag" jdbcType="CHAR" property="delFlag" /> |
|
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
|
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
|
|
|
</resultMap> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, `name`, description, bk_color, display_x, display_y, icon, ontology_id, create_time, |
|
|
|
update_time, del_flag, create_by, update_by |
|
|
|
</sql> |
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="Base_Column_List" /> |
|
|
|
from kg_entity_info |
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
</select> |
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> |
|
|
|
delete from kg_entity_info |
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
</delete> |
|
|
|
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.platform.domain.kg.KgEntityInfo" useGeneratedKeys="true"> |
|
|
|
insert into kg_entity_info (`name`, description, bk_color, |
|
|
|
display_x, display_y, icon, |
|
|
|
ontology_id, create_time, update_time, |
|
|
|
del_flag, create_by, update_by |
|
|
|
) |
|
|
|
values (#{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, #{bkColor,jdbcType=VARCHAR}, |
|
|
|
#{displayX,jdbcType=INTEGER}, #{displayY,jdbcType=INTEGER}, #{icon,jdbcType=VARCHAR}, |
|
|
|
#{ontologyId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
#{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR} |
|
|
|
) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.ruoyi.platform.domain.kg.KgEntityInfo" useGeneratedKeys="true"> |
|
|
|
insert into kg_entity_info |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="name != null"> |
|
|
|
`name`, |
|
|
|
</if> |
|
|
|
<if test="description != null"> |
|
|
|
description, |
|
|
|
</if> |
|
|
|
<if test="bkColor != null"> |
|
|
|
bk_color, |
|
|
|
</if> |
|
|
|
<if test="displayX != null"> |
|
|
|
display_x, |
|
|
|
</if> |
|
|
|
<if test="displayY != null"> |
|
|
|
display_y, |
|
|
|
</if> |
|
|
|
<if test="icon != null"> |
|
|
|
icon, |
|
|
|
</if> |
|
|
|
<if test="ontologyId != null"> |
|
|
|
ontology_id, |
|
|
|
</if> |
|
|
|
<if test="createTime != null"> |
|
|
|
create_time, |
|
|
|
</if> |
|
|
|
<if test="updateTime != null"> |
|
|
|
update_time, |
|
|
|
</if> |
|
|
|
<if test="delFlag != null"> |
|
|
|
del_flag, |
|
|
|
</if> |
|
|
|
<if test="createBy != null"> |
|
|
|
create_by, |
|
|
|
</if> |
|
|
|
<if test="updateBy != null"> |
|
|
|
update_by, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="name != null"> |
|
|
|
#{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="description != null"> |
|
|
|
#{description,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="bkColor != null"> |
|
|
|
#{bkColor,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="displayX != null"> |
|
|
|
#{displayX,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="displayY != null"> |
|
|
|
#{displayY,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="icon != null"> |
|
|
|
#{icon,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="ontologyId != null"> |
|
|
|
#{ontologyId,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="createTime != null"> |
|
|
|
#{createTime,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="updateTime != null"> |
|
|
|
#{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="delFlag != null"> |
|
|
|
#{delFlag,jdbcType=CHAR}, |
|
|
|
</if> |
|
|
|
<if test="createBy != null"> |
|
|
|
#{createBy,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="updateBy != null"> |
|
|
|
#{updateBy,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ruoyi.platform.domain.kg.KgEntityInfo"> |
|
|
|
update kg_entity_info |
|
|
|
<set> |
|
|
|
<if test="name != null"> |
|
|
|
`name` = #{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="description != null"> |
|
|
|
description = #{description,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="bkColor != null"> |
|
|
|
bk_color = #{bkColor,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="displayX != null"> |
|
|
|
display_x = #{displayX,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="displayY != null"> |
|
|
|
display_y = #{displayY,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="icon != null"> |
|
|
|
icon = #{icon,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="ontologyId != null"> |
|
|
|
ontology_id = #{ontologyId,jdbcType=INTEGER}, |
|
|
|
</if> |
|
|
|
<if test="createTime != null"> |
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="updateTime != null"> |
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
</if> |
|
|
|
<if test="delFlag != null"> |
|
|
|
del_flag = #{delFlag,jdbcType=CHAR}, |
|
|
|
</if> |
|
|
|
<if test="createBy != null"> |
|
|
|
create_by = #{createBy,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="updateBy != null"> |
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ruoyi.platform.domain.kg.KgEntityInfo"> |
|
|
|
update kg_entity_info |
|
|
|
set `name` = #{name,jdbcType=VARCHAR}, |
|
|
|
description = #{description,jdbcType=VARCHAR}, |
|
|
|
bk_color = #{bkColor,jdbcType=VARCHAR}, |
|
|
|
display_x = #{displayX,jdbcType=INTEGER}, |
|
|
|
display_y = #{displayY,jdbcType=INTEGER}, |
|
|
|
icon = #{icon,jdbcType=VARCHAR}, |
|
|
|
ontology_id = #{ontologyId,jdbcType=INTEGER}, |
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
|
|
|
del_flag = #{delFlag,jdbcType=CHAR}, |
|
|
|
create_by = #{createBy,jdbcType=VARCHAR}, |
|
|
|
update_by = #{updateBy,jdbcType=VARCHAR} |
|
|
|
where id = #{id,jdbcType=INTEGER} |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="selectList" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
|
<include refid="Base_Column_List" /> |
|
|
|
from kg_entity_info |
|
|
|
</select> |
|
|
|
</mapper> |