From 1c2682fb981001130c306affc2e076baa9d0fd25 Mon Sep 17 00:00:00 2001 From: gongzhenkun <1658878546@qq.com> Date: Tue, 23 Aug 2022 11:24:17 +0800 Subject: [PATCH] =?UTF-8?q?APP=E6=8E=A5=E5=8F=A3=E5=85=A5=E5=8F=82?= =?UTF-8?q?=E8=A7=84=E5=88=99=E6=A0=A1=E9=AA=8C=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/web/controller/api/AppController.java | 7 +++---- 1 file changed, 3 insertions(+), 4 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 9f2405b..bbac2c8 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 @@ -28,15 +28,14 @@ import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import sun.misc.BASE64Encoder; - import javax.annotation.Resource; import javax.imageio.stream.FileImageInputStream; import java.io.ByteArrayOutputStream; import java.io.File; -import java.lang.reflect.Field; import java.util.*; import java.util.stream.Collectors; @@ -201,7 +200,7 @@ public class AppController extends BaseController @ApiOperation("添加患者") @Log(title = "App患者添加", businessType = BusinessType.INSERT) @PostMapping("/patient/add") - public AjaxResult addPatient(@RequestBody AppPatientReq appPatientReq) + public AjaxResult addPatient(@RequestBody @Validated AppPatientReq appPatientReq) { TPatient tPatient = new TPatient(); BeanUtils.copyProperties(appPatientReq, tPatient); @@ -249,7 +248,7 @@ public class AppController extends BaseController @ApiOperation("患者信息修改") @Log(title = "App患者修改", businessType = BusinessType.UPDATE) @PostMapping("/patient/modify") - public AjaxResult patientsWithModified(@RequestBody AppPatientReq appPatientReq) + public AjaxResult patientsWithModified(@RequestBody @Validated AppPatientReq appPatientReq) { TPatient tPatient = new TPatient(); BeanUtils.copyProperties(appPatientReq, tPatient);