Commit 2010e2a563826badfb16eb8d4d70049ff2a3f8a9
1 parent
13db49951e
Exists in
master
and in
1 other branch
update
Showing 3 changed files with 28 additions and 1 deletions
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
2010e2a
| ... | ... | @@ -51,7 +51,7 @@ |
| 51 | 51 | @PostMapping("saveChatGroup") |
| 52 | 52 | public BaseResponse saveChatGroup(@RequestBody LymsChatgroup group) { |
| 53 | 53 | BaseResponse baseResponse = new BaseResponse(); |
| 54 | - List<LymsChatgroup> gLst = lymsChatgroupService.list(Wrappers.query(group)); | |
| 54 | + List<LymsChatgroup> gLst = lymsChatgroupService.list(Wrappers.query(group).orderByDesc("id")); | |
| 55 | 55 | if (group.getOwnerk() == null) { |
| 56 | 56 | group.setOwnerk("test"); |
| 57 | 57 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/CommonController.java
View file @
2010e2a
| ... | ... | @@ -2,8 +2,14 @@ |
| 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.domain.LymsChatgroup; | |
| 6 | +import com.lyms.talkonlineweb.domain.LymsDoctor; | |
| 7 | +import com.lyms.talkonlineweb.domain.LymsPatient; | |
| 5 | 8 | import com.lyms.talkonlineweb.domain.LymsTkrecord; |
| 6 | 9 | import com.lyms.talkonlineweb.result.BaseResponse; |
| 10 | +import com.lyms.talkonlineweb.service.LymsChatgroupService; | |
| 11 | +import com.lyms.talkonlineweb.service.LymsDoctorService; | |
| 12 | +import com.lyms.talkonlineweb.service.LymsPatientService; | |
| 7 | 13 | import com.lyms.talkonlineweb.service.LymsTkrecordService; |
| 8 | 14 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | 15 | import org.springframework.web.bind.annotation.GetMapping; |
| ... | ... | @@ -19,6 +25,12 @@ |
| 19 | 25 | public class CommonController { |
| 20 | 26 | @Autowired |
| 21 | 27 | private LymsTkrecordService lymsTkrecordService; |
| 28 | + @Autowired | |
| 29 | + private LymsChatgroupService lymsChatgroupService; | |
| 30 | + @Autowired | |
| 31 | + private LymsDoctorService lymsDoctorService; | |
| 32 | + @Autowired | |
| 33 | + private LymsPatientService lymsPatientService; | |
| 22 | 34 | |
| 23 | 35 | @GetMapping("endTalk") |
| 24 | 36 | public BaseResponse endTalk(LymsTkrecord tkrecord){ |
| ... | ... | @@ -27,6 +39,16 @@ |
| 27 | 39 | baseResponse.setErrorcode(1); |
| 28 | 40 | int updateby=tkrecord.getUpdatedby(); |
| 29 | 41 | tkrecord.setUpdatedby(null); |
| 42 | + LymsChatgroup group=new LymsChatgroup(); | |
| 43 | + LymsPatient patient=lymsPatientService.getById(tkrecord.getPid()); | |
| 44 | + LymsDoctor doctor=lymsDoctorService.getById(tkrecord.getDid()); | |
| 45 | + group.setFromp(patient.getIdno()); | |
| 46 | + group.setTarget(doctor.getDlogin()); | |
| 47 | + List<LymsChatgroup> gLst = lymsChatgroupService.list(Wrappers.query(group).orderByDesc("id")); | |
| 48 | + | |
| 49 | + if(gLst.size()>0){ | |
| 50 | + tkrecord.setHxgroupid(gLst.get(0).getHxgroupid()); | |
| 51 | + } | |
| 30 | 52 | |
| 31 | 53 | List<LymsTkrecord> tLst=lymsTkrecordService.list(Wrappers.query(tkrecord).orderByDesc("createdtime")); |
| 32 | 54 | if (tLst.size()>0){ |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/domain/LymsTkrecord.java
View file @
2010e2a