|
|
@@ -97,6 +97,40 @@ public class CorpFollowDynamicConfigServiceImpl implements CorpFollowDynamicConf
|
|
|
return Jsons.toJson(codeList);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public String updateNormalCorpFollowActiveCode(String codeStr, List<String> followIds, List<Integer> userIndxList, String state) throws Exception {
|
|
|
+ List<CorpFollowActiveCodeDto> codeList = Jsons.parseList(codeStr, CorpFollowActiveCodeDto.class);
|
|
|
+ if (codeList == null || codeList.size() != 1 || StrUtil.isBlank(codeList.get(0).getConfigId())) {
|
|
|
+ throw BusinessRuntimeException.getInstance("普通活码配置异常,无法更新");
|
|
|
+ }
|
|
|
+
|
|
|
+ List<SysCorpFollowView> corpFollowServiceDtos = beanSearcher.searchAll(SysCorpFollowView.class, MapUtils.builder().build());
|
|
|
+ String serviceNames = null;
|
|
|
+ if (corpFollowServiceDtos != null) {
|
|
|
+ serviceNames = corpFollowServiceDtos.stream()
|
|
|
+ .filter(cs -> userIndxList.contains(Integer.parseInt(cs.getSid().toString())))
|
|
|
+ .map(SysCorpFollowView::getShowName)
|
|
|
+ .collect(Collectors.joining(","));
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(serviceNames)) {
|
|
|
+ throw BusinessRuntimeException.getInstance("存在被删除的客服,请刷新页面重试");
|
|
|
+ }
|
|
|
+
|
|
|
+ CorpFollowActiveCodeDto codeDto = codeList.get(0);
|
|
|
+ CorpFollowContact contact = new CorpFollowContact();
|
|
|
+ contact.setConfigId(codeDto.getConfigId());
|
|
|
+ contact.setUser(followIds);
|
|
|
+ contact.setState(state);
|
|
|
+ contact.setRemark("客服活动活码");
|
|
|
+ contact.setSkip_verify(true);
|
|
|
+ wxCorpOps.updateCorpFollowContactConfig(contact);
|
|
|
+
|
|
|
+ codeDto.setFollowIds(followIds.toString());
|
|
|
+ codeDto.setUserIndxList(userIndxList.toString());
|
|
|
+ codeDto.setServiceNames(serviceNames);
|
|
|
+ return Jsons.toJson(codeList);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void updateCorpFollowActiveCode(String oldMarkTag, String markTag) throws Exception {
|
|
|
CorpTag corpTag = corpTagMapper.selectOne(Wrappers.lambdaQuery(CorpTag.class)
|