Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
d34ae129
提交
d34ae129
authored
11月 24, 2025
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
阳光小程序链接获取
上级
3652f3f4
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
8 行增加
和
3 行删除
+8
-3
YgMpReferralHandler.java
...va/com/yaoyaozw/customer/handler/YgMpReferralHandler.java
+8
-3
没有找到文件。
src/main/java/com/yaoyaozw/customer/handler/YgMpReferralHandler.java
浏览文件 @
d34ae129
...
@@ -9,6 +9,7 @@ import com.yaoyaozw.customer.constants.ApiResultConstant;
...
@@ -9,6 +9,7 @@ import com.yaoyaozw.customer.constants.ApiResultConstant;
import
com.yaoyaozw.customer.entity.AuthorizerExpandInfo
;
import
com.yaoyaozw.customer.entity.AuthorizerExpandInfo
;
import
com.yaoyaozw.customer.entity.AuthorizerInfo
;
import
com.yaoyaozw.customer.entity.AuthorizerInfo
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.entity.ReferralEntity
;
import
com.yaoyaozw.customer.exception.BaseException
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -23,6 +24,11 @@ public class YgMpReferralHandler extends MpReferralHandler {
...
@@ -23,6 +24,11 @@ public class YgMpReferralHandler extends MpReferralHandler {
@Override
@Override
public
ReferralEntity
queryMpReferral
(
ReferralEntity
referralEntity
,
AuthorizerInfo
authorizerInfo
)
{
public
ReferralEntity
queryMpReferral
(
ReferralEntity
referralEntity
,
AuthorizerInfo
authorizerInfo
)
{
referralEntity
.
setMiniProgramQuery
(
Boolean
.
TRUE
);
referralEntity
.
setMiniProgramQuery
(
Boolean
.
TRUE
);
AuthorizerExpandInfo
authorizerExpandInfo
=
getAuthorizerExpandInfo
(
authorizerInfo
.
getAppid
());
if
(
authorizerExpandInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号:"
+
authorizerInfo
.
getNickName
()
+
" 的小程序配置信息"
);
}
referralEntity
.
setAccountId
(
authorizerExpandInfo
.
getFlagId
());
// 调用接口获取原生链接
// 调用接口获取原生链接
R
r
=
referralFeignClient
.
productReferral
(
referralEntity
);
R
r
=
referralFeignClient
.
productReferral
(
referralEntity
);
if
(!
r
.
getCode
().
equals
(
ApiResultConstant
.
SUCCESS_CODE
))
{
if
(!
r
.
getCode
().
equals
(
ApiResultConstant
.
SUCCESS_CODE
))
{
...
@@ -32,7 +38,7 @@ public class YgMpReferralHandler extends MpReferralHandler {
...
@@ -32,7 +38,7 @@ public class YgMpReferralHandler extends MpReferralHandler {
JSONObject
jsonObject
=
JSON
.
parseObject
(
res
);
JSONObject
jsonObject
=
JSON
.
parseObject
(
res
);
// 处理链接
// 处理链接
constructMpReferral
(
referralEntity
,
authorizerInfo
,
null
,
jsonObject
);
constructMpReferral
(
referralEntity
,
authorizerInfo
,
authorizerExpandInfo
,
jsonObject
);
return
referralEntity
;
return
referralEntity
;
}
}
...
@@ -47,8 +53,7 @@ public class YgMpReferralHandler extends MpReferralHandler {
...
@@ -47,8 +53,7 @@ public class YgMpReferralHandler extends MpReferralHandler {
referralEntity
.
setMpPath
(
StringUtils
.
isNotBlank
(
mpPath
)
?
mpPath
:
(
isMiniProgramPath
(
referral
)
?
referral
:
null
));
referralEntity
.
setMpPath
(
StringUtils
.
isNotBlank
(
mpPath
)
?
mpPath
:
(
isMiniProgramPath
(
referral
)
?
referral
:
null
));
referralEntity
.
setMpAppId
(
responseJson
.
getString
(
"mpAppId"
));
referralEntity
.
setMpAppId
(
responseJson
.
getString
(
"mpAppId"
));
referralEntity
.
setExtraHttpUrl
(
responseJson
.
getString
(
"extraHttpUrl"
));
referralEntity
.
setExtraHttpUrl
(
responseJson
.
getString
(
"extraHttpUrl"
));
if
(
StringUtils
.
isBlank
(
referralEntity
.
getMpAppId
()))
{
if
(
StringUtils
.
isBlank
(
referralEntity
.
getMpAppId
())
&&
authorizerExpandInfo
!=
null
)
{
authorizerExpandInfo
=
getAuthorizerExpandInfo
(
authorizerInfo
.
getAppid
());
referralEntity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
referralEntity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论