|
|
@ -8,6 +8,7 @@ |
|
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
|
|
<result column="project_id" jdbcType="BIGINT" property="projectId" /> |
|
|
|
</resultMap> |
|
|
|
<sql id="Example_Where_Clause"> |
|
|
|
<where> |
|
|
@ -68,7 +69,7 @@ |
|
|
|
</where> |
|
|
|
</sql> |
|
|
|
<sql id="Base_Column_List"> |
|
|
|
id, name, operator, created_at, updated_at, rec_status |
|
|
|
id, name, operator, created_at, updated_at, rec_status, project_id |
|
|
|
</sql> |
|
|
|
<select id="selectByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultMap="BaseResultMap"> |
|
|
|
select |
|
|
@ -101,20 +102,19 @@ |
|
|
|
</if> |
|
|
|
</delete> |
|
|
|
<insert id="insert" parameterType="com.ccsens.tcm.bean.po.Hospital"> |
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
|
|
|
SELECT LAST_INSERT_ID() |
|
|
|
</selectKey> |
|
|
|
insert into t_hospital (name, operator, created_at, |
|
|
|
updated_at, rec_status) |
|
|
|
values (#{name,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|
|
|
insert into t_hospital (id, name, operator, |
|
|
|
created_at, updated_at, rec_status, |
|
|
|
project_id) |
|
|
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, |
|
|
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}, |
|
|
|
#{projectId,jdbcType=BIGINT}) |
|
|
|
</insert> |
|
|
|
<insert id="insertSelective" parameterType="com.ccsens.tcm.bean.po.Hospital"> |
|
|
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
|
|
|
SELECT LAST_INSERT_ID() |
|
|
|
</selectKey> |
|
|
|
insert into t_hospital |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null"> |
|
|
|
id, |
|
|
|
</if> |
|
|
|
<if test="name != null"> |
|
|
|
name, |
|
|
|
</if> |
|
|
@ -130,8 +130,14 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
rec_status, |
|
|
|
</if> |
|
|
|
<if test="projectId != null"> |
|
|
|
project_id, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="id != null"> |
|
|
|
#{id,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
<if test="name != null"> |
|
|
|
#{name,jdbcType=VARCHAR}, |
|
|
|
</if> |
|
|
@ -147,6 +153,9 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
#{recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="projectId != null"> |
|
|
|
#{projectId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
</trim> |
|
|
|
</insert> |
|
|
|
<select id="countByExample" parameterType="com.ccsens.tcm.bean.po.HospitalExample" resultType="java.lang.Long"> |
|
|
@ -176,6 +185,9 @@ |
|
|
|
<if test="record.recStatus != null"> |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="record.projectId != null"> |
|
|
|
project_id = #{record.projectId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
@ -188,7 +200,8 @@ |
|
|
|
operator = #{record.operator,jdbcType=BIGINT}, |
|
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT}, |
|
|
|
project_id = #{record.projectId,jdbcType=BIGINT} |
|
|
|
<if test="_parameter != null"> |
|
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
|
</if> |
|
|
@ -211,6 +224,9 @@ |
|
|
|
<if test="recStatus != null"> |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
|
|
</if> |
|
|
|
<if test="projectId != null"> |
|
|
|
project_id = #{projectId,jdbcType=BIGINT}, |
|
|
|
</if> |
|
|
|
</set> |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</update> |
|
|
@ -220,7 +236,8 @@ |
|
|
|
operator = #{operator,jdbcType=BIGINT}, |
|
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT} |
|
|
|
rec_status = #{recStatus,jdbcType=TINYINT}, |
|
|
|
project_id = #{projectId,jdbcType=BIGINT} |
|
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
|
</update> |
|
|
|
</mapper> |