Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
377820b2
提交
377820b2
authored
6月 01, 2024
作者:
典文龙
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改权限校验
上级
1d76bfbd
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
55 行增加
和
22 行删除
+55
-22
RabbitConfig.java
...main/java/com/yaoyaozw/customer/configs/RabbitConfig.java
+1
-1
DistributeDTO.java
src/main/java/com/yaoyaozw/customer/dto/DistributeDTO.java
+4
-0
DistributeServiceImpl.java
...yaoyaozw/customer/service/impl/DistributeServiceImpl.java
+2
-2
MaterialMenuConfigServiceImpl.java
.../customer/service/impl/MaterialMenuConfigServiceImpl.java
+4
-1
MyExecutorDistributeServiceImpl.java
...ustomer/service/impl/MyExecutorDistributeServiceImpl.java
+40
-14
AccountSetupVO.java
.../java/com/yaoyaozw/customer/vo/kanban/AccountSetupVO.java
+1
-1
KanbanCommonMapper.xml
src/main/resources/mapper/KanbanCommonMapper.xml
+3
-3
没有找到文件。
src/main/java/com/yaoyaozw/customer/configs/RabbitConfig.java
浏览文件 @
377820b2
...
...
@@ -17,7 +17,7 @@ import java.util.Map;
* @author darker
* @date 2022/10/21 16:04
*/
@Configuration
//
@Configuration
public
class
RabbitConfig
{
/* @Bean
...
...
src/main/java/com/yaoyaozw/customer/dto/DistributeDTO.java
浏览文件 @
377820b2
...
...
@@ -44,4 +44,8 @@ public class DistributeDTO {
public
Integer
getTargetAuthListSize
()
{
return
this
.
targetAuthList
.
size
();
}
public
List
<
String
>
appIds
()
{
return
this
.
getTargetAuthList
().
stream
().
map
(
AuthInfoVO:
:
getAppId
).
collect
(
Collectors
.
toList
());
}
}
src/main/java/com/yaoyaozw/customer/service/impl/DistributeServiceImpl.java
浏览文件 @
377820b2
...
...
@@ -48,13 +48,13 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
log
.
info
(
"开始执行复用任务...."
);
AuthInfoVO
sourceAuth
=
distributeDTO
.
getSourceAuth
();
Integer
targetAuthListSize
=
distributeDTO
.
getTargetAuthListSize
();
if
(
ObjectUtil
.
isNotNull
(
sourceAuth
.
getAppId
()))
{
/*
if (ObjectUtil.isNotNull(sourceAuth.getAppId())) {
List<AccountSetupVO> accountSetupVOList = kanbanCommonMapper.getRole(userId, distributeDTO.getAccountId());
int size = accountSetupVOList.size();
if (targetAuthListSize != size) {
return new BaseResult().error("暂无权限");
}
}
}
*/
myExecutorDistributeService
.
myExecutorDistribute
(
distributeDTO
,
userId
,
distributeLogList
,
sourceAuth
);
return
new
BaseResult
().
success
(
"复用进行中, 请等待"
);
...
...
src/main/java/com/yaoyaozw/customer/service/impl/MaterialMenuConfigServiceImpl.java
浏览文件 @
377820b2
...
...
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import
com.yaoyaozw.customer.entity.MaterialMenuConfig
;
import
com.yaoyaozw.customer.mapper.MaterialMenuConfigMapper
;
import
com.yaoyaozw.customer.service.MaterialMenuConfigService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
@@ -16,11 +17,13 @@ import java.util.List;
* @Version: V3.2.0
* @Description:
*/
@Slf4j
@Service
public
class
MaterialMenuConfigServiceImpl
extends
ServiceImpl
<
MaterialMenuConfigMapper
,
MaterialMenuConfig
>
implements
MaterialMenuConfigService
{
@Override
public
void
removeById
(
List
<
Long
>
authIds
)
{
LambdaQueryWrapper
<
MaterialMenuConfig
>
queryWrapper
=
new
LambdaQueryWrapper
<
MaterialMenuConfig
>().
in
(
MaterialMenuConfig:
:
getAuthId
,
authIds
);
this
.
baseMapper
.
delete
(
queryWrapper
);
int
count
=
this
.
baseMapper
.
delete
(
queryWrapper
);
log
.
info
(
"删除目标公众号配置_{}"
,
count
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/MyExecutorDistributeServiceImpl.java
浏览文件 @
377820b2
package
com
.
yaoyaozw
.
customer
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.yaoyaozw.customer.dto.DistributeDTO
;
import
com.yaoyaozw.customer.dto.MenuMainCopyDTO
;
import
com.yaoyaozw.customer.dto.follow.FollowReplyCopyDTO
;
import
com.yaoyaozw.customer.dto.keyword.CustomerKeywordCopyDTO
;
import
com.yaoyaozw.customer.entity.AccountDistributeRecord
;
import
com.yaoyaozw.customer.entity.MaterialMenuMain
;
import
com.yaoyaozw.customer.entity.*
;
import
com.yaoyaozw.customer.feigns.MenuFeignClient
;
import
com.yaoyaozw.customer.service.*
;
import
com.yaoyaozw.customer.vo.AuthInfoVO
;
...
...
@@ -66,8 +66,11 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
case
"1"
:
//关回复用
try
{
log
.
info
(
"开始关回复用"
);
//removeBatch(distributeDTO.appIds(), type);
FollowReplyCopyDTO
followReplyCopyDTO
=
new
FollowReplyCopyDTO
(
sourceAuth
,
targetAuthList
);
followReplyService
.
copy
(
followReplyCopyDTO
);
log
.
info
(
"关回复用结束"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Off reply failed: {}"
,
e
.
getMessage
(),
e
);
}
...
...
@@ -76,9 +79,12 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
case
"2"
:
//关键词复用
try
{
log
.
info
(
"开始关键词复用"
);
//removeBatch(distributeDTO.appIds(), type);
CustomerKeywordCopyDTO
customerKeywordCopyDTO
=
new
CustomerKeywordCopyDTO
();
customerKeywordCopyDTO
.
replace
(
sourceAuth
,
targetAuthList
,
targetAppList
);
keywordService
.
copy
(
customerKeywordCopyDTO
);
log
.
info
(
"关键词复用结束"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Keyword reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
...
...
@@ -86,7 +92,10 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
case
"3"
:
//延时客服复用
try
{
log
.
info
(
"开始延时客服复用"
);
removeBatch
(
distributeDTO
.
appIds
(),
type
);
customerGraphicsDelayService
.
copy
(
sourceAuth
.
getAppId
(),
""
,
""
,
null
,
targetApp
);
log
.
info
(
"延时客服复用结束"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Delayed customer service reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
...
...
@@ -94,21 +103,12 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
case
"4"
:
//菜单管理复用
try
{
try
{
List
<
String
>
appIds
=
targetAuthList
.
stream
().
map
(
AuthInfoVO:
:
getAppId
).
collect
(
Collectors
.
toList
());
List
<
MaterialMenuMain
>
materialMenuMainList
=
materialMenuMainService
.
getMaterialMenuMainVoInfo
(
appIds
);
if
(!
materialMenuMainList
.
isEmpty
())
{
for
(
MaterialMenuMain
menuMain
:
materialMenuMainList
)
{
String
appId
=
String
.
valueOf
(
menuMain
.
getAppId
());
menuFeignClient
.
removeMenu
(
menuMain
.
getId
(),
appId
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete menu configuration: {}"
,
e
.
getMessage
(),
e
);
}
log
.
info
(
"开始菜单管理复用"
);
removeBatch
(
distributeDTO
.
appIds
(),
type
);
MenuMainCopyDTO
menuMainCopyDTO
=
new
MenuMainCopyDTO
();
menuMainCopyDTO
.
addList
(
sourceAuth
.
getId
(),
idList
);
menuFeignClient
.
copy
(
menuMainCopyDTO
);
log
.
info
(
"菜单管理复用结束"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Menu management reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
...
...
@@ -129,4 +129,30 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
distributeService
.
saveBatch
(
distributeLogList
);
}
private
void
removeBatch
(
List
<
String
>
appIds
,
String
type
)
{
if
(
"3"
.
equals
(
type
))
{
try
{
LambdaQueryWrapper
<
CustomerGraphicsDelay
>
wrapper
=
new
LambdaQueryWrapper
<
CustomerGraphicsDelay
>().
in
(
CustomerGraphicsDelay:
:
getAppId
,
appIds
).
eq
(
CustomerGraphicsDelay:
:
getIsDeleted
,
0
);
List
<
Long
>
idsList
=
customerGraphicsDelayService
.
list
(
wrapper
).
stream
().
map
(
CustomerGraphicsDelay:
:
getId
).
collect
(
Collectors
.
toList
());
if
(!
idsList
.
isEmpty
())
{
customerGraphicsDelayService
.
removeBatch
(
idsList
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete the delayed customer service overcommitment configuration: {}"
,
e
.
getMessage
(),
e
);
}
}
else
if
(
"4"
.
equals
(
type
))
{
try
{
List
<
MaterialMenuMain
>
materialMenuMainList
=
materialMenuMainService
.
getMaterialMenuMainVoInfo
(
appIds
);
if
(!
materialMenuMainList
.
isEmpty
())
{
for
(
MaterialMenuMain
menuMain
:
materialMenuMainList
)
{
String
appId
=
String
.
valueOf
(
menuMain
.
getAppId
());
menuFeignClient
.
removeMenu
(
menuMain
.
getId
(),
appId
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete menu reuse configuration: {}"
,
e
.
getMessage
(),
e
);
}
}
}
}
src/main/java/com/yaoyaozw/customer/vo/kanban/AccountSetupVO.java
浏览文件 @
377820b2
...
...
@@ -13,6 +13,6 @@ import lombok.Data;
public
class
AccountSetupVO
{
private
Long
id
;
private
String
appId
;
private
Lo
ng
channelId
;
private
Stri
ng
channelId
;
private
String
nickName
;
}
src/main/resources/mapper/KanbanCommonMapper.xml
浏览文件 @
377820b2
...
...
@@ -61,9 +61,9 @@
<select
id=
"getRole"
resultType=
"com.yaoyaozw.customer.vo.kanban.AccountSetupVO"
>
SELECT
ae.id,
ae.app_id,
ae.nick_name,
ae.channel_id
ae.app_id
AS appId
,
ae.nick_name
AS nickName
,
ae.channel_id
AS channelId
FROM
account_entity ae
LEFT JOIN account_cost_setup acs on acs.account_id=ae.id
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论