提交 5f656c63 作者: 典文龙

修改部分参数

上级 896937a2
...@@ -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;
}
} }
...@@ -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;
}
} }
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论