Commit 3311433036aba4c9fefe1ea5348adb855c5eba13
1 parent
2e0c7d09f9
Exists in
master
and in
8 other branches
增加权限
Showing 5 changed files with 25 additions and 0 deletions
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CommunityConfigController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RegionController.java
- platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/VisitController.java
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/BabyManageController.java
View file @
3311433
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import javax.validation.Valid; |
4 | 4 | |
5 | +import com.lyms.platform.common.annotation.TokenRequired; | |
5 | 6 | import org.springframework.beans.factory.annotation.Autowired; |
6 | 7 | import org.springframework.stereotype.Controller; |
7 | 8 | import org.springframework.web.bind.annotation.PathVariable; |
... | ... | @@ -42,6 +43,7 @@ |
42 | 43 | */ |
43 | 44 | @RequestMapping(value = "/babymanage", method = RequestMethod.GET) |
44 | 45 | @ResponseBody |
46 | + @TokenRequired | |
45 | 47 | public BaseListResponse findBabyDataList(@Valid BabyManagerQueryRequest babyManagerRequest){ |
46 | 48 | return babyManagerFacade.findBabyList(babyManagerRequest); |
47 | 49 | } |
... | ... | @@ -59,6 +61,7 @@ |
59 | 61 | */ |
60 | 62 | @RequestMapping(value = "/babymanage/{id}", method = RequestMethod.PUT) |
61 | 63 | @ResponseBody |
64 | + @TokenRequired | |
62 | 65 | public BaseResponse updateOneBaby(@PathVariable("id")String id,@Valid BabyManagerUpdateRequest babyManagerUpdateRequest){ |
63 | 66 | babyManagerUpdateRequest.setId(id); |
64 | 67 | return babyManagerFacade.updateOneBaby(babyManagerUpdateRequest); |
... | ... | @@ -74,6 +77,7 @@ |
74 | 77 | */ |
75 | 78 | @RequestMapping(value = "/babymanage", method = RequestMethod.DELETE) |
76 | 79 | @ResponseBody |
80 | + @TokenRequired | |
77 | 81 | public BaseResponse deleteOneBabyById(@RequestParam("id")String id){ |
78 | 82 | return babyManagerFacade.deleteOneBabyById(id); |
79 | 83 | } |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/CommunityConfigController.java
View file @
3311433
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | import javax.validation.Valid; |
6 | 6 | |
7 | 7 | import com.lyms.platform.biz.param.CommunityQuery; |
8 | +import com.lyms.platform.common.annotation.TokenRequired; | |
8 | 9 | import com.lyms.platform.operate.web.result.FrontEndResult; |
9 | 10 | import org.springframework.beans.factory.annotation.Autowired; |
10 | 11 | import org.springframework.stereotype.Controller; |
... | ... | @@ -50,6 +51,7 @@ |
50 | 51 | //新增小区 |
51 | 52 | @RequestMapping(value = "addCommunity", method = RequestMethod.POST) |
52 | 53 | @ResponseBody |
54 | + @TokenRequired | |
53 | 55 | public BaseResponse addCommunity(@RequestBody @Valid CommunityConfigRequest communityConfigRequest) { |
54 | 56 | String names = ""; |
55 | 57 | for(String tmp : communityConfigRequest.getNames()) { |
... | ... | @@ -74,6 +76,7 @@ |
74 | 76 | //删除小区 |
75 | 77 | @RequestMapping(value = "delCommunity/{id}", method = RequestMethod.DELETE) |
76 | 78 | @ResponseBody |
79 | + @TokenRequired | |
77 | 80 | public BaseResponse addCommunity(@PathVariable String id) { |
78 | 81 | CommunityConfig communityConfig = new CommunityConfig(); |
79 | 82 | communityConfig.setId(id); |
... | ... | @@ -90,6 +93,7 @@ |
90 | 93 | //查询小区 |
91 | 94 | @RequestMapping(value = "queryCommunity", method = RequestMethod.GET) |
92 | 95 | @ResponseBody |
96 | + @TokenRequired | |
93 | 97 | public FrontEndResult queryCommunity(CommunityQuery communityQuery) { |
94 | 98 | List<CommunityConfig> communityConfigList = communityConfigService.queryCommunity(communityQuery); |
95 | 99 | |
... | ... | @@ -113,6 +117,7 @@ |
113 | 117 | //新增区域 |
114 | 118 | @RequestMapping(value = "communityConfig", method = RequestMethod.POST) |
115 | 119 | @ResponseBody |
120 | + @TokenRequired | |
116 | 121 | public BaseResponse appendArea(@RequestBody @Valid CommunityConfigRequest communityConfigRequest) { |
117 | 122 | CommunityConfig communityConfig = null; |
118 | 123 | for(String tmp : communityConfigRequest.getNames()) { |
... | ... | @@ -127,6 +132,7 @@ |
127 | 132 | //删除区域 |
128 | 133 | @RequestMapping(value = "communityConfig/{id}", method = RequestMethod.DELETE) |
129 | 134 | @ResponseBody |
135 | + @TokenRequired | |
130 | 136 | public BaseResponse deleteArea(@PathVariable String id) { |
131 | 137 | CommunityConfig communityConfig = new CommunityConfig(); |
132 | 138 | communityConfig.setId(id); |
... | ... | @@ -139,6 +145,7 @@ |
139 | 145 | //更新区域 |
140 | 146 | @RequestMapping(value = "communityConfig/{id}", method = RequestMethod.PUT) |
141 | 147 | @ResponseBody |
148 | + @TokenRequired | |
142 | 149 | public BaseResponse updateArea(@RequestParam(required=true) String name,@RequestParam(required=true) String parentId, @PathVariable String id) { |
143 | 150 | CommunityConfig communityConfig = new CommunityConfig(); |
144 | 151 | communityConfig.setParentId(parentId); |
... | ... | @@ -153,6 +160,7 @@ |
153 | 160 | //查询区域 |
154 | 161 | @RequestMapping(value = "communityConfig", method = RequestMethod.GET) |
155 | 162 | @ResponseBody |
163 | + @TokenRequired | |
156 | 164 | public FrontEndResult queryArea(CommunityQuery communityQuery) { |
157 | 165 | List<CommunityConfig> communityConfigList = communityConfigService.queryArea(communityQuery); |
158 | 166 |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/PuerperaManageController.java
View file @
3311433
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import javax.validation.Valid; |
4 | 4 | |
5 | +import com.lyms.platform.common.annotation.TokenRequired; | |
5 | 6 | import com.lyms.platform.operate.web.facade.PatientFacade; |
6 | 7 | import com.lyms.platform.operate.web.request.PuerperaMatcherCommunityRequest; |
7 | 8 | import org.springframework.beans.factory.annotation.Autowired; |
... | ... | @@ -38,6 +39,7 @@ |
38 | 39 | */ |
39 | 40 | @RequestMapping(value = "/puerperamanage", method = RequestMethod.GET) |
40 | 41 | @ResponseBody |
42 | + @TokenRequired | |
41 | 43 | public BaseListResponse queryPuerperaList(@Valid PuerperaManagerQueryRequest managerRequest) { |
42 | 44 | return patientFacade.findPatientList(managerRequest); |
43 | 45 | } |
... | ... | @@ -52,6 +54,7 @@ |
52 | 54 | */ |
53 | 55 | @RequestMapping(value = "/puerperamanage", method = RequestMethod.DELETE) |
54 | 56 | @ResponseBody |
57 | + @TokenRequired | |
55 | 58 | public BaseResponse deleteOnePuerperaById(@RequestParam("id") String id) { |
56 | 59 | //软删除数据 |
57 | 60 | return patientFacade.deleteOnePuerperaById(id, Boolean.TRUE); |
... | ... | @@ -66,6 +69,7 @@ |
66 | 69 | * @return |
67 | 70 | */ |
68 | 71 | @ResponseBody |
72 | + @TokenRequired | |
69 | 73 | @RequestMapping(value = "/matchpuerpera", method = RequestMethod.POST) |
70 | 74 | public BaseResponse matchCommunity(@Valid PuerperaMatcherCommunityRequest puerperaMatcherCommunityRequest){ |
71 | 75 | return patientFacade.matchCommunity(puerperaMatcherCommunityRequest); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/RegionController.java
View file @
3311433
1 | 1 | package com.lyms.platform.operate.web.controller; |
2 | 2 | |
3 | 3 | |
4 | +import com.lyms.platform.common.annotation.TokenRequired; | |
4 | 5 | import com.lyms.platform.common.base.BaseController; |
5 | 6 | import com.lyms.platform.common.utils.ResultUtils; |
6 | 7 | import com.lyms.platform.permission.model.Regions; |
... | ... | @@ -26,6 +27,7 @@ |
26 | 27 | public class RegionController extends BaseController { |
27 | 28 | @Autowired |
28 | 29 | private RegionsService regionsService; |
30 | + @TokenRequired | |
29 | 31 | @RequestMapping(value = "/regions",method = RequestMethod.GET) |
30 | 32 | public void getRegions(@RequestParam(value = "parentId", required = false) Integer parentId, |
31 | 33 | HttpServletResponse httpServletResponse){ |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/controller/VisitController.java
View file @
3311433
... | ... | @@ -2,6 +2,7 @@ |
2 | 2 | |
3 | 3 | import javax.validation.Valid; |
4 | 4 | |
5 | +import com.lyms.platform.common.annotation.TokenRequired; | |
5 | 6 | import org.apache.commons.lang.StringUtils; |
6 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
7 | 8 | import org.springframework.http.MediaType; |
... | ... | @@ -36,6 +37,7 @@ |
36 | 37 | */ |
37 | 38 | @RequestMapping(value = "/visitpuerpera", method = RequestMethod.GET) |
38 | 39 | @ResponseBody |
40 | + @TokenRequired | |
39 | 41 | public BaseObjectResponse findOneByCardNo(PuerperaVisitQueryRequest puerperaVisitQueryRequest) { |
40 | 42 | // 身份证号不为空的情况 |
41 | 43 | if (StringUtils.isNotEmpty(puerperaVisitQueryRequest.getCardNo())) { |
... | ... | @@ -56,6 +58,7 @@ |
56 | 58 | * @return 返回结果 |
57 | 59 | */ |
58 | 60 | @ResponseBody |
61 | + @TokenRequired | |
59 | 62 | @RequestMapping(value = "/visitpuerpera", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE,consumes =MediaType.APPLICATION_JSON_VALUE ) |
60 | 63 | public BaseResponse addOneVisit(@Valid @RequestBody |
61 | 64 | VisitAddRequest visitAddRequest) { |
... | ... | @@ -70,6 +73,7 @@ |
70 | 73 | * @return 返回结果 |
71 | 74 | */ |
72 | 75 | @ResponseBody |
76 | + @TokenRequired | |
73 | 77 | @RequestMapping(value = "/visitbaby", method = RequestMethod.POST,produces = MediaType.APPLICATION_JSON_VALUE,consumes =MediaType.APPLICATION_JSON_VALUE ) |
74 | 78 | public BaseResponse addOneBabyVisit(@Valid |
75 | 79 | BabyVisitAddRequest babyVisitAddRequest) { |
... | ... | @@ -83,6 +87,7 @@ |
83 | 87 | * 访视记录查询 |
84 | 88 | * @return |
85 | 89 | */ |
90 | + @TokenRequired | |
86 | 91 | @RequestMapping(value = "/visitbaby", method = RequestMethod.GET) |
87 | 92 | @ResponseBody |
88 | 93 | public BaseObjectResponse findOneBabyByCardNo(PuerperaVisitQueryRequest puerperaVisitQueryRequest) { |
... | ... | @@ -105,6 +110,7 @@ |
105 | 110 | */ |
106 | 111 | @RequestMapping(value = "/visitbaby/{id}", method = RequestMethod.PUT) |
107 | 112 | @ResponseBody |
113 | + @TokenRequired | |
108 | 114 | public BaseResponse updateOneBabyVisit(@PathVariable("id") |
109 | 115 | String id, BabyVisitAddRequest babyVisitAddRequest) { |
110 | 116 | babyVisitAddRequest.setId(id); |
... | ... | @@ -120,6 +126,7 @@ |
120 | 126 | */ |
121 | 127 | @RequestMapping(value = "/visitpuerpera/{id}", method = RequestMethod.PUT) |
122 | 128 | @ResponseBody |
129 | + @TokenRequired | |
123 | 130 | public BaseResponse updateOnePuerperaVisit(@PathVariable("id") |
124 | 131 | String id, VisitAddRequest visitAddRequest) { |
125 | 132 | visitAddRequest.setId(id); |