Commit c5c95974306c5dbe59a4f303ea10b58e9c24c9f2
1 parent
46f24bc282
Exists in
master
and in
1 other branch
修改环信组状态 开启聊天
Showing 1 changed file with 26 additions and 11 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
c5c9597
| ... | ... | @@ -423,7 +423,7 @@ |
| 423 | 423 | |
| 424 | 424 | /** |
| 425 | 425 | * 前端3秒执行一次调用。聊天室状态(患者、医生分别查询) |
| 426 | - * @param request | |
| 426 | + * @param groupId | |
| 427 | 427 | * @return |
| 428 | 428 | */ |
| 429 | 429 | @GetMapping("getChatStat") |
| ... | ... | @@ -446,7 +446,7 @@ |
| 446 | 446 | } |
| 447 | 447 | /** |
| 448 | 448 | * 添加/修改 回访聊天信息自动回复话术 |
| 449 | - * @param request | |
| 449 | + * @param chatInfo | |
| 450 | 450 | * @return |
| 451 | 451 | */ |
| 452 | 452 | @PostMapping("addOrUpdateLymsChatInfo") |
| ... | ... | @@ -464,7 +464,7 @@ |
| 464 | 464 | } |
| 465 | 465 | /** |
| 466 | 466 | * 删除 回访聊天信息自动回复话术 |
| 467 | - * @param request | |
| 467 | + * @param id | |
| 468 | 468 | * @return |
| 469 | 469 | */ |
| 470 | 470 | @DeleteMapping("delLymsChatInfo") |
| ... | ... | @@ -482,7 +482,9 @@ |
| 482 | 482 | } |
| 483 | 483 | /** |
| 484 | 484 | * 查询列表 回访聊天信息自动回复话术 |
| 485 | - * @param request | |
| 485 | + * @param chatInfo | |
| 486 | + * @param current 页数 | |
| 487 | + * @param size 条数 | |
| 486 | 488 | * @return |
| 487 | 489 | */ |
| 488 | 490 | @GetMapping("getLymsChatInfo") |
| ... | ... | @@ -503,7 +505,7 @@ |
| 503 | 505 | } |
| 504 | 506 | /** |
| 505 | 507 | * 患者点咨询。查询是否有回访。有就直接进入聊天。不消耗问诊卡 |
| 506 | - * @param request | |
| 508 | + * @param chatgroup | |
| 507 | 509 | * @return |
| 508 | 510 | */ |
| 509 | 511 | @GetMapping("getYnReturnVisit") |
| 510 | 512 | |
| 511 | 513 | |
| ... | ... | @@ -514,17 +516,30 @@ |
| 514 | 516 | final LymsChatgroup lymsChatgroup = lymsChatgroupService.getOne(new QueryWrapper<LymsChatgroup>() |
| 515 | 517 | .lambda().eq(LymsChatgroup::getFromp, chatgroup.getFromp()) |
| 516 | 518 | .eq(LymsChatgroup::getTarget, chatgroup.getTarget()) |
| 517 | - .eq(LymsChatgroup::getPcid, chatgroup.getPcid()) | |
| 518 | - .eq(LymsChatgroup::getType, 1) | |
| 519 | - .eq(LymsChatgroup::getStat, 0)); | |
| 519 | + .eq(LymsChatgroup::getPcid, chatgroup.getPcid())); | |
| 520 | 520 | if (null!=lymsChatgroup) { |
| 521 | - Map map=new HashMap(); | |
| 522 | - map.put("hxgroupid",lymsChatgroup.getHxgroupid()); | |
| 523 | - map.put("stat",lymsChatgroup.getStat()); | |
| 524 | 521 | baseResponse.setObject(lymsChatgroup); |
| 525 | 522 | } |
| 526 | 523 | baseResponse.setErrorcode(0); |
| 527 | 524 | baseResponse.setErrormsg("成功"); |
| 525 | + } catch (Exception e) { | |
| 526 | + e.printStackTrace(); | |
| 527 | + } | |
| 528 | + return baseResponse; | |
| 529 | + } | |
| 530 | + /** | |
| 531 | + * 修改环信组状态 开启聊天 | |
| 532 | + * @param chatgroup | |
| 533 | + * @return | |
| 534 | + */ | |
| 535 | + @PostMapping("updateGroupStat") | |
| 536 | + @TokenRequired | |
| 537 | + public BaseResponse updateGroupStat(@RequestBody LymsChatgroup chatgroup){ | |
| 538 | + BaseResponse baseResponse =new BaseResponse(); | |
| 539 | + try { | |
| 540 | + final boolean b = lymsChatgroupService.updateById(chatgroup); | |
| 541 | + baseResponse.setErrorcode(b?0:1); | |
| 542 | + baseResponse.setErrormsg(b?"成功":"失败"); | |
| 528 | 543 | } catch (Exception e) { |
| 529 | 544 | e.printStackTrace(); |
| 530 | 545 | } |