|
@ -1,7 +1,7 @@ |
|
|
<?xml version="1.0" encoding="UTF-8"?> |
|
|
<?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"> |
|
|
<!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.StudentMapper"> |
|
|
<mapper namespace="com.ccsens.health.persist.mapper.MemberMapper"> |
|
|
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.Student"> |
|
|
<resultMap id="BaseResultMap" type="com.ccsens.health.bean.po.Member"> |
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
<result column="wkno" jdbcType="VARCHAR" property="wkno" /> |
|
|
<result column="wkno" jdbcType="VARCHAR" property="wkno" /> |
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
|
@ -10,6 +10,7 @@ |
|
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
|
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
|
|
<result column="county" jdbcType="VARCHAR" property="county" /> |
|
|
<result column="county" jdbcType="VARCHAR" property="county" /> |
|
|
<result column="site" jdbcType="VARCHAR" property="site" /> |
|
|
<result column="site" jdbcType="VARCHAR" property="site" /> |
|
|
|
|
|
<result column="type" jdbcType="TINYINT" property="type" /> |
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" /> |
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
|
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" /> |
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
|
<result column="rec_status" jdbcType="TINYINT" property="recStatus" /> |
|
@ -73,16 +74,16 @@ |
|
|
</where> |
|
|
</where> |
|
|
</sql> |
|
|
</sql> |
|
|
<sql id="Base_Column_List"> |
|
|
<sql id="Base_Column_List"> |
|
|
id, wkno, name, department, province, city, county, site, created_at, updated_at, |
|
|
id, wkno, name, department, province, city, county, site, type, created_at, updated_at, |
|
|
rec_status |
|
|
rec_status |
|
|
</sql> |
|
|
</sql> |
|
|
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.StudentExample" resultMap="BaseResultMap"> |
|
|
<select id="selectByExample" parameterType="com.ccsens.health.bean.po.MemberExample" resultMap="BaseResultMap"> |
|
|
select |
|
|
select |
|
|
<if test="distinct"> |
|
|
<if test="distinct"> |
|
|
distinct |
|
|
distinct |
|
|
</if> |
|
|
</if> |
|
|
<include refid="Base_Column_List" /> |
|
|
<include refid="Base_Column_List" /> |
|
|
from t_student |
|
|
from t_member |
|
|
<if test="_parameter != null"> |
|
|
<if test="_parameter != null"> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
</if> |
|
|
</if> |
|
@ -93,31 +94,33 @@ |
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
|
|
select |
|
|
select |
|
|
<include refid="Base_Column_List" /> |
|
|
<include refid="Base_Column_List" /> |
|
|
from t_student |
|
|
from t_member |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
</select> |
|
|
</select> |
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
|
|
delete from t_student |
|
|
delete from t_member |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
</delete> |
|
|
</delete> |
|
|
<delete id="deleteByExample" parameterType="com.ccsens.health.bean.po.StudentExample"> |
|
|
<delete id="deleteByExample" parameterType="com.ccsens.health.bean.po.MemberExample"> |
|
|
delete from t_student |
|
|
delete from t_member |
|
|
<if test="_parameter != null"> |
|
|
<if test="_parameter != null"> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
</if> |
|
|
</if> |
|
|
</delete> |
|
|
</delete> |
|
|
<insert id="insert" parameterType="com.ccsens.health.bean.po.Student"> |
|
|
<insert id="insert" parameterType="com.ccsens.health.bean.po.Member"> |
|
|
insert into t_student (id, wkno, name, |
|
|
insert into t_member (id, wkno, name, |
|
|
department, province, city, |
|
|
department, province, city, |
|
|
county, site, created_at, |
|
|
county, site, type, |
|
|
updated_at, rec_status) |
|
|
created_at, updated_at, rec_status |
|
|
|
|
|
) |
|
|
values (#{id,jdbcType=BIGINT}, #{wkno,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, |
|
|
values (#{id,jdbcType=BIGINT}, #{wkno,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, |
|
|
#{department,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, |
|
|
#{department,jdbcType=VARCHAR}, #{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, |
|
|
#{county,jdbcType=VARCHAR}, #{site,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, |
|
|
#{county,jdbcType=VARCHAR}, #{site,jdbcType=VARCHAR}, #{type,jdbcType=TINYINT}, |
|
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
|
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
|
|
|
|
|
) |
|
|
</insert> |
|
|
</insert> |
|
|
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Student"> |
|
|
<insert id="insertSelective" parameterType="com.ccsens.health.bean.po.Member"> |
|
|
insert into t_student |
|
|
insert into t_member |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
<if test="id != null"> |
|
|
<if test="id != null"> |
|
|
id, |
|
|
id, |
|
@ -143,6 +146,9 @@ |
|
|
<if test="site != null"> |
|
|
<if test="site != null"> |
|
|
site, |
|
|
site, |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="type != null"> |
|
|
|
|
|
type, |
|
|
|
|
|
</if> |
|
|
<if test="createdAt != null"> |
|
|
<if test="createdAt != null"> |
|
|
created_at, |
|
|
created_at, |
|
|
</if> |
|
|
</if> |
|
@ -178,6 +184,9 @@ |
|
|
<if test="site != null"> |
|
|
<if test="site != null"> |
|
|
#{site,jdbcType=VARCHAR}, |
|
|
#{site,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="type != null"> |
|
|
|
|
|
#{type,jdbcType=TINYINT}, |
|
|
|
|
|
</if> |
|
|
<if test="createdAt != null"> |
|
|
<if test="createdAt != null"> |
|
|
#{createdAt,jdbcType=TIMESTAMP}, |
|
|
#{createdAt,jdbcType=TIMESTAMP}, |
|
|
</if> |
|
|
</if> |
|
@ -189,14 +198,14 @@ |
|
|
</if> |
|
|
</if> |
|
|
</trim> |
|
|
</trim> |
|
|
</insert> |
|
|
</insert> |
|
|
<select id="countByExample" parameterType="com.ccsens.health.bean.po.StudentExample" resultType="java.lang.Long"> |
|
|
<select id="countByExample" parameterType="com.ccsens.health.bean.po.MemberExample" resultType="java.lang.Long"> |
|
|
select count(*) from t_student |
|
|
select count(*) from t_member |
|
|
<if test="_parameter != null"> |
|
|
<if test="_parameter != null"> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
<include refid="Example_Where_Clause" /> |
|
|
</if> |
|
|
</if> |
|
|
</select> |
|
|
</select> |
|
|
<update id="updateByExampleSelective" parameterType="map"> |
|
|
<update id="updateByExampleSelective" parameterType="map"> |
|
|
update t_student |
|
|
update t_member |
|
|
<set> |
|
|
<set> |
|
|
<if test="record.id != null"> |
|
|
<if test="record.id != null"> |
|
|
id = #{record.id,jdbcType=BIGINT}, |
|
|
id = #{record.id,jdbcType=BIGINT}, |
|
@ -222,6 +231,9 @@ |
|
|
<if test="record.site != null"> |
|
|
<if test="record.site != null"> |
|
|
site = #{record.site,jdbcType=VARCHAR}, |
|
|
site = #{record.site,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="record.type != null"> |
|
|
|
|
|
type = #{record.type,jdbcType=TINYINT}, |
|
|
|
|
|
</if> |
|
|
<if test="record.createdAt != null"> |
|
|
<if test="record.createdAt != null"> |
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
</if> |
|
|
</if> |
|
@ -237,7 +249,7 @@ |
|
|
</if> |
|
|
</if> |
|
|
</update> |
|
|
</update> |
|
|
<update id="updateByExample" parameterType="map"> |
|
|
<update id="updateByExample" parameterType="map"> |
|
|
update t_student |
|
|
update t_member |
|
|
set id = #{record.id,jdbcType=BIGINT}, |
|
|
set id = #{record.id,jdbcType=BIGINT}, |
|
|
wkno = #{record.wkno,jdbcType=VARCHAR}, |
|
|
wkno = #{record.wkno,jdbcType=VARCHAR}, |
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
|
name = #{record.name,jdbcType=VARCHAR}, |
|
@ -246,6 +258,7 @@ |
|
|
city = #{record.city,jdbcType=VARCHAR}, |
|
|
city = #{record.city,jdbcType=VARCHAR}, |
|
|
county = #{record.county,jdbcType=VARCHAR}, |
|
|
county = #{record.county,jdbcType=VARCHAR}, |
|
|
site = #{record.site,jdbcType=VARCHAR}, |
|
|
site = #{record.site,jdbcType=VARCHAR}, |
|
|
|
|
|
type = #{record.type,jdbcType=TINYINT}, |
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
created_at = #{record.createdAt,jdbcType=TIMESTAMP}, |
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
|
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, |
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
|
rec_status = #{record.recStatus,jdbcType=TINYINT} |
|
@ -253,8 +266,8 @@ |
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
<include refid="Update_By_Example_Where_Clause" /> |
|
|
</if> |
|
|
</if> |
|
|
</update> |
|
|
</update> |
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Student"> |
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.health.bean.po.Member"> |
|
|
update t_student |
|
|
update t_member |
|
|
<set> |
|
|
<set> |
|
|
<if test="wkno != null"> |
|
|
<if test="wkno != null"> |
|
|
wkno = #{wkno,jdbcType=VARCHAR}, |
|
|
wkno = #{wkno,jdbcType=VARCHAR}, |
|
@ -277,6 +290,9 @@ |
|
|
<if test="site != null"> |
|
|
<if test="site != null"> |
|
|
site = #{site,jdbcType=VARCHAR}, |
|
|
site = #{site,jdbcType=VARCHAR}, |
|
|
</if> |
|
|
</if> |
|
|
|
|
|
<if test="type != null"> |
|
|
|
|
|
type = #{type,jdbcType=TINYINT}, |
|
|
|
|
|
</if> |
|
|
<if test="createdAt != null"> |
|
|
<if test="createdAt != null"> |
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
</if> |
|
|
</if> |
|
@ -289,8 +305,8 @@ |
|
|
</set> |
|
|
</set> |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
where id = #{id,jdbcType=BIGINT} |
|
|
</update> |
|
|
</update> |
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Student"> |
|
|
<update id="updateByPrimaryKey" parameterType="com.ccsens.health.bean.po.Member"> |
|
|
update t_student |
|
|
update t_member |
|
|
set wkno = #{wkno,jdbcType=VARCHAR}, |
|
|
set wkno = #{wkno,jdbcType=VARCHAR}, |
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
name = #{name,jdbcType=VARCHAR}, |
|
|
department = #{department,jdbcType=VARCHAR}, |
|
|
department = #{department,jdbcType=VARCHAR}, |
|
@ -298,6 +314,7 @@ |
|
|
city = #{city,jdbcType=VARCHAR}, |
|
|
city = #{city,jdbcType=VARCHAR}, |
|
|
county = #{county,jdbcType=VARCHAR}, |
|
|
county = #{county,jdbcType=VARCHAR}, |
|
|
site = #{site,jdbcType=VARCHAR}, |
|
|
site = #{site,jdbcType=VARCHAR}, |
|
|
|
|
|
type = #{type,jdbcType=TINYINT}, |
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
|
|
rec_status = #{recStatus,jdbcType=TINYINT} |
|
|
rec_status = #{recStatus,jdbcType=TINYINT} |