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

211 lines
7.7 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.PanelShareMapper">
<resultMap id="BaseResultMap" type="io.dataease.base.domain.PanelShare">
<id column="share_id" jdbcType="BIGINT" property="shareId" />
<result column="panel_group_id" jdbcType="VARCHAR" property="panelGroupId" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="create_time" jdbcType="BIGINT" property="createTime" />
2021-03-17 18:50:29 +08:00
<result column="type" jdbcType="INTEGER" property="type" />
</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-03-17 18:50:29 +08:00
share_id, panel_group_id, user_id, create_time, `type`
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.PanelShareExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from panel_share
<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.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from panel_share
where share_id = #{shareId,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from panel_share
where share_id = #{shareId,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="io.dataease.base.domain.PanelShareExample">
delete from panel_share
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.PanelShare">
insert into panel_share (share_id, panel_group_id, user_id,
2021-03-17 18:50:29 +08:00
create_time, `type`)
values (#{shareId,jdbcType=BIGINT}, #{panelGroupId,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT},
2021-03-17 18:50:29 +08:00
#{createTime,jdbcType=BIGINT}, #{type,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="io.dataease.base.domain.PanelShare">
insert into panel_share
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="shareId != null">
share_id,
</if>
<if test="panelGroupId != null">
panel_group_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="createTime != null">
create_time,
</if>
2021-03-17 18:50:29 +08:00
<if test="type != null">
`type`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="shareId != null">
#{shareId,jdbcType=BIGINT},
</if>
<if test="panelGroupId != null">
#{panelGroupId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=BIGINT},
</if>
2021-03-17 18:50:29 +08:00
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="io.dataease.base.domain.PanelShareExample" resultType="java.lang.Long">
select count(*) from panel_share
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update panel_share
<set>
<if test="record.shareId != null">
share_id = #{record.shareId,jdbcType=BIGINT},
</if>
<if test="record.panelGroupId != null">
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=BIGINT},
</if>
2021-03-17 18:50:29 +08:00
<if test="record.type != null">
`type` = #{record.type,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update panel_share
set share_id = #{record.shareId,jdbcType=BIGINT},
panel_group_id = #{record.panelGroupId,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=BIGINT},
2021-03-17 18:50:29 +08:00
create_time = #{record.createTime,jdbcType=BIGINT},
`type` = #{record.type,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="io.dataease.base.domain.PanelShare">
update panel_share
<set>
<if test="panelGroupId != null">
panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=BIGINT},
</if>
2021-03-17 18:50:29 +08:00
<if test="type != null">
`type` = #{type,jdbcType=INTEGER},
</if>
</set>
where share_id = #{shareId,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="io.dataease.base.domain.PanelShare">
update panel_share
set panel_group_id = #{panelGroupId,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=BIGINT},
2021-03-17 18:50:29 +08:00
create_time = #{createTime,jdbcType=BIGINT},
`type` = #{type,jdbcType=INTEGER}
where share_id = #{shareId,jdbcType=BIGINT}
</update>
</mapper>