diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java index bbac2c8..c41499a 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/AppController.java @@ -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)); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java index 440d438..7d5673e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/AppPatientReq.java @@ -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 + '\'' + + '}'; + } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/LoginForMpReq.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/LoginForMpReq.java index f9a7071..fb8ddd7 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/LoginForMpReq.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/req/LoginForMpReq.java @@ -26,7 +26,7 @@ public class LoginForMpReq implements Serializable { private String sex; @Max(120) - @Min(0) + @Min(-1) private Integer age; @Max(300) diff --git a/ruoyi-system/src/main/resources/mapper/system/TPatientMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TPatientMapper.xml index 65bf7b2..b4f0a59 100644 --- a/ruoyi-system/src/main/resources/mapper/system/TPatientMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/TPatientMapper.xml @@ -91,6 +91,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" age = #{age}, height = #{height}, weight = #{weight}, + age = null, + height = null, + weight = null, marriage = #{marriage}, disease = #{disease}, del_flag = #{delFlag},