提交 70801f0d 作者: 沈振路

关回、关键词复用时校验并替换获客链接

上级 42c2cb60
...@@ -14,6 +14,7 @@ import com.yaoyaozw.customer.entity.CustomerKeyword; ...@@ -14,6 +14,7 @@ import com.yaoyaozw.customer.entity.CustomerKeyword;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.feigns.ReferralFeignClient; import com.yaoyaozw.customer.feigns.ReferralFeignClient;
import com.yaoyaozw.customer.service.AuthorizerInfoService; import com.yaoyaozw.customer.service.AuthorizerInfoService;
import com.yaoyaozw.customer.service.CompanyAcquisitionLinkService;
import com.yaoyaozw.customer.service.ReferralEntityService; import com.yaoyaozw.customer.service.ReferralEntityService;
import com.yaoyaozw.customer.utils.TencentCustomerUtil; import com.yaoyaozw.customer.utils.TencentCustomerUtil;
import com.yaoyaozw.customer.vo.AuthInfoVO; import com.yaoyaozw.customer.vo.AuthInfoVO;
...@@ -25,6 +26,7 @@ import org.slf4j.LoggerFactory; ...@@ -25,6 +26,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -47,6 +49,8 @@ public class CustomerKeywordComponent { ...@@ -47,6 +49,8 @@ public class CustomerKeywordComponent {
private ReferralFeignClient referralFeignClient; private ReferralFeignClient referralFeignClient;
@Autowired @Autowired
private SnowflakeComponent snowflakeComponent; private SnowflakeComponent snowflakeComponent;
@Resource
private CompanyAcquisitionLinkService companyAcquisitionLinkService;
/** /**
* 获取链接实体 * 获取链接实体
...@@ -111,7 +115,8 @@ public class CustomerKeywordComponent { ...@@ -111,7 +115,8 @@ public class CustomerKeywordComponent {
} }
doGetReferral(targetReferral); doGetReferral(targetReferral);
} else if (newsType.equals(-1)) { } else if (newsType.equals(-1)) {
targetReferral.setReferral(sourceReferral.getReferral()); // 自定义链接,校验是不是获客链接,如果是的,更换为目标公众号的获客链接
targetReferral.setReferral(companyAcquisitionLinkService.checkAndSearchTargetReferral(sourceReferral.getReferral(), authInfoVo.getId()));
} }
return targetReferral; return targetReferral;
......
...@@ -17,6 +17,7 @@ import com.yaoyaozw.customer.entity.CustomerFollowReplyMultiNews; ...@@ -17,6 +17,7 @@ import com.yaoyaozw.customer.entity.CustomerFollowReplyMultiNews;
import com.yaoyaozw.customer.entity.ReferralEntity; import com.yaoyaozw.customer.entity.ReferralEntity;
import com.yaoyaozw.customer.feigns.ReferralFeignClient; import com.yaoyaozw.customer.feigns.ReferralFeignClient;
import com.yaoyaozw.customer.service.AuthorizerInfoService; import com.yaoyaozw.customer.service.AuthorizerInfoService;
import com.yaoyaozw.customer.service.CompanyAcquisitionLinkService;
import com.yaoyaozw.customer.service.ReferralEntityService; import com.yaoyaozw.customer.service.ReferralEntityService;
import com.yaoyaozw.customer.utils.TencentCustomerUtil; import com.yaoyaozw.customer.utils.TencentCustomerUtil;
import com.yaoyaozw.customer.vo.AuthInfoVO; import com.yaoyaozw.customer.vo.AuthInfoVO;
...@@ -29,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -29,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
...@@ -53,6 +55,8 @@ public class FollowReplyComponent { ...@@ -53,6 +55,8 @@ public class FollowReplyComponent {
private SnowflakeComponent snowflakeComponent; private SnowflakeComponent snowflakeComponent;
@Autowired @Autowired
private RedisTemplate<String, Object> redisTemplate; private RedisTemplate<String, Object> redisTemplate;
@Resource
private CompanyAcquisitionLinkService companyAcquisitionLinkService;
/** /**
* 获取链接实体 * 获取链接实体
...@@ -117,7 +121,8 @@ public class FollowReplyComponent { ...@@ -117,7 +121,8 @@ public class FollowReplyComponent {
} }
doGetReferral(targetReferral); doGetReferral(targetReferral);
} else if (newsType.equals(-1)) { } else if (newsType.equals(-1)) {
targetReferral.setReferral(sourceReferral.getReferral()); // 自定义链接,校验是不是获客链接,如果是的,更换为目标公众号的获客链接
targetReferral.setReferral(companyAcquisitionLinkService.checkAndSearchTargetReferral(sourceReferral.getReferral(), authInfoVo.getId()));
} }
return targetReferral; return targetReferral;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论