Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
54690af0
提交
54690af0
authored
4月 25, 2025
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
检测并获取获客链接的方法逻辑调整
上级
70801f0d
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
12 行增加
和
7 行删除
+12
-7
MaterialCommonMapper.java
...va/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
+3
-2
CompanyAcquisitionLinkServiceImpl.java
...tomer/service/impl/CompanyAcquisitionLinkServiceImpl.java
+4
-3
MaterialCommonMapper.xml
src/main/resources/mapper/MaterialCommonMapper.xml
+5
-2
没有找到文件。
src/main/java/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
浏览文件 @
54690af0
...
@@ -69,14 +69,15 @@ public interface MaterialCommonMapper {
...
@@ -69,14 +69,15 @@ public interface MaterialCommonMapper {
* @param appointReferral 指定获客链接
* @param appointReferral 指定获客链接
* @return 数量
* @return 数量
*/
*/
Integer
getAppointAuthIdAndAppointReferralCount
(
@Param
(
"appointReferral"
)
String
appointReferral
);
String
getAppointReferralType
(
@Param
(
"appointReferral"
)
String
appointReferral
);
/**
/**
* 获取指定公众号的获客链接列表
* 获取指定公众号的获客链接列表
*
* @param targetAuthId 指定公众号
* @param targetAuthId 指定公众号
* @return 获客链接列表
* @return 获客链接列表
*/
*/
List
<
String
>
getAcquisitionLinkList
(
@Param
(
"targetAuthId"
)
Long
targetAuthId
);
List
<
String
>
getAcquisitionLinkList
(
@Param
(
"targetAuthId"
)
Long
targetAuthId
,
@Param
(
"type"
)
String
type
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CompanyAcquisitionLinkServiceImpl.java
浏览文件 @
54690af0
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
...
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import
com.yaoyaozw.customer.mapper.MaterialCommonMapper
;
import
com.yaoyaozw.customer.mapper.MaterialCommonMapper
;
import
com.yaoyaozw.customer.service.CompanyAcquisitionLinkService
;
import
com.yaoyaozw.customer.service.CompanyAcquisitionLinkService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -19,12 +20,12 @@ public class CompanyAcquisitionLinkServiceImpl implements CompanyAcquisitionLink
...
@@ -19,12 +20,12 @@ public class CompanyAcquisitionLinkServiceImpl implements CompanyAcquisitionLink
@Override
@Override
public
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
targetAuthId
)
{
public
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
targetAuthId
)
{
// 查询 sourceReferral 这个链接是不是获客链接,如果不是,直接返回原链接
// 查询 sourceReferral 这个链接是不是获客链接,如果不是,直接返回原链接
Integer
count
=
materialCommonMapper
.
getAppointAuthIdAndAppointReferralCount
(
sourceReferral
);
String
type
=
materialCommonMapper
.
getAppointReferralType
(
sourceReferral
);
if
(
count
==
null
||
count
==
0
)
{
if
(
StringUtils
.
isBlank
(
type
)
)
{
return
sourceReferral
;
return
sourceReferral
;
}
}
// 原链接是获客链接,查询目标公众号的获客链接
// 原链接是获客链接,查询目标公众号的获客链接
List
<
String
>
acquisitionLinkList
=
materialCommonMapper
.
getAcquisitionLinkList
(
targetAuthId
);
List
<
String
>
acquisitionLinkList
=
materialCommonMapper
.
getAcquisitionLinkList
(
targetAuthId
,
type
);
if
(
CollectionUtil
.
isEmpty
(
acquisitionLinkList
))
{
if
(
CollectionUtil
.
isEmpty
(
acquisitionLinkList
))
{
throw
new
RuntimeException
(
"目标公众号无法获取获客链接"
);
throw
new
RuntimeException
(
"目标公众号无法获取获客链接"
);
}
}
...
...
src/main/resources/mapper/MaterialCommonMapper.xml
浏览文件 @
54690af0
...
@@ -71,19 +71,21 @@
...
@@ -71,19 +71,21 @@
FROM company_acquisition_link a
FROM company_acquisition_link a
LEFT JOIN authorizer_info ai ON ai.appid = a.auth_app_id
LEFT JOIN authorizer_info ai ON ai.appid = a.auth_app_id
WHERE ai.id = #{targetAuthId}
WHERE ai.id = #{targetAuthId}
AND a.type = #{type}
AND a.`status` = 1
AND a.`status` = 1
AND a.is_deleted = 0
AND a.is_deleted = 0
</select>
</select>
<select
id=
"getAppoint
AuthIdAndAppointReferralCount"
resultType=
"java.lang.Integer
"
>
<select
id=
"getAppoint
ReferralType"
resultType=
"java.lang.String
"
>
SELECT
count(1)
FROM company_acquisition_link a
SELECT
type
FROM company_acquisition_link a
LEFT JOIN authorizer_info ai ON a.auth_app_id = ai.appid
LEFT JOIN authorizer_info ai ON a.auth_app_id = ai.appid
WHERE a.link_url = #{appointReferral}
WHERE a.link_url = #{appointReferral}
limit 1
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论