Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
5f656c63
提交
5f656c63
authored
5月 30, 2024
作者:
典文龙
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改部分参数
上级
896937a2
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
53 行增加
和
17 行删除
+53
-17
FollowReplyCopyDTO.java
.../com/yaoyaozw/customer/dto/follow/FollowReplyCopyDTO.java
+5
-0
CustomerKeywordCopyDTO.java
...yaoyaozw/customer/dto/keyword/CustomerKeywordCopyDTO.java
+6
-0
DistributeServiceImpl.java
...yaoyaozw/customer/service/impl/DistributeServiceImpl.java
+42
-17
没有找到文件。
src/main/java/com/yaoyaozw/customer/dto/follow/FollowReplyCopyDTO.java
浏览文件 @
5f656c63
...
@@ -17,4 +17,9 @@ public class FollowReplyCopyDTO implements Serializable {
...
@@ -17,4 +17,9 @@ public class FollowReplyCopyDTO implements Serializable {
private
List
<
AuthInfoVO
>
targetAuthList
;
private
List
<
AuthInfoVO
>
targetAuthList
;
public
FollowReplyCopyDTO
(
AuthInfoVO
sourceAuth
,
List
<
AuthInfoVO
>
targetAuthList
)
{
this
.
sourceAuth
=
sourceAuth
;
this
.
targetAuthList
=
targetAuthList
;
}
}
}
src/main/java/com/yaoyaozw/customer/dto/keyword/CustomerKeywordCopyDTO.java
浏览文件 @
5f656c63
...
@@ -19,4 +19,10 @@ public class CustomerKeywordCopyDTO implements Serializable {
...
@@ -19,4 +19,10 @@ public class CustomerKeywordCopyDTO implements Serializable {
private
List
<
String
>
targetKeywordList
;
private
List
<
String
>
targetKeywordList
;
public
void
replace
(
AuthInfoVO
sourceAuth
,
List
<
AuthInfoVO
>
targetAuthList
,
List
<
String
>
targetKeywordList
)
{
this
.
sourceAuth
=
sourceAuth
;
this
.
targetAuthList
=
targetAuthList
;
this
.
targetKeywordList
=
targetKeywordList
;
}
}
}
src/main/java/com/yaoyaozw/customer/service/impl/DistributeServiceImpl.java
浏览文件 @
5f656c63
...
@@ -89,12 +89,24 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
...
@@ -89,12 +89,24 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
List
<
String
>
targetAppList
=
distributeDTO
.
getTargetAppList
();
List
<
String
>
targetAppList
=
distributeDTO
.
getTargetAppList
();
//获取到当天再投的进行复用
//获取到当天再投的进行复用
List
<
AuthInfoVO
>
targetAuthList
=
distributeDTO
.
filterInfo
(
channelIds
);
List
<
AuthInfoVO
>
targetAuthList
=
distributeDTO
.
filterInfo
(
channelIds
);
for
(
AuthInfoVO
authInfoVO
:
targetAuthList
)
{
try
{
menuFeignClient
.
removeMenu
(
authInfoVO
.
getId
(),
authInfoVO
.
getAppId
());
if
(!
targetAppList
.
isEmpty
())
{
for
(
AuthInfoVO
authInfoVO
:
targetAuthList
)
{
menuFeignClient
.
removeMenu
(
authInfoVO
.
getId
(),
authInfoVO
.
getAppId
());
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to delete menu configuration: {}"
,
e
.
getMessage
(),
e
);
}
}
//删除目标公众号配置
//删除目标公众号配置
List
<
Long
>
authIds
=
distributeDTO
.
getAuthIds
();
try
{
materialMenuConfigService
.
removeById
(
authIds
);
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
());
...
@@ -105,28 +117,41 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
...
@@ -105,28 +117,41 @@ public class DistributeServiceImpl extends ServiceImpl<AccountDistributeLogMappe
switch
(
type
)
{
switch
(
type
)
{
case
"1"
:
case
"1"
:
//关回复用
//关回复用
FollowReplyCopyDTO
followReplyCopyDTO
=
new
FollowReplyCopyDTO
();
try
{
followReplyCopyDTO
.
setTargetAuthList
(
targetAuthList
);
FollowReplyCopyDTO
followReplyCopyDTO
=
new
FollowReplyCopyDTO
(
sourceAuth
,
targetAuthList
);
followReplyCopyDTO
.
setSourceAuth
(
sourceAuth
);
followReplyService
.
copy
(
followReplyCopyDTO
);
followReplyService
.
copy
(
followReplyCopyDTO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Off reply failed: {}"
,
e
.
getMessage
(),
e
);
}
break
;
break
;
case
"2"
:
case
"2"
:
//关键词复用
//关键词复用
CustomerKeywordCopyDTO
customerKeywordCopyDTO
=
new
CustomerKeywordCopyDTO
();
try
{
customerKeywordCopyDTO
.
setSourceAuth
(
sourceAuth
);
CustomerKeywordCopyDTO
customerKeywordCopyDTO
=
new
CustomerKeywordCopyDTO
();
customerKeywordCopyDTO
.
setTargetKeywordList
(
targetAppList
);
customerKeywordCopyDTO
.
replace
(
sourceAuth
,
targetAuthList
,
targetAppList
);
customerKeywordCopyDTO
.
setTargetAuthList
(
targetAuthList
);
keywordService
.
copy
(
customerKeywordCopyDTO
);
keywordService
.
copy
(
customerKeywordCopyDTO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Keyword reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
break
;
break
;
case
"3"
:
case
"3"
:
//延时客服复用
//延时客服复用
customerGraphicsDelayService
.
copy
(
sourceAuth
.
getAppId
(),
""
,
""
,
null
,
targetApp
);
try
{
customerGraphicsDelayService
.
copy
(
sourceAuth
.
getAppId
(),
""
,
""
,
null
,
targetApp
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Delayed customer service reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
break
;
break
;
case
"4"
:
case
"4"
:
//菜单管理复用
//菜单管理复用
MenuMainCopyDTO
menuMainCopyDTO
=
new
MenuMainCopyDTO
();
try
{
menuMainCopyDTO
.
addList
(
sourceAuth
.
getId
(),
idList
);
MenuMainCopyDTO
menuMainCopyDTO
=
new
MenuMainCopyDTO
();
menuFeignClient
.
copy
(
menuMainCopyDTO
);
menuMainCopyDTO
.
addList
(
sourceAuth
.
getId
(),
idList
);
menuFeignClient
.
copy
(
menuMainCopyDTO
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Menu management reuse failure: {}"
,
e
.
getMessage
(),
e
);
}
break
;
break
;
default
:
default
:
break
;
break
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论