Commit 3c7599f0b2cd2dbeee9fb7677754676e6ab7445f
1 parent
732465f953
Exists in
master
and in
6 other branches
update
Showing 1 changed file with 4 additions and 6 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/TemporaryUserController.java
View file @
3c7599f
... | ... | @@ -8,12 +8,10 @@ |
8 | 8 | import com.lyms.platform.pojo.TemporaryUserModel; |
9 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
10 | 10 | import org.springframework.stereotype.Controller; |
11 | -import org.springframework.web.bind.annotation.RequestMapping; | |
12 | -import org.springframework.web.bind.annotation.RequestMethod; | |
13 | -import org.springframework.web.bind.annotation.RequestParam; | |
14 | -import org.springframework.web.bind.annotation.ResponseBody; | |
11 | +import org.springframework.web.bind.annotation.*; | |
15 | 12 | |
16 | 13 | import javax.servlet.http.HttpServletRequest; |
14 | +import javax.validation.Valid; | |
17 | 15 | |
18 | 16 | @Controller |
19 | 17 | @RequestMapping(value = "/temporary") |
... | ... | @@ -26,8 +24,8 @@ |
26 | 24 | @ResponseBody |
27 | 25 | @RequestMapping(value = "/addAndUpdate", method = RequestMethod.POST) |
28 | 26 | @TokenRequired |
29 | - //@Valid @RequestBody | |
30 | - public BaseResponse addAndUpdate(TemporaryUserModel temporaryUser, HttpServletRequest request) { | |
27 | + | |
28 | + public BaseResponse addAndUpdate(@Valid @RequestBody TemporaryUserModel temporaryUser, HttpServletRequest request) { | |
31 | 29 | return temporaryUserService.addAndUpdate(temporaryUser, getUserId(request)); |
32 | 30 | |
33 | 31 | } |