|
|
|
|
@ -69,34 +69,61 @@ public class SiteInfoServiceImpl implements ISiteInfoService
|
|
|
|
|
List<Long> pushTimerList = Arrays.asList(siteInfo.getPushTimer().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setPushTimerArray(pushTimerList);
|
|
|
|
|
}
|
|
|
|
|
// 查询用的标签关联实体
|
|
|
|
|
SiteInfoTag infoTag = new SiteInfoTag();
|
|
|
|
|
infoTag.setSiteId(id);
|
|
|
|
|
// 处理禁用企微标签数组
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getForbidCompanyTagId())) {
|
|
|
|
|
List<Long> forbidCompanyList = Arrays.asList(siteInfo.getForbidCompanyTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(2);
|
|
|
|
|
infoTag.setStatus(1l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> forbidCompanyList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setForbidCompanyTagArray(forbidCompanyList);
|
|
|
|
|
}
|
|
|
|
|
// 处理禁用小程序标签数组
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getForbidWechatTagId())) {
|
|
|
|
|
List<Long> forbidWechatList = Arrays.asList(siteInfo.getForbidWechatTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(1);
|
|
|
|
|
infoTag.setStatus(1l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> forbidWechatList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setForbidWechatTagArray(forbidWechatList);
|
|
|
|
|
}
|
|
|
|
|
// 处理可见小程序标签数组
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getShowWechatTagId())) {
|
|
|
|
|
List<Long> showWechatList = Arrays.asList(siteInfo.getShowWechatTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(1);
|
|
|
|
|
infoTag.setStatus(0l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> showWechatList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setShowWechatTagArray(showWechatList);
|
|
|
|
|
}
|
|
|
|
|
// 处理可见企微标签数组
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getShowCompanyTagId())) {
|
|
|
|
|
List<Long> showCompanyList = Arrays.asList(siteInfo.getShowCompanyTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(2);
|
|
|
|
|
infoTag.setStatus(0l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> showCompanyList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setShowCompanyTagArray(showCompanyList);
|
|
|
|
|
}
|
|
|
|
|
// 处理弹窗活动小程序标签
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getHandlerWechatTagId())){
|
|
|
|
|
List<Long> handlerWechatList = Arrays.asList(siteInfo.getHandlerWechatTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(1);
|
|
|
|
|
infoTag.setStatus(2l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> handlerWechatList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setHandlerWechatTagArray(handlerWechatList);
|
|
|
|
|
}
|
|
|
|
|
// 处理弹窗活动企微标签
|
|
|
|
|
if (StringUtils.isNotEmpty(siteInfo.getHandlerCompanyTagId())){
|
|
|
|
|
List<Long> handlerCompanyList = Arrays.asList(siteInfo.getHandlerCompanyTagId().split(",")).stream().map(Long::parseLong).collect(Collectors.toList());
|
|
|
|
|
// 关联表查询数据
|
|
|
|
|
infoTag.setTagType(2);
|
|
|
|
|
infoTag.setStatus(2l);
|
|
|
|
|
List<SiteInfoTag> siteInfoTags = siteInfoTagMapper.selectSiteInfoTagList(infoTag);
|
|
|
|
|
List<Long> handlerCompanyList = siteInfoTags.stream().map(SiteInfoTag::getTagId).collect(Collectors.toList());
|
|
|
|
|
siteInfo.setHandlerCompanyTagArray(handlerCompanyList);
|
|
|
|
|
}
|
|
|
|
|
// 处理渠道展示
|
|
|
|
|
@ -452,4 +479,10 @@ public class SiteInfoServiceImpl implements ISiteInfoService
|
|
|
|
|
{
|
|
|
|
|
return siteInfoMapper.deleteSiteInfoById(id);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public int deleteSiteInfoByTagId(Long tagId) {
|
|
|
|
|
|
|
|
|
|
return siteInfoTagMapper.deleteSiteInfoTagByTagId(tagId);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|