迭代 注册方法1.1

master
冯凯 2023-10-20 20:31:58 +08:00
parent 3805218b67
commit 42ea8852f1
1 changed files with 4 additions and 4 deletions

View File

@ -181,13 +181,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--添加患者或者医生公用这个动态sql--> <!--添加患者或者医生公用这个动态sql-->
<insert id="insertNewUser"> <insert id="insertNewUser" useGeneratedKeys="true" keyProperty="patientId" >
<choose> <choose>
<when test="roleId==1"> <when test="roleId==1">
insert into tb_patient( insert into tb_patient(
<if test="patientId!=null"> patient_id,</if> <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="password!=null and password!=''">patient_password,</if>
<if test="email!=null and email!=''">patient_email,</if> <if test="email!=null and email!=''">patient_email,</if>
<if test="inviteCode!=null and inviteCode!=''">invite_code,</if> <if test="inviteCode!=null and inviteCode!=''">invite_code,</if>
@ -201,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
values values
( (
<if test="patientId!=null"> #{patientId},</if> <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="password!=null and password!=''">#{password},</if>
<if test="email!=null and email!=''">#{email},</if> <if test="email!=null and email!=''">#{email},</if>
<if test="inviteCode!=null and inviteCode!=''">#{inviteCode},</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 insert into tb_doctor
( (
<if test="doctorId!=null"> doctor_id,</if> <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="password!=null and password!=''">password,</if>
<if test="email!=null and email!=''">email,</if> <if test="email!=null and email!=''">email,</if>
<if test="hospital!=null and hospital!=''">hospital,</if> <if test="hospital!=null and hospital!=''">hospital,</if>