迭代 注册方法1.4
parent
c57b614ff8
commit
4742f6e8f3
|
@ -185,7 +185,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<choose>
|
||||
<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="name!=null and name!=''">patient_name,</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="weight!=null">weight,</if>
|
||||
<if test="age!=null">age,</if>
|
||||
<if test="wechatNumber!=null and wechatNumber!=''">wechat_number,</if>
|
||||
)
|
||||
values(
|
||||
<if test="wechatNumber!=null and wechatNumber!=''">wechat_number</if>
|
||||
</trim>
|
||||
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="patientId!=null">#{patientId},</if>
|
||||
<if test="name!=null and name!=''">#{name},</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="weight!=null">#{weight},</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>
|
||||
<otherwise>
|
||||
insert into tb_doctor
|
||||
(
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="doctorId!=null"> doctor_id,</if>
|
||||
<if test="name!=null and name!=''">doctor_name,</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="skilled!=null and skilled!=''">skilled,</if>
|
||||
<if test="avatar!=null and avatar!=''">avatar,</if>
|
||||
)
|
||||
</trim>
|
||||
values
|
||||
(
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="doctorId!=null"> #{doctorId},</if>
|
||||
<if test="name!=null and name!=''">#{name},</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="skilled!=null and skilled!=''">#{skilled},</if>
|
||||
<if test="avatar!=null and avatar!=''">#{avatar},</if>
|
||||
)
|
||||
</trim>
|
||||
</otherwise>
|
||||
</choose>
|
||||
</insert>
|
||||
|
|
Loading…
Reference in New Issue