From aadde1db6bedbfea9acaf38cc58fd10aeb3dae29 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 23 Aug 2022 15:49:43 +0800 Subject: [PATCH] =?UTF-8?q?APP=E4=BF=AE=E6=94=B9=E6=82=A3=E8=80=85?= =?UTF-8?q?=E9=9D=9E=E5=BF=85=E5=A1=AB=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/api/AppController.java | 2 ++ .../system/domain/req/AppPatientReq.java | 20 ++++++++++++++++++- .../system/domain/req/LoginForMpReq.java | 2 +- .../mapper/system/TPatientMapper.xml | 3 +++ 4 files changed, 25 insertions(+), 2 deletions(-) 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},