Commit cd8d4188f47e06ba5d6597adf31f91f4ce45bb36
1 parent
590584bf76
Exists in
master
and in
6 other branches
妊高症名称修改
Showing 2 changed files with 1 additions and 72 deletions
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PihController.java
View file @
cd8d418
... | ... | @@ -18,11 +18,9 @@ |
18 | 18 | |
19 | 19 | import javax.servlet.http.HttpServletRequest; |
20 | 20 | |
21 | - | |
22 | 21 | @Controller |
23 | -@RequestMapping(value = "/pih") | |
22 | +@RequestMapping("/pih") | |
24 | 23 | public class PihController extends BaseController { |
25 | - | |
26 | 24 | @Autowired |
27 | 25 | private PihService pihService; |
28 | 26 | |
... | ... | @@ -62,7 +60,5 @@ |
62 | 60 | Assert.notNull(loginState, "未登录"); |
63 | 61 | return loginState.getId(); |
64 | 62 | } |
65 | - | |
66 | - | |
67 | 63 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/pihController.java
View file @
cd8d418
1 | -package com.lyms.platform.operate.web.controller; | |
2 | - | |
3 | -import com.lyms.platform.common.annotation.TokenRequired; | |
4 | -import com.lyms.platform.common.base.BaseController; | |
5 | -import com.lyms.platform.common.base.LoginContext; | |
6 | -import com.lyms.platform.common.result.BaseResponse; | |
7 | -import com.lyms.platform.common.result.RespBuilder; | |
8 | -import com.lyms.platform.common.utils.StringUtils; | |
9 | -import com.lyms.platform.operate.web.service.PihService; | |
10 | -import com.lyms.platform.pojo.PihParameterModel; | |
11 | -import org.springframework.beans.factory.annotation.Autowired; | |
12 | -import org.springframework.stereotype.Controller; | |
13 | -import org.springframework.util.Assert; | |
14 | -import org.springframework.web.bind.annotation.PathVariable; | |
15 | -import org.springframework.web.bind.annotation.RequestMapping; | |
16 | -import org.springframework.web.bind.annotation.RequestMethod; | |
17 | -import org.springframework.web.bind.annotation.ResponseBody; | |
18 | - | |
19 | -import javax.servlet.http.HttpServletRequest; | |
20 | - | |
21 | - | |
22 | -@Controller | |
23 | -@RequestMapping(value = "/pih") | |
24 | -public class pihController extends BaseController { | |
25 | - | |
26 | - @Autowired | |
27 | - private PihService pihService; | |
28 | - | |
29 | - | |
30 | - @ResponseBody | |
31 | - @RequestMapping(value = "/add", method = RequestMethod.POST) | |
32 | - public void addPih(PihParameterModel parameterModel) { | |
33 | - pihService.addPih(parameterModel); | |
34 | - } | |
35 | - | |
36 | - | |
37 | - @RequestMapping(value = "/query", method = RequestMethod.GET) | |
38 | - @ResponseBody | |
39 | - @TokenRequired | |
40 | - public BaseResponse queryAllPih(String key, Integer age, Integer weekEnd, Integer weekStart, String type, Integer state, Integer page, Integer limit, HttpServletRequest request) { | |
41 | - return pihService.queyAll(key, weekStart, weekEnd, age, type, state, page, limit, getUserId(request)); | |
42 | - } | |
43 | - | |
44 | - @ResponseBody | |
45 | - @RequestMapping(value = "/queryInfo", method = RequestMethod.GET) | |
46 | - public BaseResponse query(String cardNo) { | |
47 | - if (StringUtils.isNotEmpty(cardNo)) { | |
48 | - return pihService.queryInfo(cardNo); | |
49 | - } | |
50 | - return RespBuilder.buildSuccess("请输入查询条件!"); | |
51 | - } | |
52 | - | |
53 | - @RequestMapping(value = "/report/{id}", method = RequestMethod.GET) | |
54 | - @ResponseBody | |
55 | - @TokenRequired | |
56 | - public BaseResponse getPinReport(@PathVariable(value = "id") String id, HttpServletRequest request) { | |
57 | - return pihService.getPinReport(id, getUserId(request)); | |
58 | - } | |
59 | - | |
60 | - protected Integer getUserId(HttpServletRequest request) { | |
61 | - LoginContext loginState = (LoginContext) request.getAttribute("loginContext"); | |
62 | - Assert.notNull(loginState, "未登录"); | |
63 | - return loginState.getId(); | |
64 | - } | |
65 | - | |
66 | - | |
67 | -} |