Commit 31a596584979ef2354a4c0a77f863ea2182cdea9
1 parent
b83557b117
Exists in
master
and in
1 other branch
form转json
Showing 3 changed files with 5 additions and 11 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
View file @
31a5965
... | ... | @@ -14,10 +14,7 @@ |
14 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
15 | 15 | import org.springframework.validation.BindingResult; |
16 | 16 | import org.springframework.validation.annotation.Validated; |
17 | -import org.springframework.web.bind.annotation.GetMapping; | |
18 | -import org.springframework.web.bind.annotation.PostMapping; | |
19 | -import org.springframework.web.bind.annotation.RequestMapping; | |
20 | -import org.springframework.web.bind.annotation.RestController; | |
17 | +import org.springframework.web.bind.annotation.*; | |
21 | 18 | |
22 | 19 | import java.util.Date; |
23 | 20 | import java.util.HashMap; |
... | ... | @@ -64,7 +61,7 @@ |
64 | 61 | * @return |
65 | 62 | */ |
66 | 63 | @PostMapping("saveDepart") |
67 | - public BaseResponse saveDepart(@Validated LymsHdepart depart, BindingResult result,String ills){ | |
64 | + public BaseResponse saveDepart(@Validated @RequestBody LymsHdepart depart, BindingResult result, String ills){ | |
68 | 65 | BaseResponse baseResponse=new BaseResponse(); |
69 | 66 | baseResponse.setErrormsg(""); |
70 | 67 | if(depart.getDid()==null){ |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
31a5965
... | ... | @@ -11,10 +11,7 @@ |
11 | 11 | import org.springframework.beans.factory.annotation.Autowired; |
12 | 12 | import org.springframework.validation.BindingResult; |
13 | 13 | import org.springframework.validation.annotation.Validated; |
14 | -import org.springframework.web.bind.annotation.GetMapping; | |
15 | -import org.springframework.web.bind.annotation.PostMapping; | |
16 | -import org.springframework.web.bind.annotation.RequestMapping; | |
17 | -import org.springframework.web.bind.annotation.RestController; | |
14 | +import org.springframework.web.bind.annotation.*; | |
18 | 15 | |
19 | 16 | import java.util.Date; |
20 | 17 | import java.util.HashMap; |
... | ... | @@ -151,7 +148,7 @@ |
151 | 148 | * @return |
152 | 149 | */ |
153 | 150 | @PostMapping("loginPatient") |
154 | - public BaseResponse loginPatient(LymsPatient patient){ | |
151 | + public BaseResponse loginPatient(@RequestBody LymsPatient patient){ | |
155 | 152 | BaseResponse baseResponse=new BaseResponse(); |
156 | 153 | List<LymsPatient> dLst=lymsPatientService.list(Wrappers.query(patient)); |
157 | 154 | baseResponse.setErrorcode(1); |