Commit 897b2438b21d898898c4cb58aade3d35058e0c29
1 parent
b80bf8d816
Exists in
master
and in
6 other branches
改为json传参
Showing 2 changed files with 3 additions and 5 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/NewbornVisitControoler.java
View file @
897b243
| ... | ... | @@ -7,10 +7,7 @@ |
| 7 | 7 | import com.lyms.platform.pojo.NewbornVisit; |
| 8 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | 9 | import org.springframework.stereotype.Controller; |
| 10 | -import org.springframework.web.bind.annotation.PathVariable; | |
| 11 | -import org.springframework.web.bind.annotation.RequestMapping; | |
| 12 | -import org.springframework.web.bind.annotation.RequestMethod; | |
| 13 | -import org.springframework.web.bind.annotation.ResponseBody; | |
| 10 | +import org.springframework.web.bind.annotation.*; | |
| 14 | 11 | |
| 15 | 12 | import javax.servlet.http.HttpServletRequest; |
| 16 | 13 | import javax.servlet.http.HttpServletResponse; |
| ... | ... | @@ -30,7 +27,7 @@ |
| 30 | 27 | @RequestMapping(method = RequestMethod.POST) |
| 31 | 28 | @ResponseBody |
| 32 | 29 | @TokenRequired |
| 33 | - public BaseObjectResponse add(HttpServletRequest request, NewbornVisit newbornVisit) { | |
| 30 | + public BaseObjectResponse add(HttpServletRequest request, @RequestBody NewbornVisit newbornVisit) { | |
| 34 | 31 | return visitService.addOrUpdate(getUserId(request), newbornVisit); |
| 35 | 32 | } |
| 36 | 33 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/service/impl/NewbornServiceImpl.java
View file @
897b243
| ... | ... | @@ -88,6 +88,7 @@ |
| 88 | 88 | newbornVisit.setCreated(new Date()); |
| 89 | 89 | newbornVisit.setYn("1"); |
| 90 | 90 | mongoTemplate.save(newbornVisit); |
| 91 | + return RespBuilder.buildSuccess(newbornVisit.getId()); | |
| 91 | 92 | } else { |
| 92 | 93 | newbornVisit.setId(UUID.randomUUID().toString().replace("-", "")); |
| 93 | 94 | newbornVisit.setOperationId(userId.toString()); |