Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
6fb99879
提交
6fb99879
authored
10月 13, 2022
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去重复
上级
9c9aa953
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
15 行增加
和
14 行删除
+15
-14
CustomerServiceCommonAsyncComponent.java
...tomer/components/CustomerServiceCommonAsyncComponent.java
+14
-13
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+1
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/components/CustomerServiceCommonAsyncComponent.java
浏览文件 @
6fb99879
...
...
@@ -135,7 +135,7 @@ public class CustomerServiceCommonAsyncComponent {
}
@Async
(
"myExecutor"
)
public
void
obtainLink
(
Long
materialId
,
CustomerGraphics
customerGraphics
,
List
<
ReferralEntity
>
referralEntityList
)
{
public
void
obtain
Message
Link
(
Long
materialId
,
CustomerGraphics
customerGraphics
,
List
<
ReferralEntity
>
referralEntityList
)
{
// 获取符合人群包条件的用户所属的公众号列表
List
<
CrowdPackageUserVO
>
userListFromPackage
=
conditionMatchService
.
getUserListFromPackage
(
customerGraphics
.
getPackId
(),
null
);
Map
<
String
,
List
<
CrowdPackageUserVO
>>
storeGroupMap
=
userListFromPackage
.
stream
().
collect
(
Collectors
.
groupingBy
(
CrowdPackageUserVO:
:
getStoreType
));
...
...
@@ -149,7 +149,7 @@ public class CustomerServiceCommonAsyncComponent {
// 获取链接
if
(
CustomerCommonConstant
.
REPLACE_LINK_NEWS_TYPE_LIST
.
contains
(
referralEntity
.
getNewsType
()))
{
LOCAL_LOG
.
info
(
"异步获取图文客服链接"
);
getAuthListLink
(
storeGroupMap
,
customerGraphics
,
referralEntity
);
get
Message
AuthListLink
(
storeGroupMap
,
customerGraphics
,
referralEntity
);
}
else
{
LOCAL_LOG
.
info
(
"newsType: {}, 不需要获取链接"
,
referralEntity
.
getNewsType
());
}
...
...
@@ -160,18 +160,8 @@ public class CustomerServiceCommonAsyncComponent {
}
private
List
<
RegisterUserEntity
>
encapsulateUserEntity
(
List
<
CrowdPackageUserVO
>
userList
)
{
List
<
RegisterUserEntity
>
userEntityList
=
new
ArrayList
<>();
for
(
CrowdPackageUserVO
crowdPackageUserVO
:
userList
)
{
RegisterUserEntity
registerUserEntity
=
new
RegisterUserEntity
();
registerUserEntity
.
setId
(
crowdPackageUserVO
.
getId
());
registerUserEntity
.
setInPackage
(
crowdPackageUserVO
.
getInPackage
());
userEntityList
.
add
(
registerUserEntity
);
}
return
userEntityList
;
}
private
void
getAuthListLink
(
Map
<
String
,
List
<
CrowdPackageUserVO
>>
storeGroupMap
,
CustomerGraphics
customerMain
,
ReferralEntity
customerReferral
)
{
private
void
get
Message
AuthListLink
(
Map
<
String
,
List
<
CrowdPackageUserVO
>>
storeGroupMap
,
CustomerGraphics
customerMain
,
ReferralEntity
customerReferral
)
{
Long
packId
=
customerMain
.
getPackId
();
LOCAL_LOG
.
info
(
"开始异步处理客服链接, 客服标题: {}, 人群包主键: {}"
,
customerMain
.
getName
(),
packId
);
...
...
@@ -372,5 +362,16 @@ public class CustomerServiceCommonAsyncComponent {
}
private
List
<
RegisterUserEntity
>
encapsulateUserEntity
(
List
<
CrowdPackageUserVO
>
userList
)
{
List
<
RegisterUserEntity
>
userEntityList
=
new
ArrayList
<>();
for
(
CrowdPackageUserVO
crowdPackageUserVO
:
userList
)
{
RegisterUserEntity
registerUserEntity
=
new
RegisterUserEntity
();
registerUserEntity
.
setId
(
crowdPackageUserVO
.
getId
());
registerUserEntity
.
setInPackage
(
crowdPackageUserVO
.
getInPackage
());
userEntityList
.
add
(
registerUserEntity
);
}
return
userEntityList
;
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
6fb99879
...
...
@@ -225,7 +225,7 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
byId
.
setSendStatus
(
1
);
boolean
result
=
super
.
updateById
(
byId
);
if
(
result
)
{
commonAsyncComponent
.
obtainLink
(
id
,
byId
,
referralEntityList
);
commonAsyncComponent
.
obtain
Message
Link
(
id
,
byId
,
referralEntityList
);
return
new
BaseResult
().
success
();
}
return
new
BaseResult
().
error
(
"更新失败"
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论