Merge remote-tracking branch 'origin/feature-20240104' into feature-20240104

master
382696293@qq.com 2 years ago
commit ff76f06640

@ -69,4 +69,12 @@ public interface SiteInfoTagMapper
* @return
*/
public int deleteSiteInfoTagBySiteId(Long id);
/**
*
*
* @param tagId
* @return
*/
public int deleteSiteInfoTagByTagId(Long tagId);
}

@ -92,4 +92,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
delete from site_info_tag where site_id = #{id}
</delete>
<delete id="deleteSiteInfoTagByTagId" parameterType="Long">
delete from site_info_tag where tag_id = #{tagId}
</delete>
</mapper>

@ -16,10 +16,7 @@ import com.flossom.common.log.annotation.Log;
import com.flossom.common.log.enums.BusinessType;
import com.flossom.common.security.annotation.RequiresPermissions;
import com.flossom.common.security.utils.SecurityUtils;
import com.flossom.system.service.ISysDeptService;
import com.flossom.system.service.ISysTagService;
import com.flossom.system.service.IWxScriptTagService;
import com.flossom.system.service.IWxUserTagService;
import com.flossom.system.service.*;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -45,6 +42,8 @@ public class SysTagController extends BaseController {
private IWxScriptTagService wxScriptTagService;
@Autowired
private IWxUserTagService userTagService;
@Autowired
private ISiteInfoService siteInfoService;
/**
*
*/
@ -124,6 +123,8 @@ public class SysTagController extends BaseController {
wxUserTagService.deleteWxUserTagByTagId(id);
// 删除话术关联标签
wxScriptTagService.deleteWxScriptTagByTagId(id);
// 删除站点关联标签
siteInfoService.deleteSiteInfoByTagId(id);
// 删除用户标签
// if (tagService.checkDeptExistUser(id))
// {

@ -59,4 +59,11 @@ public interface ISiteInfoService
* @return
*/
public int deleteSiteInfoById(Long id);
/**
*
*
* @param tagId
* @return
*/
public int deleteSiteInfoByTagId(Long tagId);
}

@ -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);
}
}

Loading…
Cancel
Save