|
|
@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<resultMap type="TDoctor" id="TDoctorResult">
|
|
|
|
<resultMap type="TDoctor" id="TDoctorResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="openId" column="open_id" />
|
|
|
|
<result property="openId" column="open_id" />
|
|
|
|
|
|
|
|
<result property="userId" column="user_id" />
|
|
|
|
<result property="identifier" column="identifier" />
|
|
|
|
<result property="identifier" column="identifier" />
|
|
|
|
<result property="name" column="name" />
|
|
|
|
<result property="name" column="name" />
|
|
|
|
<result property="phone" column="phone" />
|
|
|
|
<result property="phone" column="phone" />
|
|
|
@ -16,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<result property="title" column="title" />
|
|
|
|
<result property="title" column="title" />
|
|
|
|
<result property="speciality" column="speciality" />
|
|
|
|
<result property="speciality" column="speciality" />
|
|
|
|
<result property="introduction" column="introduction" />
|
|
|
|
<result property="introduction" column="introduction" />
|
|
|
|
|
|
|
|
<result property="medicalLicense" column="medical_license" />
|
|
|
|
<result property="hospitalId" column="hospital_id" />
|
|
|
|
<result property="hospitalId" column="hospital_id" />
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
|
<result property="createTime" column="create_time" />
|
|
|
@ -23,13 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectTDoctorVo">
|
|
|
|
<sql id="selectTDoctorVo">
|
|
|
|
select id, open_id, identifier, name, phone, sex, age, marriage, title, speciality, introduction, hospital_id, del_flag, create_time, update_time from t_doctor
|
|
|
|
select id, open_id, user_id, identifier, name, phone, sex, age, marriage, title, speciality, introduction, medical_license, hospital_id, del_flag, create_time, update_time from t_doctor
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectTDoctorList" parameterType="TDoctor" resultMap="TDoctorResult">
|
|
|
|
<select id="selectTDoctorList" parameterType="TDoctor" resultMap="TDoctorResult">
|
|
|
|
<include refid="selectTDoctorVo"/>
|
|
|
|
<include refid="selectTDoctorVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
|
|
|
|
<if test="openId != null and openId != ''"> and open_id = #{openId}</if>
|
|
|
|
|
|
|
|
<if test="userId != null "> and user_id = #{userId}</if>
|
|
|
|
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
|
|
|
|
<if test="identifier != null and identifier != ''"> and identifier = #{identifier}</if>
|
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
@ -39,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
|
<if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if>
|
|
|
|
<if test="speciality != null and speciality != ''"> and speciality = #{speciality}</if>
|
|
|
|
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
|
|
|
|
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
|
|
|
|
|
|
|
|
<if test="medicalLicense != null and medicalLicense != ''"> and medical_license = #{medicalLicense}</if>
|
|
|
|
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
|
|
|
|
<if test="hospitalId != null "> and hospital_id = #{hospitalId}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -52,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
insert into t_doctor
|
|
|
|
insert into t_doctor
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="openId != null">open_id,</if>
|
|
|
|
<if test="openId != null">open_id,</if>
|
|
|
|
|
|
|
|
<if test="userId != null">user_id,</if>
|
|
|
|
<if test="identifier != null">identifier,</if>
|
|
|
|
<if test="identifier != null">identifier,</if>
|
|
|
|
<if test="name != null and name != ''">name,</if>
|
|
|
|
<if test="name != null and name != ''">name,</if>
|
|
|
|
<if test="phone != null">phone,</if>
|
|
|
|
<if test="phone != null">phone,</if>
|
|
|
@ -61,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="title != null">title,</if>
|
|
|
|
<if test="title != null">title,</if>
|
|
|
|
<if test="speciality != null">speciality,</if>
|
|
|
|
<if test="speciality != null">speciality,</if>
|
|
|
|
<if test="introduction != null">introduction,</if>
|
|
|
|
<if test="introduction != null">introduction,</if>
|
|
|
|
|
|
|
|
<if test="medicalLicense != null">medical_license,</if>
|
|
|
|
<if test="hospitalId != null">hospital_id,</if>
|
|
|
|
<if test="hospitalId != null">hospital_id,</if>
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
@ -68,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</trim>
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="openId != null">#{openId},</if>
|
|
|
|
<if test="openId != null">#{openId},</if>
|
|
|
|
|
|
|
|
<if test="userId != null">#{userId},</if>
|
|
|
|
<if test="identifier != null">#{identifier},</if>
|
|
|
|
<if test="identifier != null">#{identifier},</if>
|
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
|
<if test="name != null and name != ''">#{name},</if>
|
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
@ -77,6 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="title != null">#{title},</if>
|
|
|
|
<if test="title != null">#{title},</if>
|
|
|
|
<if test="speciality != null">#{speciality},</if>
|
|
|
|
<if test="speciality != null">#{speciality},</if>
|
|
|
|
<if test="introduction != null">#{introduction},</if>
|
|
|
|
<if test="introduction != null">#{introduction},</if>
|
|
|
|
|
|
|
|
<if test="medicalLicense != null">#{medicalLicense},</if>
|
|
|
|
<if test="hospitalId != null">#{hospitalId},</if>
|
|
|
|
<if test="hospitalId != null">#{hospitalId},</if>
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
@ -88,6 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
update t_doctor
|
|
|
|
update t_doctor
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="openId != null">open_id = #{openId},</if>
|
|
|
|
<if test="openId != null">open_id = #{openId},</if>
|
|
|
|
|
|
|
|
<if test="userId != null">user_id = #{userId},</if>
|
|
|
|
<if test="identifier != null">identifier = #{identifier},</if>
|
|
|
|
<if test="identifier != null">identifier = #{identifier},</if>
|
|
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
|
|
<if test="name != null and name != ''">name = #{name},</if>
|
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
|
@ -97,6 +106,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="title != null">title = #{title},</if>
|
|
|
|
<if test="title != null">title = #{title},</if>
|
|
|
|
<if test="speciality != null">speciality = #{speciality},</if>
|
|
|
|
<if test="speciality != null">speciality = #{speciality},</if>
|
|
|
|
<if test="introduction != null">introduction = #{introduction},</if>
|
|
|
|
<if test="introduction != null">introduction = #{introduction},</if>
|
|
|
|
|
|
|
|
<if test="medicalLicense != null">medical_license = #{medicalLicense},</if>
|
|
|
|
<if test="hospitalId != null">hospital_id = #{hospitalId},</if>
|
|
|
|
<if test="hospitalId != null">hospital_id = #{hospitalId},</if>
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|