dataease-dm/backend/src/main/java/io/dataease/base/mapper/PanelViewLinkageFieldMapper.xml

211 lines
8.0 KiB
XML
Raw Normal View History

<?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="io.dataease.base.mapper.PanelViewLinkageFieldMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelViewLinkageField">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="linkage_id" jdbcType="VARCHAR" property="linkageId" />
2021-08-06 17:24:17 +08:00
<result column="source_field" jdbcType="VARCHAR" property="sourceField" />
<result column="target_field" jdbcType="VARCHAR" property="targetField" />
<result column="update_time" jdbcType="BIGINT" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
2021-08-06 17:24:17 +08:00
id, linkage_id, source_field, target_field, update_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelViewLinkageFieldExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from panel_view_linkage_field
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from panel_view_linkage_field
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from panel_view_linkage_field
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.PanelViewLinkageFieldExample">
delete from panel_view_linkage_field
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.PanelViewLinkageField">
2021-08-06 17:24:17 +08:00
insert into panel_view_linkage_field (id, linkage_id, source_field,
target_field, update_time)
values (#{id,jdbcType=VARCHAR}, #{linkageId,jdbcType=VARCHAR}, #{sourceField,jdbcType=VARCHAR},
#{targetField,jdbcType=VARCHAR}, #{updateTime,jdbcType=BIGINT})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelViewLinkageField">
insert into panel_view_linkage_field
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="linkageId != null">
linkage_id,
</if>
2021-08-06 17:24:17 +08:00
<if test="sourceField != null">
source_field,
</if>
2021-08-06 17:24:17 +08:00
<if test="targetField != null">
target_field,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="linkageId != null">
#{linkageId,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="sourceField != null">
#{sourceField,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="targetField != null">
#{targetField,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=BIGINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.PanelViewLinkageFieldExample" resultType="java.lang.Long">
select count(*) from panel_view_linkage_field
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update panel_view_linkage_field
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.linkageId != null">
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="record.sourceField != null">
source_field = #{record.sourceField,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="record.targetField != null">
target_field = #{record.targetField,jdbcType=VARCHAR},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=BIGINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update panel_view_linkage_field
set id = #{record.id,jdbcType=VARCHAR},
linkage_id = #{record.linkageId,jdbcType=VARCHAR},
2021-08-06 17:24:17 +08:00
source_field = #{record.sourceField,jdbcType=VARCHAR},
target_field = #{record.targetField,jdbcType=VARCHAR},
update_time = #{record.updateTime,jdbcType=BIGINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelViewLinkageField">
update panel_view_linkage_field
<set>
<if test="linkageId != null">
linkage_id = #{linkageId,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="sourceField != null">
source_field = #{sourceField,jdbcType=VARCHAR},
</if>
2021-08-06 17:24:17 +08:00
<if test="targetField != null">
target_field = #{targetField,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelViewLinkageField">
update panel_view_linkage_field
set linkage_id = #{linkageId,jdbcType=VARCHAR},
2021-08-06 17:24:17 +08:00
source_field = #{sourceField,jdbcType=VARCHAR},
target_field = #{targetField,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=BIGINT}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>