|
@@ -4,10 +4,8 @@ import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.google.common.collect.Lists;
|
|
|
-import com.microsvc.toolkit.common.response.paging.QueryInfo;
|
|
|
import com.microsvc.toolkit.middleware.im.ImPluginContext;
|
|
|
import com.microsvc.toolkit.middleware.im.message.GroupMemberWrapper;
|
|
|
import com.microsvc.toolkit.middleware.im.message.MessageWrapper;
|
|
@@ -219,8 +217,18 @@ public class ImGroupServiceImpl extends ServiceImpl<ImGroupDao, ImGroup> impleme
|
|
|
*/
|
|
|
@Override
|
|
|
public String analysisImUserId(String imUserId) {
|
|
|
- if (StringUtils.isNotBlank(imConfig.getAppPrefix())) {
|
|
|
- return imUserId.replace(imConfig.getAppPrefix() + "_", "");
|
|
|
+ String[] s = imUserId.split("_");
|
|
|
+ if (s.length == 3) {
|
|
|
+ return s[1];
|
|
|
+ }
|
|
|
+ return imUserId;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public String analysisImUserClient(String imUserId) {
|
|
|
+ String[] s = imUserId.split("_");
|
|
|
+ if (s.length == 3) {
|
|
|
+ return s[2];
|
|
|
}
|
|
|
return imUserId;
|
|
|
}
|
|
@@ -702,12 +710,12 @@ public class ImGroupServiceImpl extends ServiceImpl<ImGroupDao, ImGroup> impleme
|
|
|
TencentRequest.MessageBody body = new TencentRequest.MessageBody();
|
|
|
List<TencentRequest.MessageBody> list = new ArrayList<>();
|
|
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(i.getContent());
|
|
|
if (i.getClassname().equals("RC:TxtMsg")) {
|
|
|
- TencentRequest.MessageBody body1 = CustomerServiceBatchSendingServiceImpl.getTimTextElem(i.getContent());
|
|
|
+ TencentRequest.MessageBody body1 = CustomerServiceBatchSendingServiceImpl.getTimTextElem(jsonObject.getString("content"));
|
|
|
list.add(body1);
|
|
|
} else if (i.getClassname().equals("RC:ImgMsg")) {
|
|
|
- JSONObject jsonObject = JSONObject.parseObject(i.getContent());
|
|
|
- TencentRequest.MessageBody body1 = CustomerServiceBatchSendingServiceImpl.getTimImageElem(jsonObject.getJSONObject("user").getString("portraitUri"));
|
|
|
+ TencentRequest.MessageBody body1 = CustomerServiceBatchSendingServiceImpl.getTimImageElem(jsonObject.getString("imageUri"));
|
|
|
list.add(body1);
|
|
|
}
|
|
|
|