You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
244 lines
8.7 KiB
244 lines
8.7 KiB
<?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.ccsens.ht.persist.mapper.HtTitleMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.ht.bean.po.HtTitle">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="type" jdbcType="TINYINT" property="type" />
|
|
<result column="title" jdbcType="VARCHAR" property="title" />
|
|
<result column="superidor_id" jdbcType="BIGINT" property="superidorId" />
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
<result column="is_del" jdbcType="TINYINT" property="isDel" />
|
|
</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">
|
|
id, type, title, superidor_id, remark, create_time, update_time, is_del
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.ht.bean.po.HtTitleExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_ht_title
|
|
<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 t_ht_title
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_ht_title
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.ht.bean.po.HtTitleExample">
|
|
delete from t_ht_title
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.ht.bean.po.HtTitle">
|
|
insert into t_ht_title (id, type, title,
|
|
superidor_id, remark, create_time,
|
|
update_time, is_del)
|
|
values (#{id,jdbcType=BIGINT}, #{type,jdbcType=TINYINT}, #{title,jdbcType=VARCHAR},
|
|
#{superidorId,jdbcType=BIGINT}, #{remark,jdbcType=VARCHAR}, now(),
|
|
now(), 0)
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.ht.bean.po.HtTitle">
|
|
insert into t_ht_title
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="type != null">
|
|
type,
|
|
</if>
|
|
<if test="title != null">
|
|
title,
|
|
</if>
|
|
<if test="superidorId != null">
|
|
superidor_id,
|
|
</if>
|
|
<if test="remark != null">
|
|
remark,
|
|
</if>
|
|
create_time,
|
|
update_time,
|
|
is_del,
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="type != null">
|
|
#{type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="title != null">
|
|
#{title,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="superidorId != null">
|
|
#{superidorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="remark != null">
|
|
#{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
now(),now(),0,
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.ht.bean.po.HtTitleExample" resultType="java.lang.Long">
|
|
select count(*) from t_ht_title
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_ht_title
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.type != null">
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.title != null">
|
|
title = #{record.title,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.superidorId != null">
|
|
superidor_id = #{record.superidorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.remark != null">
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.isDel != null">
|
|
is_del = #{record.isDel,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_ht_title
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
type = #{record.type,jdbcType=TINYINT},
|
|
title = #{record.title,jdbcType=VARCHAR},
|
|
superidor_id = #{record.superidorId,jdbcType=BIGINT},
|
|
remark = #{record.remark,jdbcType=VARCHAR},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{record.isDel,jdbcType=TINYINT}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.ht.bean.po.HtTitle">
|
|
update t_ht_title
|
|
<set>
|
|
<if test="type != null">
|
|
type = #{type,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="title != null">
|
|
title = #{title,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="superidorId != null">
|
|
superidor_id = #{superidorId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="remark != null">
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="isDel != null">
|
|
is_del = #{isDel,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.ht.bean.po.HtTitle">
|
|
update t_ht_title
|
|
set type = #{type,jdbcType=TINYINT},
|
|
title = #{title,jdbcType=VARCHAR},
|
|
superidor_id = #{superidorId,jdbcType=BIGINT},
|
|
remark = #{remark,jdbcType=VARCHAR},
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
|
is_del = #{isDel,jdbcType=TINYINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|