Commit 651d341d4a024b9b71a43bddc8d4feb8ba9fcbba
1 parent
d43f518ab3
Exists in
master
医生端--回话会话列表获取患者信息
Showing 4 changed files with 17 additions and 18 deletions
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatgroupMapper.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatgroupService.java
- talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatgroupServiceImpl.java
talkonlineweb/src/main/java/com/lyms/talkonlineweb/controller/ChatGroupController.java
View file @
651d341
... | ... | @@ -130,27 +130,24 @@ |
130 | 130 | |
131 | 131 | /** |
132 | 132 | * 医生端--回话会话列表获取患者信息 |
133 | - * @param froms 发送人员ID | |
134 | - * @param did 问诊医生ID | |
135 | - * @param groupids 群组ID | |
133 | + * | |
134 | + * @param froms 发送人员ID | |
135 | + * @param did 问诊医生ID | |
136 | + * @param groupid 群组ID | |
136 | 137 | * @return |
137 | 138 | */ |
138 | 139 | @PostMapping("getPinfoBySession") |
139 | - public BaseResponse getPinfoBySesson(String froms,String did,String groupids){ | |
140 | + public BaseResponse getPinfoBySesson(String froms, String did, String groupid) { | |
140 | 141 | BaseResponse baseResponse = new BaseResponse(); |
141 | - List<Map<String,Object>> psList=new ArrayList<>(); | |
142 | + List<Map<String, Object>> psList = new ArrayList<>(); | |
142 | 143 | |
143 | - String[] fromArr=froms.split(","); | |
144 | - | |
145 | - for (int i = 0; i < fromArr.length; i++) { | |
146 | - List<Map<String,Object>> tmpList=lymsChatgroupService.getPinfoBySesson(fromArr[i],did); | |
147 | - if (tmpList.size()>0) { | |
148 | - psList.add(tmpList.get(0)); | |
149 | - } | |
144 | + List<Map<String, Object>> tmpList = lymsChatgroupService.getPinfoBySesson(null, did, groupid); | |
145 | + if (tmpList.size() > 0) { | |
146 | + psList.add(tmpList.get(0)); | |
150 | 147 | } |
151 | 148 | |
152 | 149 | baseResponse.setObject(psList); |
153 | - return baseResponse; | |
150 | + return baseResponse; | |
154 | 151 | } |
155 | 152 | |
156 | 153 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/mapper/LymsChatgroupMapper.java
View file @
651d341
... | ... | @@ -13,7 +13,9 @@ |
13 | 13 | */ |
14 | 14 | public interface LymsChatgroupMapper extends BaseMapper<LymsChatgroup> { |
15 | 15 | |
16 | - @Select("SELECT p.`id`, `pname`, `idno`, `ppasswd`, `sex`, `birth`, IFNULL(`headimg`,'') headimg, `ccnt`, `islogin`, `openid`, `hxid`, `pid`, `pcid`, `did`, `cid`, `fid`, `stat` FROM lyms_patient p,lyms_tkrecord r WHERE p.`id`=r.`pid` AND p.`idno` = #{froms} AND r.`did`=#{did} ORDER BY r.`createdtime` DESC") | |
17 | - List<Map<String, Object>> getPinfoBySesson(@Param("froms") String froms,@Param("did") String did); | |
16 | + @Select("SELECT p.`id`, `pname`, `idno`, `ppasswd`, `sex`, `birth`, IFNULL(p.`headimg`,'') headimg, `ccnt`, `islogin`, `openid`, p.`hxid`, `pid`, `pcid`, r.`did`, `cid`, `fid`, r.`stat` " + | |
17 | + "FROM lyms_patient p,lyms_tkrecord r,lyms_chatgroup cg,lyms_doctor d " + | |
18 | + "WHERE p.`id`=r.`pid` AND p.`idno`=cg.`fromp` AND r.`did`=d.`did` AND cg.`target`=d.`dlogin` AND r.`did`=#{did} AND cg.`hxgroupid`=#{groupid} ORDER BY r.`createdtime` DESC") | |
19 | + List<Map<String, Object>> getPinfoBySesson(@Param("froms") String froms,@Param("did") String did,@Param("groupid") String groupid); | |
18 | 20 | } |
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/LymsChatgroupService.java
View file @
651d341
talkonlineweb/src/main/java/com/lyms/talkonlineweb/service/impl/LymsChatgroupServiceImpl.java
View file @
651d341
... | ... | @@ -21,8 +21,8 @@ |
21 | 21 | private LymsChatgroupMapper lymsChatgroupMapper; |
22 | 22 | |
23 | 23 | @Override |
24 | - public List<Map<String, Object>> getPinfoBySesson(String froms, String did) { | |
25 | - return lymsChatgroupMapper.getPinfoBySesson(froms,did); | |
24 | + public List<Map<String, Object>> getPinfoBySesson(String froms, String did,String groupid) { | |
25 | + return lymsChatgroupMapper.getPinfoBySesson(froms,did,groupid); | |
26 | 26 | } |
27 | 27 | } |