|
|
@ -3,10 +3,9 @@ |
|
|
|
<mapper namespace="com.ccsens.health.persist.mapper.DepartmentMapper"> |
|
|
|
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.Department"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="weixin_id" jdbcType="VARCHAR" property="weixinId" /> |
|
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
|
<result column="name_en" jdbcType="VARCHAR" property="nameEn" /> |
|
|
|
<result column="parentid" jdbcType="VARCHAR" property="parentid" /> |
|
|
|
<result column="parentid" jdbcType="BIGINT" property="parentid" /> |
|
|
|
<result column="order" jdbcType="INTEGER" property="order" /> |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
|
@ -71,7 +70,7 @@ |
|
|
|
</where> |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, weixin_id, name, name_en, parentid, order, created_at, updated_at, rec_status |
|
|
|
id, name, name_en, parentid, order, created_at, updated_at, rec_status |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.DepartmentExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
@ -104,14 +103,12 @@ |
|
|
|
</if> |
|
|
|
</delete> |
|
|
|
<insert id="insert" parameterType="com.ccsens.health.bean.po.Department"> |
|
|
|
insert into t_department (id, weixin_id, name, |
|
|
|
name_en, parentid, order, |
|
|
|
created_at, updated_at, rec_status |
|
|
|
) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{weixinId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, |
|
|
|
#{nameEn,jdbcType=VARCHAR}, #{parentid,jdbcType=VARCHAR}, #{order,jdbcType=INTEGER}, |
|
|
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|
|
|
) |
|
|
|
insert into t_department (id, name, name_en, |
|
|
|
parentid, order, created_at, |
|
|
|
updated_at, rec_status) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{nameEn,jdbcType=VARCHAR}, |
|
|
|
#{parentid,jdbcType=BIGINT}, #{order,jdbcType=INTEGER}, #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Department"> |
|
|
|
insert into t_department |
|
|
@ -119,9 +116,6 @@ |
|
|
|
<if test="id != null"> |
|
|
|
id, |
|
|
|
</if> |
|
|
|
<if test="weixinId != null"> |
|
|
|
weixin_id, |
|
|
|
</if> |
|
|
|
<if test="name != null"> |
|
|
|
name, |
|
|
|
</if> |
|
|
@ -148,9 +142,6 @@ |
|
|
|
<if test="id != null"> |
|
|
|
#{id,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="weixinId != null"> |
|
|
|
#{weixinId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="name != null"> |
|
|
|
#{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
@ -158,7 +149,7 @@ |
|
|
|
#{nameEn,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="parentid != null"> |
|
|
|
#{parentid,jdbcType=VARCHAR}, |
|
|
|
#{parentid,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="order != null"> |
|
|
|
#{order,jdbcType=INTEGER}, |
|
|
@ -186,9 +177,6 @@ |
|
|
|
<if test="record.id != null"> |
|
|
|
id = #{record.id,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="record.weixinId != null"> |
|
|
|
weixin_id = #{record.weixinId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.name != null"> |
|
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
@ -196,7 +184,7 @@ |
|
|
|
name_en = #{record.nameEn,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="record.parentid != null"> |
|
|
|
parentid = #{record.parentid,jdbcType=VARCHAR}, |
|
|
|
parentid = #{record.parentid,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="record.order != null"> |
|
|
|
order = #{record.order,jdbcType=INTEGER}, |
|
|
@ -218,10 +206,9 @@ |
|
|
|
<update id="updateByExample" parameterType="map"> |
|
|
|
update t_department |
|
|
|
set id = #{record.id,jdbcType=BIGINT}, |
|
|
|
weixin_id = #{record.weixinId,jdbcType=VARCHAR}, |
|
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
|
name_en = #{record.nameEn,jdbcType=VARCHAR}, |
|
|
|
parentid = #{record.parentid,jdbcType=VARCHAR}, |
|
|
|
parentid = #{record.parentid,jdbcType=BIGINT}, |
|
|
|
order = #{record.order,jdbcType=INTEGER}, |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
|
@ -233,9 +220,6 @@ |
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Department"> |
|
|
|
update t_department |
|
|
|
<set> |
|
|
|
<if test="weixinId != null"> |
|
|
|
weixin_id = #{weixinId,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="name != null"> |
|
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
@ -243,7 +227,7 @@ |
|
|
|
name_en = #{nameEn,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
|
<if test="parentid != null"> |
|
|
|
parentid = #{parentid,jdbcType=VARCHAR}, |
|
|
|
parentid = #{parentid,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="order != null"> |
|
|
|
order = #{order,jdbcType=INTEGER}, |
|
|
@ -262,10 +246,9 @@ |
|
|
|
</update> |
|
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Department"> |
|
|
|
update t_department |
|
|
|
set weixin_id = #{weixinId,jdbcType=VARCHAR}, |
|
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
|
set name = #{name,jdbcType=VARCHAR}, |
|
|
|
name_en = #{nameEn,jdbcType=VARCHAR}, |
|
|
|
parentid = #{parentid,jdbcType=VARCHAR}, |
|
|
|
parentid = #{parentid,jdbcType=BIGINT}, |
|
|
|
order = #{order,jdbcType=INTEGER}, |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
|
|