Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
42c2cb60
提交
42c2cb60
authored
4月 25, 2025
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
复用时替换获客链接的查询接口调整
上级
cffdb210
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
10 行增加
和
9 行删除
+10
-9
MaterialCommonMapper.java
...va/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
+1
-2
CompanyAcquisitionLinkService.java
...yaozw/customer/service/CompanyAcquisitionLinkService.java
+1
-2
CompanyAcquisitionLinkServiceImpl.java
...tomer/service/impl/CompanyAcquisitionLinkServiceImpl.java
+7
-4
MaterialCommonMapper.xml
src/main/resources/mapper/MaterialCommonMapper.xml
+1
-1
没有找到文件。
src/main/java/com/yaoyaozw/customer/mapper/MaterialCommonMapper.java
浏览文件 @
42c2cb60
...
@@ -66,11 +66,10 @@ public interface MaterialCommonMapper {
...
@@ -66,11 +66,10 @@ public interface MaterialCommonMapper {
/**
/**
* 获取指定公众号的指定获客链接数量
* 获取指定公众号的指定获客链接数量
* @param appointAuthId 指定公众号Id
* @param appointReferral 指定获客链接
* @param appointReferral 指定获客链接
* @return 数量
* @return 数量
*/
*/
Integer
getAppointAuthIdAndAppointReferralCount
(
@Param
(
"appoint
AuthId"
)
Long
appointAuthId
,
@Param
(
"appoint
Referral"
)
String
appointReferral
);
Integer
getAppointAuthIdAndAppointReferralCount
(
@Param
(
"appointReferral"
)
String
appointReferral
);
/**
/**
...
...
src/main/java/com/yaoyaozw/customer/service/CompanyAcquisitionLinkService.java
浏览文件 @
42c2cb60
...
@@ -5,10 +5,9 @@ public interface CompanyAcquisitionLinkService {
...
@@ -5,10 +5,9 @@ public interface CompanyAcquisitionLinkService {
/**
/**
* 校验链接是否是源公众号的获客链接,如果是的,查找目标公众号的链接,并返回(如果不是获客链接,则会返回原链接,如果是,但找不到目标公众号的获客链接,则返回空)
* 校验链接是否是源公众号的获客链接,如果是的,查找目标公众号的链接,并返回(如果不是获客链接,则会返回原链接,如果是,但找不到目标公众号的获客链接,则返回空)
* @param sourceReferral 原链接
* @param sourceReferral 原链接
* @param sourceAuthId 原公众号
* @param targetAuthId 目标公众号
* @param targetAuthId 目标公众号
* @return 链接
* @return 链接
*/
*/
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
sourceAuthId
,
Long
targetAuthId
);
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
targetAuthId
);
}
}
src/main/java/com/yaoyaozw/customer/service/impl/CompanyAcquisitionLinkServiceImpl.java
浏览文件 @
42c2cb60
...
@@ -17,16 +17,19 @@ public class CompanyAcquisitionLinkServiceImpl implements CompanyAcquisitionLink
...
@@ -17,16 +17,19 @@ public class CompanyAcquisitionLinkServiceImpl implements CompanyAcquisitionLink
private
MaterialCommonMapper
materialCommonMapper
;
private
MaterialCommonMapper
materialCommonMapper
;
@Override
@Override
public
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
sourceAuthId
,
Long
targetAuthId
)
{
public
String
checkAndSearchTargetReferral
(
String
sourceReferral
,
Long
targetAuthId
)
{
// 查询 sourceReferral 这个链接是不是获客链接,如果不是,直接返回原链接
// 查询 sourceReferral 这个链接是不是获客链接,如果不是,直接返回原链接
Integer
count
=
materialCommonMapper
.
getAppointAuthIdAndAppointReferralCount
(
source
AuthId
,
source
Referral
);
Integer
count
=
materialCommonMapper
.
getAppointAuthIdAndAppointReferralCount
(
sourceReferral
);
if
(
count
==
null
||
count
==
0
)
{
if
(
count
==
null
||
count
==
0
)
{
return
sourceReferral
;
return
sourceReferral
;
}
}
// 原链接是获客链接,查询目标公众号的获客链接
// 原链接是获客链接,查询目标公众号的获客链接
List
<
String
>
acquisitionLinkList
=
materialCommonMapper
.
getAcquisitionLinkList
(
targetAuthId
);
List
<
String
>
acquisitionLinkList
=
materialCommonMapper
.
getAcquisitionLinkList
(
targetAuthId
);
if
(
CollectionUtil
.
isEmpty
(
acquisitionLinkList
)
||
acquisitionLinkList
.
size
()
>
1
)
{
if
(
CollectionUtil
.
isEmpty
(
acquisitionLinkList
))
{
return
null
;
throw
new
RuntimeException
(
"目标公众号无法获取获客链接"
);
}
if
(
acquisitionLinkList
.
size
()
>
1
)
{
throw
new
RuntimeException
(
"目标公众号存在多个有效获客链接"
);
}
}
return
acquisitionLinkList
.
get
(
0
);
return
acquisitionLinkList
.
get
(
0
);
}
}
...
...
src/main/resources/mapper/MaterialCommonMapper.xml
浏览文件 @
42c2cb60
...
@@ -82,7 +82,7 @@
...
@@ -82,7 +82,7 @@
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}
AND ai.id = #{appointAuthId}
WHERE a.link_url = #{appointReferral}
</select>
</select>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论