Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
仟微科技
Link Wechat
提交
a26b88da
Link Wechat
项目概览
仟微科技
/
Link Wechat
通知
48
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Link Wechat
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a26b88da
编写于
1月 04, 2021
作者:
S
sunxiwang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
聊天记录群消息查询修改
上级
8c685274
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
41 deletion
+9
-41
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatContactMapping.java
...ava/com/linkwechat/wecom/domain/WeChatContactMapping.java
+1
-2
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/msgaudit/GroupChatVo.java
...com/linkwechat/wecom/domain/dto/msgaudit/GroupChatVo.java
+0
-26
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatContactMappingServiceImpl.java
...t/wecom/service/impl/WeChatContactMappingServiceImpl.java
+8
-13
未找到文件。
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeChatContactMapping.java
浏览文件 @
a26b88da
...
...
@@ -3,7 +3,6 @@ package com.linkwechat.wecom.domain;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.linkwechat.common.annotation.Excel
;
import
com.linkwechat.wecom.domain.dto.msgaudit.GroupChatVo
;
import
lombok.Data
;
...
...
@@ -80,7 +79,7 @@ public class WeChatContactMapping {
* 群信息
*/
@TableField
(
exist
=
false
)
private
GroupChatVo
roomInfo
;
private
WeGroup
roomInfo
;
/**
* 最后一条聊天数据
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/msgaudit/GroupChatVo.java
已删除
100644 → 0
浏览文件 @
8c685274
package
com.linkwechat.wecom.domain.dto.msgaudit
;
import
lombok.Data
;
/**
* @author sxw
* @description
* @date 2020/12/30 23:41
**/
@Data
public
class
GroupChatVo
{
/**客户群ID*/
private
String
chat_id
;
/**群名*/
private
String
name
;
/**群主ID*/
private
String
owner
;
/**群的创建时间*/
private
long
create_time
;
/**群公告*/
private
String
notice
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatContactMappingServiceImpl.java
浏览文件 @
a26b88da
...
...
@@ -2,7 +2,6 @@ package com.linkwechat.wecom.service.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.json.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
...
@@ -10,7 +9,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.github.pagehelper.PageInfo
;
import
com.linkwechat.common.constant.WeConstans
;
import
com.linkwechat.common.core.domain.elastic.ElasticSearchEntity
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.wecom.client.WeCustomerClient
;
import
com.linkwechat.wecom.client.WeCustomerGroupClient
;
...
...
@@ -18,15 +16,15 @@ import com.linkwechat.wecom.client.WeMsgAuditClient;
import
com.linkwechat.wecom.client.WeUserClient
;
import
com.linkwechat.wecom.domain.WeChatContactMapping
;
import
com.linkwechat.wecom.domain.WeCustomer
;
import
com.linkwechat.wecom.domain.WeGroup
;
import
com.linkwechat.wecom.domain.WeUser
;
import
com.linkwechat.wecom.domain.dto.WeUserDto
;
import
com.linkwechat.wecom.domain.dto.customer.CustomerGroupDetail
;
import
com.linkwechat.wecom.domain.dto.msgaudit.GroupChatVo
;
import
com.linkwechat.wecom.mapper.WeChatContactMappingMapper
;
import
com.linkwechat.wecom.mapper.WeCustomerMapper
;
import
com.linkwechat.wecom.mapper.WeUserMapper
;
import
com.linkwechat.wecom.service.IWeChatContactMappingService
;
import
com.linkwechat.wecom.service.IWeConversationArchiveService
;
import
com.linkwechat.wecom.service.IWeGroupService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -61,6 +59,8 @@ public class WeChatContactMappingServiceImpl extends ServiceImpl<WeChatContactMa
private
WeMsgAuditClient
weMsgAuditClient
;
@Autowired
private
IWeConversationArchiveService
weConversationArchiveService
;
@Autowired
private
IWeGroupService
weGroupService
;
/**
* 查询聊天关系映射
...
...
@@ -97,10 +97,8 @@ public class WeChatContactMappingServiceImpl extends ServiceImpl<WeChatContactMa
item
.
setFinalChatContext
(
weConversationArchiveService
.
getFinalChatContactInfo
(
item
.
getFromId
(),
item
.
getReceiveId
()));
}
else
if
(
StringUtils
.
isNotEmpty
(
item
.
getRoomId
()))
{
//获取群信息
CustomerGroupDetail
customerGroupDetail
=
weCustomerGroupClient
.
groupChatDetail
(
new
CustomerGroupDetail
().
new
Params
(
item
.
getRoomId
()));
GroupChatVo
groupChatVo
=
new
GroupChatVo
();
BeanUtil
.
copyProperties
(
customerGroupDetail
.
getGroup_chat
().
get
(
0
),
groupChatVo
);
item
.
setRoomInfo
(
groupChatVo
);
WeGroup
weGroup
=
weGroupService
.
getOne
(
new
LambdaQueryWrapper
<
WeGroup
>().
eq
(
WeGroup:
:
getChatId
,
item
.
getRoomId
()));
item
.
setRoomInfo
(
weGroup
);
item
.
setFinalChatContext
(
weConversationArchiveService
.
getFinalChatRoomContactInfo
(
item
.
getFromId
(),
item
.
getRoomId
()));
}
});
...
...
@@ -188,11 +186,8 @@ public class WeChatContactMappingServiceImpl extends ServiceImpl<WeChatContactMa
fromWeChatContactMapping
.
setIsCustom
(
reveiceType
);
}
else
{
fromWeChatContactMapping
.
setRoomId
(
chatData
.
getString
(
"roomid"
));
CustomerGroupDetail
customerGroupDetail
=
weCustomerGroupClient
.
groupChatDetail
(
new
CustomerGroupDetail
().
new
Params
(
chatData
.
getString
(
"roomid"
)));
GroupChatVo
groupChatVo
=
new
GroupChatVo
();
BeanUtil
.
copyProperties
(
customerGroupDetail
.
getGroup_chat
().
get
(
0
),
groupChatVo
);
chatData
.
put
(
"roomInfo"
,
JSONObject
.
parse
(
JSONObject
.
toJSONString
(
groupChatVo
)));
WeGroup
weGroup
=
weGroupService
.
getOne
(
new
LambdaQueryWrapper
<
WeGroup
>().
eq
(
WeGroup:
:
getChatId
,
chatData
.
getString
(
"roomid"
)));
chatData
.
put
(
"roomInfo"
,
JSONObject
.
parse
(
JSONObject
.
toJSONString
(
weGroup
)));
}
}
//接收人映射数据
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录