Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
c6cfdc61
提交
c6cfdc61
authored
11月 16, 2022
作者:
gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
定时客服发送:根据人群包appid循环,支持无链接纯文本客服
上级
53396b29
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
8 行删除
+6
-8
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+5
-7
WeChatServiceImpl.java
...zw/customer/service/wechat/service/WeChatServiceImpl.java
+1
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
c6cfdc61
...
@@ -256,19 +256,17 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
...
@@ -256,19 +256,17 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
List
<
ReferralEntityVo
>
referralList
=
referralEntityService
.
findReferralByCustomerGraphicsId
(
customerGraphics
.
getId
());
List
<
ReferralEntityVo
>
referralList
=
referralEntityService
.
findReferralByCustomerGraphicsId
(
customerGraphics
.
getId
());
Map
<
String
,
List
<
ReferralEntityVo
>>
referralMap
=
referralList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReferralEntityVo:
:
getAppid
));
Map
<
String
,
List
<
ReferralEntityVo
>>
referralMap
=
referralList
.
stream
().
collect
(
Collectors
.
groupingBy
(
ReferralEntityVo:
:
getAppid
));
//循环该
客服
下的所有素材
//循环该
人群包
下的所有素材
for
(
Map
.
Entry
<
String
,
List
<
ReferralEntityVo
>>
referralEntry
:
referral
Map
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
List
<
CrowdPackageUserVO
>>
usersEntry
:
appidUser
Map
.
entrySet
())
{
String
appid
=
referral
Entry
.
getKey
();
String
appid
=
users
Entry
.
getKey
();
//获取该号的链接实体
//获取该号的链接实体
List
<
ReferralEntityVo
>
referralEntityVo
=
referralMap
.
get
(
appid
);
List
<
ReferralEntityVo
>
referralEntityVo
=
referralMap
.
get
(
appid
);
//获取该号的openid
//获取该号的openid
List
<
CrowdPackageUserVO
>
packageUserVo
=
appidUserMap
.
get
(
appid
);
List
<
CrowdPackageUserVO
>
packageUserVo
=
usersEntry
.
getValue
();
if
(
referralEntityVo
!=
null
&&!
referralEntityVo
.
isEmpty
()&&
packageUserVo
!=
null
&&!
packageUserVo
.
isEmpty
()){
weChatService
.
sendCustomerMessage
(
appid
,
customerGraphics
,
packageUserVo
,
referralEntityVo
);
weChatService
.
sendCustomerMessage
(
appid
,
customerGraphics
,
packageUserVo
,
referralEntityVo
);
}
}
}
//客服状态修改
//客服状态修改
customerGraphics
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_FINISHED
);
customerGraphics
.
setSendStatus
(
CustomerCommonConstant
.
SEND_STATUS_FINISHED
);
...
...
src/main/java/com/yaoyaozw/customer/service/wechat/service/WeChatServiceImpl.java
浏览文件 @
c6cfdc61
...
@@ -201,7 +201,7 @@ public class WeChatServiceImpl implements WeChatService{
...
@@ -201,7 +201,7 @@ public class WeChatServiceImpl implements WeChatService{
//类型判断
//类型判断
if
(
CUSTOMER_TEXT
.
equals
(
customerGraphics
.
getType
())){
if
(
CUSTOMER_TEXT
.
equals
(
customerGraphics
.
getType
())){
//文本类客服,需要判断替换链接的个数
//文本类客服,需要判断替换链接的个数
Map
<
Integer
,
String
>
sortReferral
=
urlList
.
stream
().
collect
(
Collectors
.
toMap
(
ReferralEntityVo:
:
getSort
,
ReferralEntityVo:
:
getReferral
,
(
v1
,
v2
)
->
v2
)
);
Map
<
Integer
,
String
>
sortReferral
=
urlList
!=
null
&&!
urlList
.
isEmpty
()?
urlList
.
stream
().
collect
(
Collectors
.
toMap
(
ReferralEntityVo:
:
getSort
,
ReferralEntityVo:
:
getReferral
,
(
v1
,
v2
)
->
v2
)):
new
HashMap
<>(
1
);
if
(
customerGraphics
.
getReferralSize
()!=
null
&&
customerGraphics
.
getReferralSize
().
equals
(
sortReferral
.
size
())){
if
(
customerGraphics
.
getReferralSize
()!=
null
&&
customerGraphics
.
getReferralSize
().
equals
(
sortReferral
.
size
())){
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论