迭代 注册方法1.4

master
冯凯 2023-10-20 21:40:30 +08:00
parent c57b614ff8
commit 4742f6e8f3
1 changed files with 33 additions and 30 deletions

View File

@ -185,7 +185,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<choose> <choose>
<when test="roleId==1"> <when test="roleId==1">
insert into tb_patient( insert into tb_patient
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId!=null">patient_id,</if> <if test="patientId!=null">patient_id,</if>
<if test="name!=null and name!=''">patient_name,</if> <if test="name!=null and name!=''">patient_name,</if>
<if test="password!=null and password!=''">password,</if> <if test="password!=null and password!=''">password,</if>
@ -196,9 +197,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="height!=null">height,</if> <if test="height!=null">height,</if>
<if test="weight!=null">weight,</if> <if test="weight!=null">weight,</if>
<if test="age!=null">age,</if> <if test="age!=null">age,</if>
<if test="wechatNumber!=null and wechatNumber!=''">wechat_number,</if> <if test="wechatNumber!=null and wechatNumber!=''">wechat_number</if>
) </trim>
values(
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="patientId!=null">#{patientId},</if> <if test="patientId!=null">#{patientId},</if>
<if test="name!=null and name!=''">#{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>
@ -209,12 +212,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="height!=null">#{height},</if> <if test="height!=null">#{height},</if>
<if test="weight!=null">#{weight},</if> <if test="weight!=null">#{weight},</if>
<if test="age!=null">#{age},</if> <if test="age!=null">#{age},</if>
<if test="wechatNumber!=null and wechatNumber!=''">#{wechatNumber},</if> <if test="wechatNumber!=null and wechatNumber!=''">#{wechatNumber}</if>
) </trim>
</when> </when>
<otherwise> <otherwise>
insert into tb_doctor insert into tb_doctor
( <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="doctorId!=null"> doctor_id,</if> <if test="doctorId!=null"> doctor_id,</if>
<if test="name!=null and name!=''">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>
@ -225,9 +228,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="introduce!=null and introduce!=''">introduce,</if> <if test="introduce!=null and introduce!=''">introduce,</if>
<if test="skilled!=null and skilled!=''">skilled,</if> <if test="skilled!=null and skilled!=''">skilled,</if>
<if test="avatar!=null and avatar!=''">avatar,</if> <if test="avatar!=null and avatar!=''">avatar,</if>
) </trim>
values values
( <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="doctorId!=null"> #{doctorId},</if> <if test="doctorId!=null"> #{doctorId},</if>
<if test="name!=null and name!=''">#{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>
@ -238,7 +241,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="introduce!=null and introduce!=''">#{introduce},</if> <if test="introduce!=null and introduce!=''">#{introduce},</if>
<if test="skilled!=null and skilled!=''">#{skilled},</if> <if test="skilled!=null and skilled!=''">#{skilled},</if>
<if test="avatar!=null and avatar!=''">#{avatar},</if> <if test="avatar!=null and avatar!=''">#{avatar},</if>
) </trim>
</otherwise> </otherwise>
</choose> </choose>
</insert> </insert>