迭代 注册方法1.1
parent
3805218b67
commit
42ea8852f1
|
@ -181,13 +181,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
|
||||
<!--添加患者或者医生公用这个动态sql-->
|
||||
<insert id="insertNewUser">
|
||||
<insert id="insertNewUser" useGeneratedKeys="true" keyProperty="patientId" >
|
||||
|
||||
<choose>
|
||||
<when test="roleId==1">
|
||||
insert into tb_patient(
|
||||
<if test="patientId!=null"> patient_id,</if>
|
||||
<if test="patientName!=null and patientName!=''">patient_name,</if>
|
||||
<if test="name!=null and name!=''">patient_name,</if>
|
||||
<if test="password!=null and password!=''">patient_password,</if>
|
||||
<if test="email!=null and email!=''">patient_email,</if>
|
||||
<if test="inviteCode!=null and inviteCode!=''">invite_code,</if>
|
||||
|
@ -201,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
values
|
||||
(
|
||||
<if test="patientId!=null"> #{patientId},</if>
|
||||
<if test="patientName!=null and patientName!=''">#{name},</if>
|
||||
<if test="name!=null and name!=''">#{name},</if>
|
||||
<if test="password!=null and password!=''">#{password},</if>
|
||||
<if test="email!=null and email!=''">#{email},</if>
|
||||
<if test="inviteCode!=null and inviteCode!=''">#{inviteCode},</if>
|
||||
|
@ -217,7 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
insert into tb_doctor
|
||||
(
|
||||
<if test="doctorId!=null"> doctor_id,</if>
|
||||
<if test="doctorName!=null and doctorName!=''">doctor_name,</if>
|
||||
<if test="name!=null and name!=''">doctor_name,</if>
|
||||
<if test="password!=null and password!=''">password,</if>
|
||||
<if test="email!=null and email!=''">email,</if>
|
||||
<if test="hospital!=null and hospital!=''">hospital,</if>
|
||||
|
|
Loading…
Reference in New Issue