Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
892d50f3
提交
892d50f3
authored
9月 28, 2022
作者:
gh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
重命名delayItem
上级
9a109186
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
53 行增加
和
29 行删除
+53
-29
DelayCustomerController.java
...yaoyaozw/customer/controller/DelayCustomerController.java
+2
-3
CustomerGraphicsDelayMapper.java
...yaoyaozw/customer/mapper/CustomerGraphicsDelayMapper.java
+3
-2
SchedulingTask.java
...java/com/yaoyaozw/customer/scheduling/SchedulingTask.java
+14
-1
CustomerGraphicsDelayService.java
...oyaozw/customer/service/CustomerGraphicsDelayService.java
+2
-2
RegisterUserEntityService.java
.../yaoyaozw/customer/service/RegisterUserEntityService.java
+3
-0
CustomerGraphicsDelayServiceImpl.java
...stomer/service/impl/CustomerGraphicsDelayServiceImpl.java
+2
-2
RegisterUserEntityServiceImpl.java
.../customer/service/impl/RegisterUserEntityServiceImpl.java
+24
-16
DelayCustomerItemVO.java
...om/yaoyaozw/customer/vo/customer/DelayCustomerItemVO.java
+2
-2
CustomerGraphicsDelayMapper.xml
src/main/resources/mapper/CustomerGraphicsDelayMapper.xml
+1
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/controller/DelayCustomerController.java
浏览文件 @
892d50f3
...
...
@@ -4,10 +4,9 @@ import com.yaoyaozw.customer.common.BaseResult;
import
com.yaoyaozw.customer.common.GenericsResult
;
import
com.yaoyaozw.customer.dto.customer.DelayCustomerQueryDTO
;
import
com.yaoyaozw.customer.dto.customer.DelayCustomerSaveDTO
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
List
VO
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
Item
VO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
...
...
@@ -38,7 +37,7 @@ public class DelayCustomerController {
@ApiOperation
(
"查询"
)
@PostMapping
(
"/pageList"
)
public
GenericsResult
<
List
<
DelayCustomer
List
VO
>>
pageList
(
@RequestBody
DelayCustomerQueryDTO
queryDto
)
{
public
GenericsResult
<
List
<
DelayCustomer
Item
VO
>>
pageList
(
@RequestBody
DelayCustomerQueryDTO
queryDto
)
{
return
new
GenericsResult
<>(
new
ArrayList
<>());
}
...
...
src/main/java/com/yaoyaozw/customer/mapper/CustomerGraphicsDelayMapper.java
浏览文件 @
892d50f3
...
...
@@ -3,7 +3,7 @@ package com.yaoyaozw.customer.mapper;
import
com.baomidou.dynamic.datasource.annotation.DS
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.yaoyaozw.customer.entity.CustomerGraphicsDelay
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
List
VO
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
Item
VO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -20,5 +20,5 @@ public interface CustomerGraphicsDelayMapper extends BaseMapper<CustomerGraphics
* @param appidList
* @return
*/
List
<
DelayCustomer
List
VO
>
findAllDelayCustomerMessage
(
@Param
(
"appidList"
)
Set
<
String
>
appidList
);
List
<
DelayCustomer
Item
VO
>
findAllDelayCustomerMessage
(
@Param
(
"appidList"
)
Set
<
String
>
appidList
);
}
\ No newline at end of file
src/main/java/com/yaoyaozw/customer/scheduling/SchedulingTask.java
浏览文件 @
892d50f3
...
...
@@ -2,6 +2,7 @@ package com.yaoyaozw.customer.scheduling;
import
com.yaoyaozw.customer.dto.integration.IntegrationRequestDTO
;
import
com.yaoyaozw.customer.service.AccountOrderService
;
import
com.yaoyaozw.customer.service.RegisterUserEntityService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
...
...
@@ -14,6 +15,9 @@ public class SchedulingTask {
@Autowired
private
AccountOrderService
accountOrderService
;
@Autowired
private
RegisterUserEntityService
registerUserEntityService
;
/**
* 拉取付费订单(每15min一次)
...
...
@@ -50,10 +54,19 @@ public class SchedulingTask {
/**
* 每
段时间
扫描一次正常客服
* 每
10min
扫描一次正常客服
*/
public
void
publishCustomerMessage
(){
}
/**
* 每1min扫延时客服
*/
public
void
publishDelayCustomerMessage
(){
}
}
src/main/java/com/yaoyaozw/customer/service/CustomerGraphicsDelayService.java
浏览文件 @
892d50f3
...
...
@@ -2,7 +2,7 @@ package com.yaoyaozw.customer.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.yaoyaozw.customer.entity.CustomerGraphicsDelay
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
List
VO
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
Item
VO
;
import
java.util.List
;
import
java.util.Set
;
...
...
@@ -13,6 +13,6 @@ import java.util.Set;
*/
public
interface
CustomerGraphicsDelayService
extends
IService
<
CustomerGraphicsDelay
>
{
List
<
DelayCustomer
List
VO
>
findAllDelayCustomerMessage
(
Set
<
String
>
appidList
);
List
<
DelayCustomer
Item
VO
>
findAllDelayCustomerMessage
(
Set
<
String
>
appidList
);
}
src/main/java/com/yaoyaozw/customer/service/RegisterUserEntityService.java
浏览文件 @
892d50f3
...
...
@@ -5,6 +5,9 @@ import com.yaoyaozw.customer.entity.RegisterUserEntity;
import
com.baomidou.mybatisplus.extension.service.IService
;
public
interface
RegisterUserEntityService
extends
IService
<
RegisterUserEntity
>{
void
sendCustomerMessage
(
IntegrationRequestDTO
integrationRequestDTO
);
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerGraphicsDelayServiceImpl.java
浏览文件 @
892d50f3
...
...
@@ -4,7 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yaoyaozw.customer.entity.CustomerGraphicsDelay
;
import
com.yaoyaozw.customer.mapper.CustomerGraphicsDelayMapper
;
import
com.yaoyaozw.customer.service.CustomerGraphicsDelayService
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
List
VO
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomer
Item
VO
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -20,7 +20,7 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
@Override
public
List
<
DelayCustomer
List
VO
>
findAllDelayCustomerMessage
(
Set
<
String
>
appidList
)
{
public
List
<
DelayCustomer
Item
VO
>
findAllDelayCustomerMessage
(
Set
<
String
>
appidList
)
{
return
baseMapper
.
findAllDelayCustomerMessage
(
appidList
);
...
...
src/main/java/com/yaoyaozw/customer/service/impl/RegisterUserEntityServiceImpl.java
浏览文件 @
892d50f3
...
...
@@ -3,12 +3,10 @@ package com.yaoyaozw.customer.service.impl;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.yaoyaozw.customer.dto.integration.IntegrationRequestDTO
;
import
com.yaoyaozw.customer.entity.AuthorizerToken
;
import
com.yaoyaozw.customer.entity.CustomerGraphics
;
import
com.yaoyaozw.customer.service.AuthorizerTokenService
;
import
com.yaoyaozw.customer.service.CustomerGraphicsDelayService
;
import
com.yaoyaozw.customer.service.CustomerGraphicsService
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomerListVO
;
import
org.checkerframework.checker.units.qual.A
;
import
com.yaoyaozw.customer.vo.customer.DelayCustomerItemVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
...
...
@@ -55,30 +53,40 @@ public class RegisterUserEntityServiceImpl extends ServiceImpl<RegisterUserEntit
Set
<
String
>
appidSet
=
allPostUser
.
stream
().
map
(
RegisterUserEntity:
:
getAppId
).
collect
(
Collectors
.
toSet
());
if
(!
allPostUser
.
isEmpty
()){
//号-
发送序列-
用户
Map
<
String
,
Map
<
Integer
,
List
<
RegisterUserEntity
>>>
userMap
=
allPostUser
.
stream
().
collect
(
Collectors
.
groupingBy
(
RegisterUserEntity:
:
getAppId
,
Collectors
.
groupingBy
(
RegisterUserEntity:
:
getCustomerSort
)
));
//号-用户
Map
<
String
,
List
<
RegisterUserEntity
>>
userMap
=
allPostUser
.
stream
().
collect
(
Collectors
.
groupingBy
(
RegisterUserEntity:
:
getAppId
));
List
<
DelayCustomerListVO
>
allDelayCustomerMessage
=
customerGraphicsDelayService
.
findAllDelayCustomerMessage
(
appidSet
);
//号-发送序列-客服id
Map
<
String
,
Map
<
Byte
,
List
<
DelayCustomerListVO
>>>
customerMap
=
allDelayCustomerMessage
.
stream
().
collect
(
Collectors
.
groupingBy
(
DelayCustomerListVO:
:
getAppId
,
Collectors
.
groupingBy
(
DelayCustomerListVO:
:
getPostSort
)));
List
<
DelayCustomerItemVO
>
allDelayCustomerMessage
=
customerGraphicsDelayService
.
findAllDelayCustomerMessage
(
appidSet
);
//找token
List
<
AuthorizerToken
>
tokenList
=
authorizerTokenService
.
list
();
Map
<
String
,
String
>
tokenMap
=
tokenList
.
stream
().
collect
(
Collectors
.
toMap
(
AuthorizerToken:
:
getAuthorizerAppid
,
AuthorizerToken:
:
getAuthorizerAccessToken
));
if
(
allDelayCustomerMessage
!=
null
&&!
allDelayCustomerMessage
.
isEmpty
()){
//号-发送序列-客服id
Map
<
String
,
Map
<
Integer
,
List
<
DelayCustomerItemVO
>>>
customerMap
=
allDelayCustomerMessage
.
stream
().
collect
(
Collectors
.
groupingBy
(
DelayCustomerItemVO:
:
getAppId
,
Collectors
.
groupingBy
(
DelayCustomerItemVO:
:
getPostSort
)
));
for
(
Map
.
Entry
<
String
,
Map
<
Integer
,
List
<
RegisterUserEntity
>>>
userEntry
:
userMap
.
entrySet
())
{
List
<
AuthorizerToken
>
tokenList
=
authorizerTokenService
.
list
();
//找token
Map
<
String
,
String
>
tokenMap
=
tokenList
.
stream
().
collect
(
Collectors
.
toMap
(
AuthorizerToken:
:
getAuthorizerAppid
,
AuthorizerToken:
:
getAuthorizerAccessToken
));
String
appid
=
userEntry
.
getKey
();
Map
<
Byte
,
List
<
DelayCustomerListVO
>>
byteListMap
=
customerMap
.
get
(
appid
);
Map
<
Integer
,
List
<
RegisterUserEntity
>>
value
=
userEntry
.
getValue
();
for
(
Map
.
Entry
<
String
,
List
<
RegisterUserEntity
>>
userEntry
:
userMap
.
entrySet
())
{
String
appid
=
userEntry
.
getKey
();
//该号下延时客服
Map
<
Integer
,
List
<
DelayCustomerItemVO
>>
delaySortMap
=
customerMap
.
get
(
appid
);
//所有的用户
List
<
RegisterUserEntity
>
userList
=
userEntry
.
getValue
();
if
(
delaySortMap
!=
null
&&!
delaySortMap
.
isEmpty
()){
for
(
RegisterUserEntity
user
:
userList
)
{
Integer
customerSort
=
user
.
getCustomerSort
();
}
}
}
}
}
}
...
...
src/main/java/com/yaoyaozw/customer/vo/customer/DelayCustomer
List
VO.java
→
src/main/java/com/yaoyaozw/customer/vo/customer/DelayCustomer
Item
VO.java
浏览文件 @
892d50f3
...
...
@@ -10,7 +10,7 @@ import java.io.Serializable;
* @date 2022/9/16 10:45
*/
@Data
public
class
DelayCustomer
List
VO
implements
Serializable
{
public
class
DelayCustomer
Item
VO
implements
Serializable
{
/**
* appid
...
...
@@ -25,7 +25,7 @@ public class DelayCustomerListVO implements Serializable {
/**
* 发送序列
*/
private
Byte
postSort
;
private
Integer
postSort
;
/**
* 间隔时间
...
...
src/main/resources/mapper/CustomerGraphicsDelayMapper.xml
浏览文件 @
892d50f3
...
...
@@ -21,7 +21,7 @@
</sql>
<select
id=
"findAllDelayCustomerMessage"
resultType=
"com.yaoyaozw.customer.vo.customer.DelayCustomer
List
VO"
>
<select
id=
"findAllDelayCustomerMessage"
resultType=
"com.yaoyaozw.customer.vo.customer.DelayCustomer
Item
VO"
>
select * from customer_graphics_delay
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论