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.
338 lines
12 KiB
338 lines
12 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.health.persist.mapper.EmployeeMapper">
|
|
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.Employee">
|
|
<id column="id" jdbcType="BIGINT" property="id" />
|
|
<result column="corpid" jdbcType="VARCHAR" property="corpid" />
|
|
<result column="userid" jdbcType="VARCHAR" property="userid" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="gender" jdbcType="TINYINT" property="gender" />
|
|
<result column="status" jdbcType="TINYINT" property="status" />
|
|
<result column="address" jdbcType="VARCHAR" property="address" />
|
|
<result column="hide_mobile" jdbcType="TINYINT" property="hideMobile" />
|
|
<result column="english_name" jdbcType="VARCHAR" property="englishName" />
|
|
<result column="tall_user_id" jdbcType="BIGINT" property="tallUserId" />
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
|
|
</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, corpid, userid, name, gender, status, address, hide_mobile, english_name, tall_user_id,
|
|
created_at, updated_at, rec_status
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.EmployeeExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from t_employee
|
|
<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_employee
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
delete from t_employee
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.ccsens.health.bean.po.EmployeeExample">
|
|
delete from t_employee
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.ccsens.health.bean.po.Employee">
|
|
insert into t_employee (id, corpid, userid,
|
|
name, gender, status,
|
|
address, hide_mobile, english_name,
|
|
tall_user_id, created_at, updated_at,
|
|
rec_status)
|
|
values (#{id,jdbcType=BIGINT}, #{corpid,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR},
|
|
#{name,jdbcType=VARCHAR}, #{gender,jdbcType=TINYINT}, #{status,jdbcType=TINYINT},
|
|
#{address,jdbcType=VARCHAR}, #{hideMobile,jdbcType=TINYINT}, #{englishName,jdbcType=VARCHAR},
|
|
#{tallUserId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
#{recStatus,jdbcType=TINYINT})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Employee">
|
|
insert into t_employee
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="corpid != null">
|
|
corpid,
|
|
</if>
|
|
<if test="userid != null">
|
|
userid,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="gender != null">
|
|
gender,
|
|
</if>
|
|
<if test="status != null">
|
|
status,
|
|
</if>
|
|
<if test="address != null">
|
|
address,
|
|
</if>
|
|
<if test="hideMobile != null">
|
|
hide_mobile,
|
|
</if>
|
|
<if test="englishName != null">
|
|
english_name,
|
|
</if>
|
|
<if test="tallUserId != null">
|
|
tall_user_id,
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at,
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at,
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="corpid != null">
|
|
#{corpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userid != null">
|
|
#{userid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gender != null">
|
|
#{gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="status != null">
|
|
#{status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="address != null">
|
|
#{address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hideMobile != null">
|
|
#{hideMobile,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="englishName != null">
|
|
#{englishName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="tallUserId != null">
|
|
#{tallUserId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
#{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
#{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
#{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.ccsens.health.bean.po.EmployeeExample" resultType="java.lang.Long">
|
|
select count(*) from t_employee
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update t_employee
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.corpid != null">
|
|
corpid = #{record.corpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.userid != null">
|
|
userid = #{record.userid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.gender != null">
|
|
gender = #{record.gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.status != null">
|
|
status = #{record.status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.address != null">
|
|
address = #{record.address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.hideMobile != null">
|
|
hide_mobile = #{record.hideMobile,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="record.englishName != null">
|
|
english_name = #{record.englishName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.tallUserId != null">
|
|
tall_user_id = #{record.tallUserId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="record.createdAt != null">
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.updatedAt != null">
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.recStatus != null">
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update t_employee
|
|
set id = #{record.id,jdbcType=BIGINT},
|
|
corpid = #{record.corpid,jdbcType=VARCHAR},
|
|
userid = #{record.userid,jdbcType=VARCHAR},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
gender = #{record.gender,jdbcType=TINYINT},
|
|
status = #{record.status,jdbcType=TINYINT},
|
|
address = #{record.address,jdbcType=VARCHAR},
|
|
hide_mobile = #{record.hideMobile,jdbcType=TINYINT},
|
|
english_name = #{record.englishName,jdbcType=VARCHAR},
|
|
tall_user_id = #{record.tallUserId,jdbcType=BIGINT},
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Employee">
|
|
update t_employee
|
|
<set>
|
|
<if test="corpid != null">
|
|
corpid = #{corpid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userid != null">
|
|
userid = #{userid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="gender != null">
|
|
gender = #{gender,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="status != null">
|
|
status = #{status,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="address != null">
|
|
address = #{address,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="hideMobile != null">
|
|
hide_mobile = #{hideMobile,jdbcType=TINYINT},
|
|
</if>
|
|
<if test="englishName != null">
|
|
english_name = #{englishName,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="tallUserId != null">
|
|
tall_user_id = #{tallUserId,jdbcType=BIGINT},
|
|
</if>
|
|
<if test="createdAt != null">
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="updatedAt != null">
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="recStatus != null">
|
|
rec_status = #{recStatus,jdbcType=TINYINT},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Employee">
|
|
update t_employee
|
|
set corpid = #{corpid,jdbcType=VARCHAR},
|
|
userid = #{userid,jdbcType=VARCHAR},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
gender = #{gender,jdbcType=TINYINT},
|
|
status = #{status,jdbcType=TINYINT},
|
|
address = #{address,jdbcType=VARCHAR},
|
|
hide_mobile = #{hideMobile,jdbcType=TINYINT},
|
|
english_name = #{englishName,jdbcType=VARCHAR},
|
|
tall_user_id = #{tallUserId,jdbcType=BIGINT},
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
rec_status = #{recStatus,jdbcType=TINYINT}
|
|
where id = #{id,jdbcType=BIGINT}
|
|
</update>
|
|
</mapper>
|