Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
82c46a1f
提交
82c46a1f
authored
6月 03, 2024
作者:
典文龙
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
去除过滤校验
上级
377820b2
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
13 行增加
和
16 行删除
+13
-16
DistributeServiceImpl.java
...yaoyaozw/customer/service/impl/DistributeServiceImpl.java
+2
-2
MyExecutorDistributeServiceImpl.java
...ustomer/service/impl/MyExecutorDistributeServiceImpl.java
+11
-14
没有找到文件。
src/main/java/com/yaoyaozw/customer/service/impl/DistributeServiceImpl.java
浏览文件 @
82c46a1f
...
@@ -48,13 +48,13 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
...
@@ -48,13 +48,13 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
log
.
info
(
"开始执行复用任务...."
);
log
.
info
(
"开始执行复用任务...."
);
AuthInfoVO
sourceAuth
=
distributeDTO
.
getSourceAuth
();
AuthInfoVO
sourceAuth
=
distributeDTO
.
getSourceAuth
();
Integer
targetAuthListSize
=
distributeDTO
.
getTargetAuthListSize
();
Integer
targetAuthListSize
=
distributeDTO
.
getTargetAuthListSize
();
/*
if (ObjectUtil.isNotNull(sourceAuth.getAppId())) {
if
(
ObjectUtil
.
isNotNull
(
sourceAuth
.
getAppId
()))
{
List
<
AccountSetupVO
>
accountSetupVOList
=
kanbanCommonMapper
.
getRole
(
userId
,
distributeDTO
.
getAccountId
());
List
<
AccountSetupVO
>
accountSetupVOList
=
kanbanCommonMapper
.
getRole
(
userId
,
distributeDTO
.
getAccountId
());
int
size
=
accountSetupVOList
.
size
();
int
size
=
accountSetupVOList
.
size
();
if
(
targetAuthListSize
!=
size
)
{
if
(
targetAuthListSize
!=
size
)
{
return
new
BaseResult
().
error
(
"暂无权限"
);
return
new
BaseResult
().
error
(
"暂无权限"
);
}
}
}
*/
}
myExecutorDistributeService
.
myExecutorDistribute
(
distributeDTO
,
userId
,
distributeLogList
,
sourceAuth
);
myExecutorDistributeService
.
myExecutorDistribute
(
distributeDTO
,
userId
,
distributeLogList
,
sourceAuth
);
return
new
BaseResult
().
success
(
"复用进行中, 请等待"
);
return
new
BaseResult
().
success
(
"复用进行中, 请等待"
);
...
...
src/main/java/com/yaoyaozw/customer/service/impl/MyExecutorDistributeServiceImpl.java
浏览文件 @
82c46a1f
...
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -13,6 +13,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -47,15 +48,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -47,15 +48,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
//获取到当天再投的进行复用
//获取到当天再投的进行复用
List
<
AuthInfoVO
>
targetAuthList
=
distributeDTO
.
getTargetAuthList
();
List
<
AuthInfoVO
>
targetAuthList
=
distributeDTO
.
getTargetAuthList
();
//删除目标公众号配置
try
{
List
<
Long
>
authIds
=
distributeDTO
.
getAuthIds
();
materialMenuConfigService
.
removeById
(
authIds
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete the target public account configuration :{}"
,
e
.
getMessage
(),
e
);
}
List
<
String
>
targetApp
=
targetAuthList
.
stream
().
map
(
AuthInfoVO:
:
getAppId
).
collect
(
Collectors
.
toList
());
List
<
String
>
targetApp
=
targetAuthList
.
stream
().
map
(
AuthInfoVO:
:
getAppId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
idList
=
targetAuthList
.
stream
().
map
(
AuthInfoVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
idList
=
targetAuthList
.
stream
().
map
(
AuthInfoVO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
String
>
typeList
=
distributeDTO
.
getTypeList
();
List
<
String
>
typeList
=
distributeDTO
.
getTypeList
();
...
@@ -67,7 +59,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -67,7 +59,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
//关回复用
//关回复用
try
{
try
{
log
.
info
(
"开始关回复用"
);
log
.
info
(
"开始关回复用"
);
//removeBatch(distributeDTO.appIds(), type);
FollowReplyCopyDTO
followReplyCopyDTO
=
new
FollowReplyCopyDTO
(
sourceAuth
,
targetAuthList
);
FollowReplyCopyDTO
followReplyCopyDTO
=
new
FollowReplyCopyDTO
(
sourceAuth
,
targetAuthList
);
followReplyService
.
copy
(
followReplyCopyDTO
);
followReplyService
.
copy
(
followReplyCopyDTO
);
log
.
info
(
"关回复用结束"
);
log
.
info
(
"关回复用结束"
);
...
@@ -80,7 +71,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -80,7 +71,6 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
//关键词复用
//关键词复用
try
{
try
{
log
.
info
(
"开始关键词复用"
);
log
.
info
(
"开始关键词复用"
);
//removeBatch(distributeDTO.appIds(), type);
CustomerKeywordCopyDTO
customerKeywordCopyDTO
=
new
CustomerKeywordCopyDTO
();
CustomerKeywordCopyDTO
customerKeywordCopyDTO
=
new
CustomerKeywordCopyDTO
();
customerKeywordCopyDTO
.
replace
(
sourceAuth
,
targetAuthList
,
targetAppList
);
customerKeywordCopyDTO
.
replace
(
sourceAuth
,
targetAuthList
,
targetAppList
);
keywordService
.
copy
(
customerKeywordCopyDTO
);
keywordService
.
copy
(
customerKeywordCopyDTO
);
...
@@ -93,7 +83,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -93,7 +83,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
//延时客服复用
//延时客服复用
try
{
try
{
log
.
info
(
"开始延时客服复用"
);
log
.
info
(
"开始延时客服复用"
);
removeBatch
(
distributeDTO
.
appIds
(),
type
);
removeBatch
(
distributeDTO
.
appIds
(),
type
,
new
ArrayList
<>()
);
customerGraphicsDelayService
.
copy
(
sourceAuth
.
getAppId
(),
""
,
""
,
null
,
targetApp
);
customerGraphicsDelayService
.
copy
(
sourceAuth
.
getAppId
(),
""
,
""
,
null
,
targetApp
);
log
.
info
(
"延时客服复用结束"
);
log
.
info
(
"延时客服复用结束"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -104,7 +94,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -104,7 +94,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
//菜单管理复用
//菜单管理复用
try
{
try
{
log
.
info
(
"开始菜单管理复用"
);
log
.
info
(
"开始菜单管理复用"
);
removeBatch
(
distributeDTO
.
appIds
(),
type
);
removeBatch
(
distributeDTO
.
appIds
(),
type
,
distributeDTO
.
getAuthIds
()
);
MenuMainCopyDTO
menuMainCopyDTO
=
new
MenuMainCopyDTO
();
MenuMainCopyDTO
menuMainCopyDTO
=
new
MenuMainCopyDTO
();
menuMainCopyDTO
.
addList
(
sourceAuth
.
getId
(),
idList
);
menuMainCopyDTO
.
addList
(
sourceAuth
.
getId
(),
idList
);
menuFeignClient
.
copy
(
menuMainCopyDTO
);
menuFeignClient
.
copy
(
menuMainCopyDTO
);
...
@@ -130,7 +120,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -130,7 +120,7 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
distributeService
.
saveBatch
(
distributeLogList
);
distributeService
.
saveBatch
(
distributeLogList
);
}
}
private
void
removeBatch
(
List
<
String
>
appIds
,
String
type
)
{
private
void
removeBatch
(
List
<
String
>
appIds
,
String
type
,
List
<
Long
>
authIds
)
{
if
(
"3"
.
equals
(
type
))
{
if
(
"3"
.
equals
(
type
))
{
try
{
try
{
LambdaQueryWrapper
<
CustomerGraphicsDelay
>
wrapper
=
new
LambdaQueryWrapper
<
CustomerGraphicsDelay
>().
in
(
CustomerGraphicsDelay:
:
getAppId
,
appIds
).
eq
(
CustomerGraphicsDelay:
:
getIsDeleted
,
0
);
LambdaQueryWrapper
<
CustomerGraphicsDelay
>
wrapper
=
new
LambdaQueryWrapper
<
CustomerGraphicsDelay
>().
in
(
CustomerGraphicsDelay:
:
getAppId
,
appIds
).
eq
(
CustomerGraphicsDelay:
:
getIsDeleted
,
0
);
...
@@ -153,6 +143,13 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
...
@@ -153,6 +143,13 @@ public class MyExecutorDistributeServiceImpl implements MyExecutorDistributeServ
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete menu reuse configuration: {}"
,
e
.
getMessage
(),
e
);
log
.
error
(
"Failed to delete menu reuse configuration: {}"
,
e
.
getMessage
(),
e
);
}
}
try
{
if
(!
authIds
.
isEmpty
())
{
materialMenuConfigService
.
removeById
(
authIds
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete the target public account configuration :{}"
,
e
.
getMessage
(),
e
);
}
}
}
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论