Commit 1d891e8e2cbe0a23a6f783672f3c14b41799cf5b
1 parent
200c6c3013
Exists in
master
and in
1 other branch
统一添加@TokenRequired
Showing 21 changed files with 143 additions and 4 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/CommonController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ComtStatController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DiagnoseIncomeController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/FavorController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/GetPatientInfoController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/IndexController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsLogsController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/OrderController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PermissController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RoleController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/SearchLogsController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/TkRecordController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ArticleController.java
View file @
1d891e8
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 7 | 8 | import com.lyms.talkonlineweb.domain.*; |
| 8 | 9 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 9 | 10 | import com.lyms.talkonlineweb.service.*; |
| ... | ... | @@ -65,6 +66,7 @@ |
| 65 | 66 | * @return |
| 66 | 67 | */ |
| 67 | 68 | @PostMapping("upFile") |
| 69 | + @TokenRequired | |
| 68 | 70 | public String upFile(MultipartFile imgFile) { |
| 69 | 71 | String furl = ""; |
| 70 | 72 | if (Objects.nonNull(imgFile)) { |
| ... | ... | @@ -90,6 +92,7 @@ |
| 90 | 92 | * @return |
| 91 | 93 | */ |
| 92 | 94 | @GetMapping("showPic/{fileName}") |
| 95 | + @TokenRequired | |
| 93 | 96 | public void showPic(@PathVariable("fileName") String fileName, HttpServletResponse response) { |
| 94 | 97 | try(InputStream in=new FileInputStream(new File(uploadPath + File.separator +fileName)); |
| 95 | 98 | OutputStream out=response.getOutputStream(); |
| ... | ... | @@ -108,6 +111,7 @@ |
| 108 | 111 | * @return |
| 109 | 112 | */ |
| 110 | 113 | @PostMapping("saveArticle") |
| 114 | + @TokenRequired | |
| 111 | 115 | public BaseResponse saveArticle(LymsArticle article) { |
| 112 | 116 | BaseResponse baseResponse = new BaseResponse(); |
| 113 | 117 | if (article.getAid() == null) { |
| ... | ... | @@ -130,6 +134,7 @@ |
| 130 | 134 | * @return |
| 131 | 135 | */ |
| 132 | 136 | @GetMapping("sltArticleLst") |
| 137 | + @TokenRequired | |
| 133 | 138 | public BaseResponse sltArticleLst(ArticleInfo article, int current, int size, int sort) { |
| 134 | 139 | BaseResponse baseResponse = new BaseResponse(); |
| 135 | 140 | Page<ArticleInfo> page = new Page<>(current, size); |
| ... | ... | @@ -171,6 +176,7 @@ |
| 171 | 176 | * @return |
| 172 | 177 | */ |
| 173 | 178 | @GetMapping("delArticle") |
| 179 | + @TokenRequired | |
| 174 | 180 | public BaseResponse delArticle(int aid) { |
| 175 | 181 | BaseResponse baseResponse = new BaseResponse(); |
| 176 | 182 | boolean f = lymsArticleService.removeById(aid); |
| ... | ... | @@ -205,6 +211,7 @@ |
| 205 | 211 | // } |
| 206 | 212 | // return baseResponse; |
| 207 | 213 | // } |
| 214 | + @TokenRequired | |
| 208 | 215 | public BaseResponse getPushArt(@RequestBody GetpushartInfo getpushartInfo) { |
| 209 | 216 | BaseResponse baseResponse = new BaseResponse(); |
| 210 | 217 | List<GetpushartInfo> getpushartInfoList= getpushartInfoService.list(Wrappers.query(getpushartInfo).orderByDesc("createdtime")); |
| ... | ... | @@ -218,6 +225,7 @@ |
| 218 | 225 | * @return |
| 219 | 226 | */ |
| 220 | 227 | @GetMapping("getArtStat") |
| 228 | + @TokenRequired | |
| 221 | 229 | public BaseResponse getArtStat() { |
| 222 | 230 | BaseResponse baseResponse = new BaseResponse(); |
| 223 | 231 | List<Map<String, Object>> aLst = lymsArticleService.getArtStat(); |
| ... | ... | @@ -230,6 +238,7 @@ |
| 230 | 238 | * @return |
| 231 | 239 | */ |
| 232 | 240 | @GetMapping("getArtPushStat") |
| 241 | + @TokenRequired | |
| 233 | 242 | public BaseResponse getArtPushStat(){ |
| 234 | 243 | BaseResponse baseResponse=new BaseResponse(); |
| 235 | 244 | |
| ... | ... | @@ -244,6 +253,7 @@ |
| 244 | 253 | * @return |
| 245 | 254 | */ |
| 246 | 255 | @GetMapping("getPushedartlogsInfo") |
| 256 | + @TokenRequired | |
| 247 | 257 | public BaseResponse getPushedartlogsInfo(PushedartlogsInfo pushedartlogsInfo, Integer current, Integer size){ |
| 248 | 258 | BaseResponse baseResponse=new BaseResponse(); |
| 249 | 259 | try { |
| ... | ... | @@ -261,6 +271,7 @@ |
| 261 | 271 | * 根据患者id,问诊id,状态类型1为已读更新推送文章记录 |
| 262 | 272 | */ |
| 263 | 273 | @PostMapping("updatePushedartlogs") |
| 274 | + @TokenRequired | |
| 264 | 275 | public BaseResponse updatePushedartlogs(@RequestBody LymsPushedart pushedart) { |
| 265 | 276 | BaseResponse baseResponse=new BaseResponse(); |
| 266 | 277 | try { |
| ... | ... | @@ -286,6 +297,7 @@ |
| 286 | 297 | * @return true 可以使用,false已经存在 |
| 287 | 298 | */ |
| 288 | 299 | @GetMapping("getTitleYn") |
| 300 | + @TokenRequired | |
| 289 | 301 | public BaseResponse getTitleYn(@RequestParam(required = false) Integer aid, |
| 290 | 302 | @RequestParam(required = true) Integer iid, |
| 291 | 303 | @RequestParam(required = true) String title){//加@RequestParam 能解决乱码问题 |
| ... | ... | @@ -319,6 +331,7 @@ |
| 319 | 331 | * @return true 可以使用,false已经存在 |
| 320 | 332 | */ |
| 321 | 333 | @GetMapping("getSerialNumberYn") |
| 334 | + @TokenRequired | |
| 322 | 335 | public BaseResponse getSerialNumberYn(@RequestParam(required = false) Integer aid, Integer iid,Integer serialNumber){ |
| 323 | 336 | BaseResponse baseResponse=new BaseResponse(); |
| 324 | 337 | try { |
| ... | ... | @@ -348,6 +361,7 @@ |
| 348 | 361 | * @return int serialNumber(0-100) |
| 349 | 362 | */ |
| 350 | 363 | @GetMapping("getSerialNumber") |
| 364 | + @TokenRequired | |
| 351 | 365 | public BaseResponse getSerialNumber(Integer iid){ |
| 352 | 366 | BaseResponse baseResponse=new BaseResponse(); |
| 353 | 367 | try { |
| ... | ... | @@ -375,6 +389,7 @@ |
| 375 | 389 | * @return |
| 376 | 390 | */ |
| 377 | 391 | @GetMapping("getLymsPushMessages") |
| 392 | + @TokenRequired | |
| 378 | 393 | public BaseResponse getLymsPushMessages(LymsPushMessages lymsPushMessages, Integer current, Integer size){ |
| 379 | 394 | BaseResponse baseResponse=new BaseResponse(); |
| 380 | 395 | try { |
| ... | ... | @@ -401,6 +416,7 @@ |
| 401 | 416 | * @return |
| 402 | 417 | */ |
| 403 | 418 | @GetMapping("getGZOpenId") |
| 419 | + @TokenRequired | |
| 404 | 420 | public BaseResponse getGZOpenId(LymsPatient patient){ |
| 405 | 421 | BaseResponse baseResponse=new BaseResponse(); |
| 406 | 422 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
1d891e8
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 8 | 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 9 | 9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 10 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 10 | 11 | import com.lyms.talkonlineweb.domain.*; |
| 11 | 12 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 12 | 13 | import com.lyms.talkonlineweb.service.*; |
| ... | ... | @@ -63,6 +64,7 @@ |
| 63 | 64 | * @return |
| 64 | 65 | */ |
| 65 | 66 | @PostMapping("saveChatGroup") |
| 67 | + @TokenRequired | |
| 66 | 68 | public BaseResponse saveChatGroup(@RequestBody LymsChatgroup group) { |
| 67 | 69 | BaseResponse baseResponse = new BaseResponse(); |
| 68 | 70 | List<LymsChatgroup> gLst = lymsChatgroupService.list(Wrappers.query(group).orderByDesc("id")); |
| ... | ... | @@ -98,6 +100,7 @@ |
| 98 | 100 | * @return |
| 99 | 101 | */ |
| 100 | 102 | @PostMapping("saveMsg") |
| 103 | + @TokenRequired | |
| 101 | 104 | public BaseResponse saveMsg(@RequestBody LymsMessage message) { |
| 102 | 105 | BaseResponse baseResponse = new BaseResponse(); |
| 103 | 106 | message.setSendtime(new Date()); |
| ... | ... | @@ -112,6 +115,7 @@ |
| 112 | 115 | * @return |
| 113 | 116 | */ |
| 114 | 117 | @GetMapping("getPatDoc") |
| 118 | + @TokenRequired | |
| 115 | 119 | public BaseResponse getPatDoc(LymsChatgroup chatgroup) { |
| 116 | 120 | log.info(">>>>>>>>>>chatgroup:" + chatgroup); |
| 117 | 121 | BaseResponse baseResponse = new BaseResponse(); |
| ... | ... | @@ -173,6 +177,7 @@ |
| 173 | 177 | * @return |
| 174 | 178 | */ |
| 175 | 179 | @PostMapping("getPinfoBySession") |
| 180 | + @TokenRequired | |
| 176 | 181 | public BaseResponse getPinfoBySesson(String froms, String did, String groupid) { |
| 177 | 182 | BaseResponse baseResponse = new BaseResponse(); |
| 178 | 183 | List<Map<String, Object>> psList = new ArrayList<>(); |
| ... | ... | @@ -192,6 +197,7 @@ |
| 192 | 197 | * @return |
| 193 | 198 | */ |
| 194 | 199 | @PostMapping("getSessionListInfo") |
| 200 | + @TokenRequired | |
| 195 | 201 | public BaseResponse getSessionListInfo(HttpServletRequest request) { |
| 196 | 202 | BaseResponse baseResponse = new BaseResponse(); |
| 197 | 203 | log.info(">>>>>>>>> getSessionListInfo 根据环信传入的会话,获取用户信息"); |
| ... | ... | @@ -261,6 +267,7 @@ |
| 261 | 267 | * @return |
| 262 | 268 | */ |
| 263 | 269 | @GetMapping("getPreMsg") |
| 270 | + @TokenRequired | |
| 264 | 271 | public BaseResponse getPreMsg(HttpServletRequest request){ |
| 265 | 272 | BaseResponse baseResponse =new BaseResponse(); |
| 266 | 273 | Map<String,Object> param=new HashMap<>(); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/CommonController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 4 | import com.fasterxml.jackson.databind.ser.Serializers; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsChatgroup; |
| 6 | 7 | import com.lyms.talkonlineweb.domain.LymsDoctor; |
| 7 | 8 | import com.lyms.talkonlineweb.domain.LymsPatient; |
| ... | ... | @@ -33,6 +34,7 @@ |
| 33 | 34 | private LymsPatientService lymsPatientService; |
| 34 | 35 | |
| 35 | 36 | @GetMapping("endTalk") |
| 37 | + @TokenRequired | |
| 36 | 38 | public BaseResponse endTalk(LymsTkrecord tkrecord){ |
| 37 | 39 | BaseResponse baseResponse=new BaseResponse(); |
| 38 | 40 | tkrecord.setStat(0); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ComtStatController.java
View file @
1d891e8
| 1 | 1 | package com.lyms.talkonlineweb.controller; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 4 | 5 | import com.lyms.talkonlineweb.domain.LymsComtstat; |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsFavor; |
| 6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -29,6 +30,7 @@ |
| 29 | 30 | * @return |
| 30 | 31 | */ |
| 31 | 32 | @PostMapping("saveStat") |
| 33 | + @TokenRequired | |
| 32 | 34 | public BaseResponse saveStat(LymsComtstat stat){ |
| 33 | 35 | BaseResponse baseResponse=new BaseResponse(); |
| 34 | 36 | boolean f=lymsComtstatService.saveOrUpdate(stat); |
| ... | ... | @@ -42,6 +44,7 @@ |
| 42 | 44 | * @return |
| 43 | 45 | */ |
| 44 | 46 | @GetMapping("getStat") |
| 47 | + @TokenRequired | |
| 45 | 48 | public BaseResponse getStat(LymsComtstat stat){ |
| 46 | 49 | BaseResponse baseResponse=new BaseResponse(); |
| 47 | 50 | List<LymsComtstat> sLst =lymsComtstatService.list(Wrappers.query(stat)); |
| ... | ... | @@ -55,6 +58,7 @@ |
| 55 | 58 | * @return |
| 56 | 59 | */ |
| 57 | 60 | @GetMapping("delStat") |
| 61 | + @TokenRequired | |
| 58 | 62 | public BaseResponse delStat(LymsComtstat stat){ |
| 59 | 63 | BaseResponse baseResponse=new BaseResponse(); |
| 60 | 64 | boolean f=lymsComtstatService.remove(Wrappers.query(stat)); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DepartController.java
View file @
1d891e8
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 7 | 8 | import com.lyms.talkonlineweb.domain.*; |
| 8 | 9 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 9 | 10 | import com.lyms.talkonlineweb.service.*; |
| ... | ... | @@ -47,6 +48,7 @@ |
| 47 | 48 | * @return |
| 48 | 49 | */ |
| 49 | 50 | @GetMapping("sltDepartLst") |
| 51 | + @TokenRequired | |
| 50 | 52 | public BaseResponse sltDepartLst(HdepartInfo depart, int current, int size){ |
| 51 | 53 | BaseResponse baseResponse=new BaseResponse(); |
| 52 | 54 | // Page<LymsHdepart> page=new Page<>(current,size); |
| ... | ... | @@ -84,6 +86,7 @@ |
| 84 | 86 | * @return |
| 85 | 87 | */ |
| 86 | 88 | @PostMapping("saveDepart") |
| 89 | + @TokenRequired | |
| 87 | 90 | public BaseResponse saveDepart(@RequestBody LymsHdepart depart, BindingResult result){ |
| 88 | 91 | BaseResponse baseResponse=new BaseResponse(); |
| 89 | 92 | baseResponse.setErrormsg(""); |
| ... | ... | @@ -140,6 +143,7 @@ |
| 140 | 143 | * @return |
| 141 | 144 | */ |
| 142 | 145 | @GetMapping("delDepart") |
| 146 | + @TokenRequired | |
| 143 | 147 | public BaseResponse delHosp(int did){ |
| 144 | 148 | BaseResponse baseResponse=new BaseResponse(); |
| 145 | 149 | //操作记保存参数 |
| ... | ... | @@ -160,6 +164,7 @@ |
| 160 | 164 | * @return |
| 161 | 165 | */ |
| 162 | 166 | @PostMapping("loginDepart") |
| 167 | + @TokenRequired | |
| 163 | 168 | public BaseResponse loginDepart(LymsHdepart depart){ |
| 164 | 169 | BaseResponse baseResponse=new BaseResponse(); |
| 165 | 170 | List<LymsHdepart> dLst=lymsHdepartService.list(Wrappers.query(depart)); |
| ... | ... | @@ -208,6 +213,7 @@ |
| 208 | 213 | * @return true 可以使用,false已经存在 |
| 209 | 214 | */ |
| 210 | 215 | @GetMapping("getDepartByParam") |
| 216 | + @TokenRequired | |
| 211 | 217 | public BaseResponse getDepartByParam(Integer hid,String dname,@RequestParam(required = false) Integer did){ |
| 212 | 218 | BaseResponse baseResponse=new BaseResponse(); |
| 213 | 219 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DiagnoseIncomeController.java
View file @
1d891e8
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.StringUtils; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 7 | 8 | import com.lyms.talkonlineweb.domain.DiagnoseincomeInfo; |
| 8 | 9 | import com.lyms.talkonlineweb.domain.HdepartInfo; |
| 9 | 10 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -32,7 +33,8 @@ |
| 32 | 33 | * 问诊收入管理列表 |
| 33 | 34 | */ |
| 34 | 35 | @GetMapping("queryDiagnoseIncomeInfo") |
| 35 | - public BaseResponse queryDiagnoseIncomeInfo(DiagnoseincomeInfo diagnoseincomeInfo,Integer current,Integer size){ | |
| 36 | + @TokenRequired | |
| 37 | + public BaseResponse queryDiagnoseIncomeInfo(DiagnoseincomeInfo diagnoseincomeInfo,Integer current,Integer size){ | |
| 36 | 38 | Page<DiagnoseincomeInfo> page=new Page<>(current,size); |
| 37 | 39 | QueryWrapper<DiagnoseincomeInfo> queryWrapper=new QueryWrapper<>(); |
| 38 | 40 | //放入条件查询的实体类 |
| ... | ... | @@ -43,7 +45,7 @@ |
| 43 | 45 | queryWrapper.apply("date_format(createdtime,'%Y-%m-%d')>=date_format({0},'%Y-%m-%d')", diagnoseincomeInfo.getStartdate()); |
| 44 | 46 | queryWrapper.apply("date_format(createdtime,'%Y-%m-%d')<=date_format({0},'%Y-%m-%d')", diagnoseincomeInfo.getEnddate()); |
| 45 | 47 | } |
| 46 | -// queryWrapper.and(Wrapper->Wrapper.like("dname",diagnoseincomeInfo.getDname()));//模糊查询 | |
| 48 | + // queryWrapper.and(Wrapper->Wrapper.like("dname",diagnoseincomeInfo.getDname()));//模糊查询 | |
| 47 | 49 | queryWrapper.groupBy("did"); |
| 48 | 50 | queryWrapper.orderByDesc("createdtime"); |
| 49 | 51 | Page<DiagnoseincomeInfo> diagnoseincomeInfoPage=diagnoseincomeInfoService.page(page, queryWrapper); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/DoctorController.java
View file @
1d891e8
| ... | ... | @@ -6,6 +6,7 @@ |
| 6 | 6 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 7 | 7 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 8 | 8 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 9 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 9 | 10 | import com.lyms.talkonlineweb.domain.*; |
| 10 | 11 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 11 | 12 | import com.lyms.talkonlineweb.service.*; |
| ... | ... | @@ -57,6 +58,7 @@ |
| 57 | 58 | * @return |
| 58 | 59 | */ |
| 59 | 60 | @GetMapping("sltDoctorLst") |
| 61 | + @TokenRequired | |
| 60 | 62 | public BaseResponse sltDoctorLst(LymsDoctor doctor, int current, int size){ |
| 61 | 63 | BaseResponse baseResponse=new BaseResponse(); |
| 62 | 64 | LambdaQueryWrapper<LymsDoctor> queryWrapper = new QueryWrapper().lambda(); |
| ... | ... | @@ -103,6 +105,7 @@ |
| 103 | 105 | * @return |
| 104 | 106 | */ |
| 105 | 107 | @PostMapping("saveDoctor") |
| 108 | + @TokenRequired | |
| 106 | 109 | public BaseResponse saveDoctor(@Validated LymsDoctor doctor, BindingResult result){ |
| 107 | 110 | BaseResponse baseResponse=new BaseResponse(); |
| 108 | 111 | baseResponse.setErrormsg(""); |
| ... | ... | @@ -156,6 +159,7 @@ |
| 156 | 159 | * @return |
| 157 | 160 | */ |
| 158 | 161 | @GetMapping("delDoctor") |
| 162 | + @TokenRequired | |
| 159 | 163 | public BaseResponse delDoctor(LymsDoctor doctor){ |
| 160 | 164 | BaseResponse baseResponse=new BaseResponse(); |
| 161 | 165 | boolean f=lymsDoctorService.removeById(doctor.getDid()); |
| ... | ... | @@ -198,6 +202,7 @@ |
| 198 | 202 | * @return |
| 199 | 203 | */ |
| 200 | 204 | @GetMapping("statDoctor") |
| 205 | + @TokenRequired | |
| 201 | 206 | public BaseResponse statDoctor(Integer hid,Integer dpid,String dname){ |
| 202 | 207 | BaseResponse baseResponse=new BaseResponse(); |
| 203 | 208 | Map<String,Object> stat=lymsDoctorService.statDoctor(hid,dpid,dname); |
| ... | ... | @@ -234,6 +239,7 @@ |
| 234 | 239 | * @return |
| 235 | 240 | */ |
| 236 | 241 | @GetMapping("queryDoctor") |
| 242 | + @TokenRequired | |
| 237 | 243 | public BaseResponse queryDoctor(LymsDoctor doctor){ |
| 238 | 244 | BaseResponse baseResponse=new BaseResponse(); |
| 239 | 245 | LymsDoctor doctor2=lymsDoctorService.getOne(Wrappers.query(doctor)); |
| ... | ... | @@ -259,6 +265,7 @@ |
| 259 | 265 | * @return |
| 260 | 266 | */ |
| 261 | 267 | @GetMapping("appGetDoctorList") |
| 268 | + @TokenRequired | |
| 262 | 269 | public BaseResponse appGetDoctorList(AppgetdoctorlistInfo appgetdoctorlistInfo, int current, int size){ |
| 263 | 270 | BaseResponse baseResponse=new BaseResponse(); |
| 264 | 271 | LambdaQueryWrapper<AppgetdoctorlistInfo> queryWrapper = new QueryWrapper().lambda(); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/FavorController.java
View file @
1d891e8
| 1 | 1 | package com.lyms.talkonlineweb.controller; |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 4 | 5 | import com.lyms.talkonlineweb.domain.LymsFavor; |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsHdepart; |
| 6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -33,6 +34,7 @@ |
| 33 | 34 | * @return |
| 34 | 35 | */ |
| 35 | 36 | @PostMapping("saveFavor") |
| 37 | + @TokenRequired | |
| 36 | 38 | public BaseResponse saveFavor(@RequestBody Map<String,Object> param){ |
| 37 | 39 | BaseResponse baseResponse=new BaseResponse(); |
| 38 | 40 | boolean f=false; |
| ... | ... | @@ -57,6 +59,7 @@ |
| 57 | 59 | * @return |
| 58 | 60 | */ |
| 59 | 61 | @GetMapping("getFavor") |
| 62 | + @TokenRequired | |
| 60 | 63 | public BaseResponse getFavor(LymsFavor favor){ |
| 61 | 64 | BaseResponse baseResponse=new BaseResponse(); |
| 62 | 65 | List<LymsFavor> flst=lymsFavorService.list(Wrappers.query(favor)); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/GetPatientInfoController.java
View file @
1d891e8
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/HospitalController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsDict; |
| 6 | 7 | import com.lyms.talkonlineweb.domain.LymsHospital; |
| 7 | 8 | import com.lyms.talkonlineweb.domain.LymsLogsCrud; |
| ... | ... | @@ -40,6 +41,7 @@ |
| 40 | 41 | * @return |
| 41 | 42 | */ |
| 42 | 43 | @GetMapping("sltHospLst") |
| 44 | + @TokenRequired | |
| 43 | 45 | public BaseResponse sltHospLst(LymsHospital hospital,int current,int size){ |
| 44 | 46 | BaseResponse baseResponse=new BaseResponse(); |
| 45 | 47 | Page<LymsHospital> page=new Page<>(current,size); |
| ... | ... | @@ -56,6 +58,7 @@ |
| 56 | 58 | * @return |
| 57 | 59 | */ |
| 58 | 60 | @GetMapping("getAllHospLst") |
| 61 | + @TokenRequired | |
| 59 | 62 | public BaseResponse getAllHospLst(LymsHospital hospital){ |
| 60 | 63 | BaseResponse baseResponse=new BaseResponse(); |
| 61 | 64 | List<LymsHospital> hospPage=lymsHospitalService.list( Wrappers.query(hospital).orderByDesc("updatedtime","createdtime")); |
| ... | ... | @@ -110,6 +113,7 @@ |
| 110 | 113 | * @return |
| 111 | 114 | */ |
| 112 | 115 | @PostMapping("saveHosp") |
| 116 | + @TokenRequired | |
| 113 | 117 | public BaseResponse saveHosp(@RequestBody LymsHospital hospital){ |
| 114 | 118 | BaseResponse baseResponse=new BaseResponse(); |
| 115 | 119 | if(hospital.getHid()==null){ |
| ... | ... | @@ -129,6 +133,7 @@ |
| 129 | 133 | * @return |
| 130 | 134 | */ |
| 131 | 135 | @GetMapping("delHosp") |
| 136 | + @TokenRequired | |
| 132 | 137 | public BaseResponse delHosp(int hid){ |
| 133 | 138 | BaseResponse baseResponse=new BaseResponse(); |
| 134 | 139 | boolean f=lymsHospitalService.removeById(hid); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/IndexController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.*; |
| 6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 7 | 8 | import com.lyms.talkonlineweb.service.IndexService; |
| ... | ... | @@ -32,6 +33,7 @@ |
| 32 | 33 | * @return |
| 33 | 34 | */ |
| 34 | 35 | @GetMapping("getVsStat") |
| 36 | + @TokenRequired | |
| 35 | 37 | public BaseResponse getVsStat(){ |
| 36 | 38 | BaseResponse baseResponse=new BaseResponse(); |
| 37 | 39 | |
| ... | ... | @@ -46,6 +48,7 @@ |
| 46 | 48 | * @return |
| 47 | 49 | */ |
| 48 | 50 | @GetMapping("getTkRecordStatH") |
| 51 | + @TokenRequired | |
| 49 | 52 | public BaseResponse getTkRecordStatH(Integer hid){ |
| 50 | 53 | BaseResponse baseResponse=new BaseResponse(); |
| 51 | 54 | List<TkRecordStatHInfo> tkRecordStatH = tkRecordStatService.getTkRecordStatH(hid); |
| ... | ... | @@ -58,6 +61,7 @@ |
| 58 | 61 | * @return |
| 59 | 62 | */ |
| 60 | 63 | @GetMapping("getTkRecordStatW") |
| 64 | + @TokenRequired | |
| 61 | 65 | public BaseResponse getTkRecordStatW(Integer hid){ |
| 62 | 66 | BaseResponse baseResponse=new BaseResponse(); |
| 63 | 67 | List<TkRecordStatWInfo> tkRecordStatW = tkRecordStatService.getTkRecordStatW(hid); |
| ... | ... | @@ -70,6 +74,7 @@ |
| 70 | 74 | * @return |
| 71 | 75 | */ |
| 72 | 76 | @GetMapping("getTkRecordStatM") |
| 77 | + @TokenRequired | |
| 73 | 78 | public BaseResponse getTkRecordStatM(Integer hid){ |
| 74 | 79 | BaseResponse baseResponse=new BaseResponse(); |
| 75 | 80 | List<TkRecordStatMInfo> tkRecordStatM = tkRecordStatService.getTkRecordStatM(hid); |
| ... | ... | @@ -82,6 +87,7 @@ |
| 82 | 87 | * @return |
| 83 | 88 | */ |
| 84 | 89 | @GetMapping("getTkRecordStatY") |
| 90 | + @TokenRequired | |
| 85 | 91 | public BaseResponse getTkRecordStatY(Integer hid){ |
| 86 | 92 | BaseResponse baseResponse=new BaseResponse(); |
| 87 | 93 | List<TkRecordStatYInfo> tkRecordStatY = tkRecordStatService.getTkRecordStatY(hid); |
| ... | ... | @@ -94,6 +100,7 @@ |
| 94 | 100 | * @return |
| 95 | 101 | */ |
| 96 | 102 | @GetMapping("getTkRecordStatDate") |
| 103 | + @TokenRequired | |
| 97 | 104 | public BaseResponse getTkRecordStatDate(String startdate,String enddate,Integer hid){ |
| 98 | 105 | BaseResponse baseResponse=new BaseResponse(); |
| 99 | 106 | List<TkRecordStatDateInfo> tkRecordStatDate = tkRecordStatService.getTkRecordStatDate(startdate,enddate,hid); |
| ... | ... | @@ -106,6 +113,7 @@ |
| 106 | 113 | * @return |
| 107 | 114 | */ |
| 108 | 115 | @GetMapping("getTkRecordStatRanking") |
| 116 | + @TokenRequired | |
| 109 | 117 | public BaseResponse getTkRecordStatRanking(){ |
| 110 | 118 | BaseResponse baseResponse=new BaseResponse(); |
| 111 | 119 | List<TkRecordStatRankingInfo> tkRecordStatRanking = tkRecordStatService.getTkRecordStatRanking(); |
| ... | ... | @@ -118,6 +126,7 @@ |
| 118 | 126 | * @return |
| 119 | 127 | */ |
| 120 | 128 | @GetMapping("getLogsRecordVisitsInfo") |
| 129 | + @TokenRequired | |
| 121 | 130 | public BaseResponse getLogsRecordVisitsInfo(String startdate,String enddate,Integer hid){ |
| 122 | 131 | BaseResponse baseResponse=new BaseResponse(); |
| 123 | 132 | Map<String,Object>map=new HashMap<>(); |
| ... | ... | @@ -135,6 +144,7 @@ |
| 135 | 144 | * @return |
| 136 | 145 | */ |
| 137 | 146 | @GetMapping("getDepartStat") |
| 147 | + @TokenRequired | |
| 138 | 148 | public BaseResponse getDepartStat(Integer hid){ |
| 139 | 149 | BaseResponse baseResponse=new BaseResponse(); |
| 140 | 150 | Map<String,Object> param=new HashMap<>(); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsHisInfoController.java
View file @
1d891e8
| ... | ... | @@ -4,16 +4,22 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 7 | 8 | import com.lyms.talkonlineweb.domain.LymsDict; |
| 8 | 9 | import com.lyms.talkonlineweb.domain.LymsHisInfo; |
| 10 | +import com.lyms.talkonlineweb.domain.LymsUser; | |
| 9 | 11 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 12 | +import com.lyms.talkonlineweb.result.CheckResult; | |
| 10 | 13 | import com.lyms.talkonlineweb.service.LymsHisInfoService; |
| 14 | +import com.lyms.talkonlineweb.service.LymsUserService; | |
| 15 | +import com.lyms.talkonlineweb.util.JwtUtils; | |
| 11 | 16 | import com.lyms.talkonlineweb.util.StringUtil; |
| 12 | 17 | import org.springframework.beans.factory.annotation.Autowired; |
| 13 | 18 | import org.springframework.validation.BindingResult; |
| 14 | 19 | import org.springframework.validation.annotation.Validated; |
| 15 | 20 | import org.springframework.web.bind.annotation.*; |
| 16 | 21 | |
| 22 | +import javax.servlet.http.HttpServletRequest; | |
| 17 | 23 | import java.util.Date; |
| 18 | 24 | import java.util.List; |
| 19 | 25 | |
| 20 | 26 | |
| 21 | 27 | |
| 22 | 28 | |
| ... | ... | @@ -26,18 +32,24 @@ |
| 26 | 32 | |
| 27 | 33 | @Autowired |
| 28 | 34 | private LymsHisInfoService lymsHisInfoService; |
| 35 | + @Autowired | |
| 36 | + private LymsUserService lymsUserService; | |
| 29 | 37 | |
| 30 | - | |
| 31 | 38 | /** |
| 32 | 39 | * 获取医院患者列表 |
| 33 | 40 | * @param hisInfo |
| 34 | 41 | * @return |
| 35 | 42 | */ |
| 36 | 43 | @GetMapping("getHisInfo") |
| 37 | - public BaseResponse getHisInfo(LymsHisInfo hisInfo,int current,int size){ | |
| 44 | + @TokenRequired | |
| 45 | + public BaseResponse getHisInfo(LymsHisInfo hisInfo, int current, int size, @RequestHeader String authorization){ | |
| 46 | + LymsUser logUser=lymsUserService.getUserByToken(authorization); | |
| 38 | 47 | BaseResponse baseResponse=new BaseResponse(); |
| 39 | 48 | Page<LymsHisInfo> page=new Page<>(current,size); |
| 40 | 49 | QueryWrapper<LymsHisInfo> query=new QueryWrapper(); |
| 50 | + if(null!=logUser.getHid()) { | |
| 51 | + query.eq("hospitalId", logUser.getHid().toString()); | |
| 52 | + } | |
| 41 | 53 | query.orderByDesc("createdtime"); |
| 42 | 54 | if(null!=hisInfo.getUpType()){ |
| 43 | 55 | query.eq("up_type", hisInfo.getUpType()); |
| ... | ... | @@ -64,6 +76,7 @@ |
| 64 | 76 | * @return |
| 65 | 77 | */ |
| 66 | 78 | @PostMapping("upHisInfo") |
| 79 | + @TokenRequired | |
| 67 | 80 | public BaseResponse upHisInfo( @RequestBody @Validated LymsHisInfo lymsHisInfo){ |
| 68 | 81 | BaseResponse baseResponse=new BaseResponse(); |
| 69 | 82 | baseResponse.setErrorcode(0); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/LymsLogsController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsLogsCrud; |
| 6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 7 | 8 | import com.lyms.talkonlineweb.service.LymsLogsCrudService; |
| ... | ... | @@ -23,6 +24,7 @@ |
| 23 | 24 | * @return |
| 24 | 25 | */ |
| 25 | 26 | @GetMapping("logscrud") |
| 27 | + @TokenRequired | |
| 26 | 28 | public BaseResponse logscrud(LymsLogsCrud lymsLogsCrud, Integer current, Integer size){ |
| 27 | 29 | BaseResponse baseResponse=new BaseResponse(); |
| 28 | 30 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/OrderController.java
View file @
1d891e8
| ... | ... | @@ -5,6 +5,7 @@ |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| 6 | 6 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 7 | 7 | import com.lyms.talkonlineweb.annotation.Resubmit; |
| 8 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 8 | 9 | import com.lyms.talkonlineweb.domain.LymsGoods; |
| 9 | 10 | import com.lyms.talkonlineweb.domain.LymsOrder; |
| 10 | 11 | import com.lyms.talkonlineweb.domain.LymsPatient; |
| ... | ... | @@ -77,6 +78,7 @@ |
| 77 | 78 | * @param response |
| 78 | 79 | */ |
| 79 | 80 | @PostMapping("createPayOrder") |
| 81 | + @TokenRequired | |
| 80 | 82 | @Resubmit |
| 81 | 83 | public BaseResponse createPayOrder(@RequestBody LymsOrder lymsOrder, |
| 82 | 84 | HttpServletRequest request, HttpServletResponse response) { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PatientController.java
View file @
1d891e8
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 9 | 9 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 10 | 10 | import com.baomidou.mybatisplus.extension.service.IService; |
| 11 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 11 | 12 | import com.lyms.talkonlineweb.domain.*; |
| 12 | 13 | import com.lyms.talkonlineweb.request.PatientInfoRequest; |
| 13 | 14 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -83,6 +84,7 @@ |
| 83 | 84 | * @return |
| 84 | 85 | */ |
| 85 | 86 | @GetMapping("sltPatientLst") |
| 87 | + @TokenRequired | |
| 86 | 88 | public BaseResponse sltPatientLst(PatientInfo patientInfo, int current, int size, @RequestParam(required = false) Integer qtype) { |
| 87 | 89 | BaseResponse baseResponse = new BaseResponse(); |
| 88 | 90 | Page<PatientInfo> page = new Page<>(current, size); |
| ... | ... | @@ -123,6 +125,7 @@ |
| 123 | 125 | * @return |
| 124 | 126 | */ |
| 125 | 127 | @PostMapping("savePatient") |
| 128 | + @TokenRequired | |
| 126 | 129 | public BaseResponse savePatient(@Validated LymsPatient patient, BindingResult result, LymsPcase pcase, String illness) { |
| 127 | 130 | BaseResponse baseResponse = new BaseResponse(); |
| 128 | 131 | log.info(">>>>>>>>>>>>>>>登记病例"); |
| ... | ... | @@ -241,6 +244,7 @@ |
| 241 | 244 | * @return |
| 242 | 245 | */ |
| 243 | 246 | @PostMapping("updatePatient") |
| 247 | + @TokenRequired | |
| 244 | 248 | public BaseResponse updatePatient(@RequestBody LymsPatient patient){ |
| 245 | 249 | BaseResponse baseResponse=new BaseResponse(); |
| 246 | 250 | boolean f=false; |
| ... | ... | @@ -259,6 +263,7 @@ |
| 259 | 263 | * @return |
| 260 | 264 | */ |
| 261 | 265 | @GetMapping("delPatient") |
| 266 | + @TokenRequired | |
| 262 | 267 | public BaseResponse delPatient(int id) { |
| 263 | 268 | BaseResponse baseResponse = new BaseResponse(); |
| 264 | 269 | boolean f = lymsPatientService.removeById(id); |
| ... | ... | @@ -273,6 +278,7 @@ |
| 273 | 278 | * @return |
| 274 | 279 | */ |
| 275 | 280 | @GetMapping("delPcase") |
| 281 | + @TokenRequired | |
| 276 | 282 | public BaseResponse delPcase(int pcid) { |
| 277 | 283 | BaseResponse baseResponse = new BaseResponse(); |
| 278 | 284 | boolean f = lymsPcaseService.removeById(pcid); |
| ... | ... | @@ -373,6 +379,7 @@ |
| 373 | 379 | * @return |
| 374 | 380 | */ |
| 375 | 381 | @GetMapping("queryPatient") |
| 382 | + @TokenRequired | |
| 376 | 383 | public BaseResponse queryPatient(PatientInfo patientInfo) { |
| 377 | 384 | BaseResponse baseResponse = new BaseResponse(); |
| 378 | 385 | PatientInfo patientInfo2 = patientInfoService.getOne(Wrappers.query(patientInfo)); |
| ... | ... | @@ -386,6 +393,7 @@ |
| 386 | 393 | * @return |
| 387 | 394 | */ |
| 388 | 395 | @GetMapping("queryPatient2") |
| 396 | + @TokenRequired | |
| 389 | 397 | public BaseResponse queryPatient2(PatientInfo patientInfo) { |
| 390 | 398 | BaseResponse baseResponse = new BaseResponse(); |
| 391 | 399 | List<PatientInfo> patientInfo2 = patientInfoService.list(Wrappers.query(patientInfo)); |
| ... | ... | @@ -401,6 +409,7 @@ |
| 401 | 409 | * @return |
| 402 | 410 | */ |
| 403 | 411 | @GetMapping("getPatientHospitals") |
| 412 | + @TokenRequired | |
| 404 | 413 | public BaseResponse getPatientHospitals(LymsPcase lymsPcase) { |
| 405 | 414 | BaseResponse baseResponse = new BaseResponse(); |
| 406 | 415 | List<LymsPcase> pcases = lymsPcaseService.list(Wrappers.query(lymsPcase)); |
| ... | ... | @@ -418,6 +427,7 @@ |
| 418 | 427 | * @return |
| 419 | 428 | */ |
| 420 | 429 | @GetMapping("getPatientHospitalPcase") |
| 430 | + @TokenRequired | |
| 421 | 431 | public BaseResponse getPatientHospitalPcase(int pid, int hid, |
| 422 | 432 | @RequestParam(required = false) String keyword) { |
| 423 | 433 | BaseResponse baseResponse = new BaseResponse(); |
| ... | ... | @@ -509,6 +519,7 @@ |
| 509 | 519 | * @return |
| 510 | 520 | */ |
| 511 | 521 | @GetMapping("getPatientBaseInfo") |
| 522 | + @TokenRequired | |
| 512 | 523 | public BaseResponse getPatientBaseInfo(LymsPatient lymsPatient) { |
| 513 | 524 | |
| 514 | 525 | BaseResponse baseResponse = new BaseResponse(); |
| ... | ... | @@ -541,6 +552,7 @@ |
| 541 | 552 | * @return |
| 542 | 553 | */ |
| 543 | 554 | @PutMapping("updatePatientInfo") |
| 555 | + @TokenRequired | |
| 544 | 556 | public BaseResponse updatePatientInfo(@RequestBody PatientInfoRequest request) { |
| 545 | 557 | BaseResponse baseResponse = new BaseResponse(); |
| 546 | 558 | LymsPatient patients = lymsPatientService.getById(request.getPid()); |
| ... | ... | @@ -571,6 +583,7 @@ |
| 571 | 583 | * @return |
| 572 | 584 | */ |
| 573 | 585 | @GetMapping("getPatienttkrecord") |
| 586 | + @TokenRequired | |
| 574 | 587 | public BaseResponse getPatienttkrecord(LymsTkrecord lymsTkrecord) { |
| 575 | 588 | |
| 576 | 589 | BaseResponse baseResponse = new BaseResponse(); |
| ... | ... | @@ -634,6 +647,7 @@ |
| 634 | 647 | * @return |
| 635 | 648 | */ |
| 636 | 649 | @GetMapping("getPatientAttentions") |
| 650 | + @TokenRequired | |
| 637 | 651 | public BaseResponse getPatientAttentions(LymsAttention lymsAttention) { |
| 638 | 652 | |
| 639 | 653 | BaseResponse baseResponse = new BaseResponse(); |
| ... | ... | @@ -679,6 +693,7 @@ |
| 679 | 693 | * @return 医院id和医院名称 |
| 680 | 694 | */ |
| 681 | 695 | @GetMapping("getAppPatientHospital") |
| 696 | + @TokenRequired | |
| 682 | 697 | public BaseResponse getAppPatientHospital(Integer patientId) { |
| 683 | 698 | BaseResponse baseResponse = new BaseResponse(); |
| 684 | 699 | List<Map<String,String>>patientListMap=lymsPatientService.getAppPatientHospital(patientId); |
| ... | ... | @@ -693,6 +708,7 @@ |
| 693 | 708 | * @return |
| 694 | 709 | */ |
| 695 | 710 | @GetMapping("updateCcnt") |
| 711 | + @TokenRequired | |
| 696 | 712 | public BaseResponse updateCcnt(LymsPatient patient){ |
| 697 | 713 | BaseResponse baseResponse=new BaseResponse(); |
| 698 | 714 | boolean f=false; |
| ... | ... | @@ -720,6 +736,7 @@ |
| 720 | 736 | * @return |
| 721 | 737 | */ |
| 722 | 738 | @GetMapping("cardStat") |
| 739 | + @TokenRequired | |
| 723 | 740 | public BaseResponse cardStat(Integer type){ |
| 724 | 741 | BaseResponse baseResponse = new BaseResponse(); |
| 725 | 742 | String pSql=""; |
| ... | ... | @@ -737,6 +754,7 @@ |
| 737 | 754 | * @return |
| 738 | 755 | */ |
| 739 | 756 | @PostMapping("saveAttention") |
| 757 | + @TokenRequired | |
| 740 | 758 | public BaseResponse saveAttention(@RequestBody LymsAttention lymsAttention){ |
| 741 | 759 | BaseResponse baseResponse=new BaseResponse(); |
| 742 | 760 | try { |
| ... | ... | @@ -753,6 +771,7 @@ |
| 753 | 771 | * @return true 可以关注 false 已关注不能再关注 |
| 754 | 772 | */ |
| 755 | 773 | @GetMapping("getDoctorById") |
| 774 | + @TokenRequired | |
| 756 | 775 | public BaseResponse getDoctorById(LymsAttention lymsAttention){ |
| 757 | 776 | BaseResponse baseResponse=new BaseResponse(); |
| 758 | 777 | try { |
| ... | ... | @@ -772,6 +791,7 @@ |
| 772 | 791 | * @return |
| 773 | 792 | */ |
| 774 | 793 | @GetMapping("getPatientByIdno") |
| 794 | + @TokenRequired | |
| 775 | 795 | public BaseResponse getPatientByIdno(String idno){ |
| 776 | 796 | BaseResponse baseResponse=new BaseResponse(); |
| 777 | 797 | try { |
| ... | ... | @@ -798,6 +818,7 @@ |
| 798 | 818 | * @param logEntity |
| 799 | 819 | */ |
| 800 | 820 | @GetMapping("saveLoginLog") |
| 821 | + @TokenRequired | |
| 801 | 822 | public void saveLoginLog(LymsLogs logEntity ){ |
| 802 | 823 | |
| 803 | 824 | log.debug(">>>>>>>>>"+logEntity); |
| ... | ... | @@ -806,6 +827,7 @@ |
| 806 | 827 | } |
| 807 | 828 | |
| 808 | 829 | @PostMapping("updatePatientCase") |
| 830 | + @TokenRequired | |
| 809 | 831 | public BaseResponse updatePatient(LymsPatient patient,LymsPcase pcase,LymsIllness illness,Integer ilid){ |
| 810 | 832 | BaseResponse baseResponse=new BaseResponse(); |
| 811 | 833 | baseResponse.setErrorcode(1); |
| ... | ... | @@ -832,6 +854,7 @@ |
| 832 | 854 | * @return |
| 833 | 855 | */ |
| 834 | 856 | @GetMapping("getDepartIllness") |
| 857 | + @TokenRequired | |
| 835 | 858 | public BaseResponse getDepartIllness(String did){ |
| 836 | 859 | BaseResponse baseResponse=new BaseResponse(); |
| 837 | 860 | try { |
| ... | ... | @@ -860,6 +883,7 @@ |
| 860 | 883 | * @return |
| 861 | 884 | */ |
| 862 | 885 | @PostMapping("updatePatientPassword") |
| 886 | + @TokenRequired | |
| 863 | 887 | public BaseResponse updatePatientPassword(@RequestBody LymsPatient patient){ |
| 864 | 888 | BaseResponse baseResponse=new BaseResponse(); |
| 865 | 889 | if(1==patient.getType()){//1 重置密码 |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/PermissController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsPermission; |
| 6 | 7 | import com.lyms.talkonlineweb.domain.LymsUser; |
| 7 | 8 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -30,6 +31,7 @@ |
| 30 | 31 | * @return |
| 31 | 32 | */ |
| 32 | 33 | @PostMapping("savePerm") |
| 34 | + @TokenRequired | |
| 33 | 35 | public BaseResponse savePerm(LymsPermission perm){ |
| 34 | 36 | BaseResponse baseResponse=new BaseResponse(); |
| 35 | 37 | boolean f=lymsPermissionService.saveOrUpdate(perm); |
| ... | ... | @@ -43,6 +45,7 @@ |
| 43 | 45 | * @return |
| 44 | 46 | */ |
| 45 | 47 | @PostMapping("delPerm") |
| 48 | + @TokenRequired | |
| 46 | 49 | public BaseResponse delPerm(LymsPermission perm){ |
| 47 | 50 | BaseResponse baseResponse=new BaseResponse(); |
| 48 | 51 | boolean f=lymsPermissionService.remove(Wrappers.query(perm)); |
| ... | ... | @@ -58,6 +61,7 @@ |
| 58 | 61 | * @return |
| 59 | 62 | */ |
| 60 | 63 | @PostMapping("sltPerm") |
| 64 | + @TokenRequired | |
| 61 | 65 | public BaseResponse sltPerm(LymsPermission perm,int current,int size){ |
| 62 | 66 | BaseResponse baseResponse=new BaseResponse(); |
| 63 | 67 | Page<LymsPermission> page=new Page<>(current,size); |
| ... | ... | @@ -74,6 +78,7 @@ |
| 74 | 78 | * @return |
| 75 | 79 | */ |
| 76 | 80 | @GetMapping("getAllPerm") |
| 81 | + @TokenRequired | |
| 77 | 82 | public BaseResponse getAllPerm(LymsPermission perm){ |
| 78 | 83 | BaseResponse baseResponse=new BaseResponse(); |
| 79 | 84 |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RegionsController.java
View file @
1d891e8
| ... | ... | @@ -4,6 +4,7 @@ |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| 5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 7 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 7 | 8 | import com.lyms.talkonlineweb.domain.LymsDict; |
| 8 | 9 | import com.lyms.talkonlineweb.domain.LymsHdepart; |
| 9 | 10 | import com.lyms.talkonlineweb.domain.LymsUser; |
| ... | ... | @@ -32,6 +33,7 @@ |
| 32 | 33 | private LymsDictService lymsDictService; |
| 33 | 34 | |
| 34 | 35 | @GetMapping("getRegions") |
| 36 | + @TokenRequired | |
| 35 | 37 | public BaseResponse getRegions(Regions regions){ |
| 36 | 38 | BaseResponse baseResponse=new BaseResponse(); |
| 37 | 39 | List<Regions> regionsList=regionsService.list(Wrappers.query(regions)); |
| ... | ... | @@ -45,6 +47,7 @@ |
| 45 | 47 | * @return |
| 46 | 48 | */ |
| 47 | 49 | @GetMapping("getDict") |
| 50 | + @TokenRequired | |
| 48 | 51 | public BaseResponse getDict(LymsDict dict){ |
| 49 | 52 | BaseResponse baseResponse=new BaseResponse(); |
| 50 | 53 | List<LymsDict> dictList=lymsDictService.list(Wrappers.query(dict)); |
| ... | ... | @@ -58,6 +61,7 @@ |
| 58 | 61 | * @return |
| 59 | 62 | */ |
| 60 | 63 | @PostMapping("saveDict") |
| 64 | + @TokenRequired | |
| 61 | 65 | public BaseResponse saveDict(@RequestBody LymsDict dict){ |
| 62 | 66 | BaseResponse baseResponse=new BaseResponse(); |
| 63 | 67 | boolean f=lymsDictService.saveOrUpdate(dict); |
| ... | ... | @@ -71,6 +75,7 @@ |
| 71 | 75 | * @return |
| 72 | 76 | */ |
| 73 | 77 | @GetMapping("delDict") |
| 78 | + @TokenRequired | |
| 74 | 79 | public BaseResponse saveDict(int did){ |
| 75 | 80 | BaseResponse baseResponse=new BaseResponse(); |
| 76 | 81 | boolean f=lymsDictService.removeById(did); |
| ... | ... | @@ -86,6 +91,7 @@ |
| 86 | 91 | * @return |
| 87 | 92 | */ |
| 88 | 93 | @GetMapping("sltDict") |
| 94 | + @TokenRequired | |
| 89 | 95 | public BaseResponse sltDepartLst(LymsDict dict, int current, int size){ |
| 90 | 96 | BaseResponse baseResponse=new BaseResponse(); |
| 91 | 97 | Page<LymsDict> page=new Page<>(current,size); |
| ... | ... | @@ -115,6 +121,7 @@ |
| 115 | 121 | * @return true 可以使用,false已经存在 |
| 116 | 122 | */ |
| 117 | 123 | @GetMapping("getDictByParam") |
| 124 | + @TokenRequired | |
| 118 | 125 | public BaseResponse getDictByParam(Integer vtype, Integer code,String value, @RequestParam(required = false) Integer id){ |
| 119 | 126 | BaseResponse baseResponse=new BaseResponse(); |
| 120 | 127 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/RoleController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 4 | 4 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.LymsPermission; |
| 6 | 7 | import com.lyms.talkonlineweb.domain.LymsRole; |
| 7 | 8 | import com.lyms.talkonlineweb.domain.LymsUser; |
| ... | ... | @@ -36,6 +37,7 @@ |
| 36 | 37 | * @return |
| 37 | 38 | */ |
| 38 | 39 | @PostMapping("saveRole") |
| 40 | + @TokenRequired | |
| 39 | 41 | public BaseResponse saveRole(LymsRole role){ |
| 40 | 42 | BaseResponse baseResponse=new BaseResponse(); |
| 41 | 43 | |
| ... | ... | @@ -67,6 +69,7 @@ |
| 67 | 69 | * @return |
| 68 | 70 | */ |
| 69 | 71 | @GetMapping("sltRole") |
| 72 | + @TokenRequired | |
| 70 | 73 | public BaseResponse sltRole(LymsRole role,int current,int size){ |
| 71 | 74 | BaseResponse baseResponse=new BaseResponse(); |
| 72 | 75 | Page<LymsRole> page=new Page<>(current,size); |
| ... | ... | @@ -81,6 +84,7 @@ |
| 81 | 84 | * @return |
| 82 | 85 | */ |
| 83 | 86 | @GetMapping("delRole") |
| 87 | + @TokenRequired | |
| 84 | 88 | public BaseResponse delRole(int rid){ |
| 85 | 89 | BaseResponse baseResponse=new BaseResponse(); |
| 86 | 90 | boolean f=lymsRoleService.removeById(rid); |
| ... | ... | @@ -94,6 +98,7 @@ |
| 94 | 98 | * @return |
| 95 | 99 | */ |
| 96 | 100 | @GetMapping("getRolesByUid") |
| 101 | + @TokenRequired | |
| 97 | 102 | public BaseResponse getRolesByUid(int uid){ |
| 98 | 103 | BaseResponse baseResponse=new BaseResponse(); |
| 99 | 104 | List<LymsRole> rLst=lymsRoleService.getRolesByUid(uid); |
| ... | ... | @@ -108,6 +113,7 @@ |
| 108 | 113 | * @return |
| 109 | 114 | */ |
| 110 | 115 | @PostMapping("addRoleByPerms") |
| 116 | + @TokenRequired | |
| 111 | 117 | public BaseResponse addRoleByPerms(int rid,String perms){ |
| 112 | 118 | BaseResponse baseResponse=new BaseResponse(); |
| 113 | 119 | String[] pArr=perms.split(","); |
| ... | ... | @@ -127,6 +133,7 @@ |
| 127 | 133 | * @return |
| 128 | 134 | */ |
| 129 | 135 | @GetMapping("getPersByRid") |
| 136 | + @TokenRequired | |
| 130 | 137 | public BaseResponse getPersByRid(int rid){ |
| 131 | 138 | BaseResponse baseResponse=new BaseResponse(); |
| 132 | 139 | List<LymsPermission> pLst=lymsRoleService.getPersByRid(rid); |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/SearchLogsController.java
View file @
1d891e8
| 1 | 1 | package com.lyms.talkonlineweb.controller; |
| 2 | 2 | |
| 3 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 3 | 4 | import com.lyms.talkonlineweb.domain.LymsSearchlogs; |
| 4 | 5 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 5 | 6 | import com.lyms.talkonlineweb.service.LymsSearchlogsService; |
| ... | ... | @@ -20,6 +21,7 @@ |
| 20 | 21 | * @return |
| 21 | 22 | */ |
| 22 | 23 | @PostMapping("saveSearchlogs") |
| 24 | + @TokenRequired | |
| 23 | 25 | public BaseResponse saveSearchlogs(@RequestBody LymsSearchlogs lymsSearchlogs){ |
| 24 | 26 | BaseResponse baseResponse=new BaseResponse(); |
| 25 | 27 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/TkRecordController.java
View file @
1d891e8
| ... | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | |
| 3 | 3 | import com.alibaba.fastjson.JSONObject; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 5 | 6 | import com.lyms.talkonlineweb.domain.*; |
| 6 | 7 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 7 | 8 | import com.lyms.talkonlineweb.service.*; |
| ... | ... | @@ -41,6 +42,7 @@ |
| 41 | 42 | * @return |
| 42 | 43 | */ |
| 43 | 44 | @PostMapping("saveTkRecord") |
| 45 | + @TokenRequired | |
| 44 | 46 | public BaseResponse saveTkRecord(@RequestBody @Validated LymsTkrecord tkrecord){ |
| 45 | 47 | BaseResponse baseResponse=new BaseResponse(); |
| 46 | 48 | try { |
| ... | ... | @@ -109,6 +111,7 @@ |
| 109 | 111 | * @return |
| 110 | 112 | */ |
| 111 | 113 | @PostMapping("deleteTkRecord") |
| 114 | + @TokenRequired | |
| 112 | 115 | public BaseResponse deleteTkRecord(Integer tkid){ |
| 113 | 116 | BaseResponse baseResponse=new BaseResponse(); |
| 114 | 117 | try { |
| ... | ... | @@ -128,6 +131,7 @@ |
| 128 | 131 | * @return 本月问诊数量themonth、上月问诊数量lastmonth、总问诊数量alltotal |
| 129 | 132 | */ |
| 130 | 133 | @GetMapping("queryTkRecordStatisticsByDid") |
| 134 | + @TokenRequired | |
| 131 | 135 | public BaseResponse queryTkRecordStatisticsByDid(TkrecordInfo tkrecordInfo){ |
| 132 | 136 | BaseResponse baseResponse=new BaseResponse(); |
| 133 | 137 | try { |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/UserContoller.java
View file @
1d891e8
| ... | ... | @@ -3,6 +3,7 @@ |
| 3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| 4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| 5 | 5 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| 6 | +import com.lyms.talkonlineweb.annotation.TokenRequired; | |
| 6 | 7 | import com.lyms.talkonlineweb.domain.*; |
| 7 | 8 | import com.lyms.talkonlineweb.mapper.LymsUserMapper; |
| 8 | 9 | import com.lyms.talkonlineweb.result.BaseResponse; |
| ... | ... | @@ -108,6 +109,7 @@ |
| 108 | 109 | * @return |
| 109 | 110 | */ |
| 110 | 111 | @PostMapping("getPermission") |
| 112 | + @TokenRequired | |
| 111 | 113 | public BaseResponse getPermission(@RequestHeader String authorization){ |
| 112 | 114 | |
| 113 | 115 | BaseResponse baseResponse=new BaseResponse(); |
| ... | ... | @@ -134,6 +136,7 @@ |
| 134 | 136 | * @return |
| 135 | 137 | */ |
| 136 | 138 | @RequestMapping("saveUser") |
| 139 | + @TokenRequired | |
| 137 | 140 | public BaseResponse saveUser(@Validated LymsUser user, BindingResult result, @RequestHeader String authorization){ |
| 138 | 141 | BaseResponse baseResponse=new BaseResponse(); |
| 139 | 142 | baseResponse.setErrormsg(""); |
| ... | ... | @@ -182,6 +185,7 @@ |
| 182 | 185 | * @return |
| 183 | 186 | */ |
| 184 | 187 | @PostMapping("delUser") |
| 188 | + @TokenRequired | |
| 185 | 189 | public BaseResponse delUser(int uid){ |
| 186 | 190 | BaseResponse baseResponse=new BaseResponse(); |
| 187 | 191 | boolean f=lymsUserService.removeById(uid); |
| ... | ... | @@ -208,6 +212,7 @@ |
| 208 | 212 | // |
| 209 | 213 | // return baseResponse; |
| 210 | 214 | // } |
| 215 | + @TokenRequired | |
| 211 | 216 | public BaseResponse sltUser(UserroleInfo user, int current, int size){ |
| 212 | 217 | BaseResponse baseResponse=new BaseResponse(); |
| 213 | 218 | if (StringUtils.isEmpty(user.getUname())){ |
| ... | ... | @@ -227,6 +232,7 @@ |
| 227 | 232 | * @return |
| 228 | 233 | */ |
| 229 | 234 | @PostMapping("addUserRoles") |
| 235 | + @TokenRequired | |
| 230 | 236 | public BaseResponse addUserRoles(int uid,String rids){ |
| 231 | 237 | BaseResponse baseResponse=new BaseResponse(); |
| 232 | 238 | String[] ridArr=rids.split(","); |
| ... | ... | @@ -248,6 +254,7 @@ |
| 248 | 254 | * @return |
| 249 | 255 | */ |
| 250 | 256 | @GetMapping("getUserRoleLst") |
| 257 | + @TokenRequired | |
| 251 | 258 | public BaseResponse getUserRoleLst(UserroleInfo user, int current, int size){ |
| 252 | 259 | BaseResponse baseResponse=new BaseResponse(); |
| 253 | 260 | Page<UserroleInfo> page=new Page<>(current,size); |
| ... | ... | @@ -263,6 +270,7 @@ |
| 263 | 270 | * @return |
| 264 | 271 | */ |
| 265 | 272 | @PostMapping("addUserByRoles") |
| 273 | + @TokenRequired | |
| 266 | 274 | public BaseResponse addRoleByPerms(int uid,String roles){ |
| 267 | 275 | BaseResponse baseResponse=new BaseResponse(); |
| 268 | 276 | String[] pArr=roles.split(","); |
| ... | ... | @@ -282,6 +290,7 @@ |
| 282 | 290 | * @return |
| 283 | 291 | */ |
| 284 | 292 | @RequestMapping("getUserByToken") |
| 293 | + @TokenRequired | |
| 285 | 294 | public BaseResponse getUserByToken(@RequestHeader String authorization){ |
| 286 | 295 | BaseResponse baseResponse=new BaseResponse(); |
| 287 | 296 | baseResponse.setErrormsg(""); |
| ... | ... | @@ -312,6 +321,7 @@ |
| 312 | 321 | * @return true 可以使用,false已经存在 |
| 313 | 322 | */ |
| 314 | 323 | @GetMapping("getLoginUserByLogin") |
| 324 | + @TokenRequired | |
| 315 | 325 | public BaseResponse getLoginUserByLogin(String login){ |
| 316 | 326 | BaseResponse baseResponse=new BaseResponse(); |
| 317 | 327 | try { |