APP修改患者非必填信息

master
gongzhenkun 2 years ago
parent 841fd691c0
commit aadde1db6b

@ -202,6 +202,7 @@ public class AppController extends BaseController
@PostMapping("/patient/add")
public AjaxResult addPatient(@RequestBody @Validated AppPatientReq appPatientReq)
{
logger.info("add patient param is {} ", appPatientReq);
TPatient tPatient = new TPatient();
BeanUtils.copyProperties(appPatientReq, tPatient);
if (UserConstants.NOT_UNIQUE.equals(tPatientService.checkPhoneUnique(tPatient.getPhone())))
@ -250,6 +251,7 @@ public class AppController extends BaseController
@PostMapping("/patient/modify")
public AjaxResult patientsWithModified(@RequestBody @Validated AppPatientReq appPatientReq)
{
logger.info("modify patient param is {} ", appPatientReq);
TPatient tPatient = new TPatient();
BeanUtils.copyProperties(appPatientReq, tPatient);
return AjaxResult.success(tPatientService.updateTPatient(tPatient));

@ -68,7 +68,7 @@ public class AppPatientReq {
*/
@ApiModelProperty("年龄")
@Max(120)
@Min(0)
@Min(-1)
private Integer age;
/**
@ -199,4 +199,22 @@ public class AppPatientReq {
public void setDisease(String disease) {
this.disease = disease;
}
@Override
public String toString() {
return "AppPatientReq{" +
"doctorId=" + doctorId +
", hospitalId=" + hospitalId +
", id=" + id +
", identifier='" + identifier + '\'' +
", name='" + name + '\'' +
", phone='" + phone + '\'' +
", sex='" + sex + '\'' +
", age=" + age +
", height=" + height +
", weight=" + weight +
", marriage='" + marriage + '\'' +
", disease='" + disease + '\'' +
'}';
}
}

@ -26,7 +26,7 @@ public class LoginForMpReq implements Serializable {
private String sex;
@Max(120)
@Min(0)
@Min(-1)
private Integer age;
@Max(300)

@ -91,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="age != null">age = #{age},</if>
<if test="height != null">height = #{height},</if>
<if test="weight != null">weight = #{weight},</if>
<if test="age == -1">age = null,</if>
<if test="height == -1">height = null,</if>
<if test="weight == -1">weight = null,</if>
<if test="marriage != null">marriage = #{marriage},</if>
<if test="disease != null">disease = #{disease},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>

Loading…
Cancel
Save