Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
527108fb
提交
527108fb
authored
10月 21, 2022
作者:
gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
registerUser发送前去重
上级
62eac792
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
15 行增加
和
7 行删除
+15
-7
CustomerGraphics.java
...n/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
+2
-0
CustomerDelayPublishServiceImpl.java
...ustomer/service/impl/CustomerDelayPublishServiceImpl.java
+5
-3
CustomerGraphicsServiceImpl.java
...zw/customer/service/impl/CustomerGraphicsServiceImpl.java
+8
-4
没有找到文件。
src/main/java/com/yaoyaozw/customer/entity/CustomerGraphics.java
浏览文件 @
527108fb
...
@@ -122,6 +122,8 @@ public class CustomerGraphics implements Serializable {
...
@@ -122,6 +122,8 @@ public class CustomerGraphics implements Serializable {
public
static
final
String
COL_POST_TIME
=
"post_time"
;
public
static
final
String
COL_POST_TIME
=
"post_time"
;
public
static
final
String
COL_SEND_STATUS
=
"send_status"
;
public
static
final
String
COL_CREATE_USER
=
"create_user"
;
public
static
final
String
COL_CREATE_USER
=
"create_user"
;
public
static
final
String
COL_GMT_CREATE
=
"gmt_create"
;
public
static
final
String
COL_GMT_CREATE
=
"gmt_create"
;
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerDelayPublishServiceImpl.java
浏览文件 @
527108fb
...
@@ -48,7 +48,7 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
...
@@ -48,7 +48,7 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
if
(!
allPostUser
.
isEmpty
()){
if
(!
allPostUser
.
isEmpty
()){
//号-用户
//号-用户
Map
<
String
,
List
<
CustomerDelayPublish
>>
userMap
=
allPostUser
.
stream
().
filter
(
a
->
a
.
getCustomerSort
()!=
null
).
collect
(
Collectors
.
groupingBy
(
CustomerDelayPublish:
:
getAppId
));
Map
<
String
,
Map
<
String
,
CustomerDelayPublish
>>
userMap
=
allPostUser
.
stream
().
filter
(
a
->
a
.
getCustomerSort
()!=
null
).
collect
(
Collectors
.
groupingBy
(
CustomerDelayPublish:
:
getAppId
,
Collectors
.
toMap
(
CustomerDelayPublish:
:
getOpenId
,
a
->
a
,(
v1
,
v2
)->
v1
)
));
//获取所有延时客服
//获取所有延时客服
List
<
CustomerDelayItemVO
>
allDelayCustomerMessage
=
customerGraphicsDelayService
.
findAllDelayCustomerSort
(
appidSet
,
null
);
List
<
CustomerDelayItemVO
>
allDelayCustomerMessage
=
customerGraphicsDelayService
.
findAllDelayCustomerSort
(
appidSet
,
null
);
...
@@ -62,7 +62,7 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
...
@@ -62,7 +62,7 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
Set
<
CustomerDelayItemVO
>
needUpdateCustomerDelay
=
new
HashSet
<>();
Set
<
CustomerDelayItemVO
>
needUpdateCustomerDelay
=
new
HashSet
<>();
for
(
Map
.
Entry
<
String
,
List
<
CustomerDelayPublish
>>
userEntry
:
userMap
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
Map
<
String
,
CustomerDelayPublish
>>
userEntry
:
userMap
.
entrySet
())
{
String
appid
=
userEntry
.
getKey
();
String
appid
=
userEntry
.
getKey
();
//获取该号token
//获取该号token
...
@@ -74,7 +74,9 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
...
@@ -74,7 +74,9 @@ public class CustomerDelayPublishServiceImpl extends ServiceImpl<CustomerDelayPu
//该号下延时客服
//该号下延时客服
Map
<
Integer
,
List
<
CustomerDelayItemVO
>>
delaySortMap
=
customerMap
.
get
(
appid
);
Map
<
Integer
,
List
<
CustomerDelayItemVO
>>
delaySortMap
=
customerMap
.
get
(
appid
);
//所有的用户
//所有的用户
List
<
CustomerDelayPublish
>
userList
=
userEntry
.
getValue
();
Map
<
String
,
CustomerDelayPublish
>
userPublishMap
=
userEntry
.
getValue
();
//去重
List
<
CustomerDelayPublish
>
userList
=
(
List
<
CustomerDelayPublish
>)
userPublishMap
.
values
();
if
(
delaySortMap
!=
null
&&!
delaySortMap
.
isEmpty
()){
if
(
delaySortMap
!=
null
&&!
delaySortMap
.
isEmpty
()){
//将所有待用延时客服收集
//将所有待用延时客服收集
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsServiceImpl.java
浏览文件 @
527108fb
...
@@ -47,6 +47,9 @@ import com.yaoyaozw.customer.service.CustomerGraphicsService;
...
@@ -47,6 +47,9 @@ import com.yaoyaozw.customer.service.CustomerGraphicsService;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
static
java
.
util
.
stream
.
Collectors
.
collectingAndThen
;
import
static
java
.
util
.
stream
.
Collectors
.
toCollection
;
/**
/**
* 客户图形服务impl
* 客户图形服务impl
*
*
...
@@ -215,16 +218,17 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
...
@@ -215,16 +218,17 @@ public class CustomerGraphicsServiceImpl extends ServiceImpl<CustomerGraphicsMap
public
void
sendCustomerMessage
(
IntegrationRequestDTO
integrationRequestDTO
)
{
public
void
sendCustomerMessage
(
IntegrationRequestDTO
integrationRequestDTO
)
{
Date
requestDate
=
integrationRequestDTO
.
getRequestDate
();
Date
requestDate
=
integrationRequestDTO
.
getRequestDate
();
//todo:当前时刻发送的客服(需要加启用禁用)
List
<
CustomerGraphics
>
customerGraphicsList
=
list
(
new
QueryWrapper
<
CustomerGraphics
>().
eq
(
CustomerGraphics
.
COL_POST_TIME
,
requestDate
));
List
<
CustomerGraphics
>
customerGraphicsList
=
list
(
new
QueryWrapper
<
CustomerGraphics
>().
eq
(
CustomerGraphics
.
COL_POST_TIME
,
requestDate
)
.
eq
(
CustomerGraphics
.
COL_SEND_STATUS
,
9
)
);
for
(
CustomerGraphics
customerGraphics
:
customerGraphicsList
)
{
for
(
CustomerGraphics
customerGraphics
:
customerGraphicsList
)
{
//人群包id
//人群包id
Long
packId
=
customerGraphics
.
getPackId
();
Long
packId
=
customerGraphics
.
getPackId
();
//根据人群包找人,并按appId分组
//根据人群包找人,并按appId分组
List
<
CrowdPackageUserVO
>
userList
=
registerUserEntityService
.
getCurrentInPackUserList
(
packId
,
false
);
List
<
CrowdPackageUserVO
>
userList
=
registerUserEntityService
.
getCurrentInPackUserList
(
packId
,
false
);
//去重
Map
<
String
,
List
<
CrowdPackageUserVO
>>
appidUserMap
=
userList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CrowdPackageUserVO:
:
getAppId
));
Map
<
String
,
List
<
CrowdPackageUserVO
>>
appidUserMap
=
userList
.
stream
().
collect
(
Collectors
.
groupingBy
(
CrowdPackageUserVO:
:
getAppId
,
Collectors
.
collectingAndThen
(
toCollection
(()
->
new
TreeSet
<>(
Comparator
.
comparing
(
CrowdPackageUserVO:
:
getOpenId
))),
ArrayList:
:
new
)));
//根据客服id找不同公众号的链接,并按appId分组
//根据客服id找不同公众号的链接,并按appId分组
List
<
ReferralEntityVo
>
referralList
=
referralEntityService
.
findReferralByCustomerGraphicsId
(
customerGraphics
.
getId
());
List
<
ReferralEntityVo
>
referralList
=
referralEntityService
.
findReferralByCustomerGraphicsId
(
customerGraphics
.
getId
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论