Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
3b5d3d83
提交
3b5d3d83
authored
11月 17, 2025
作者:
沈振路
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
关键词、关回 使用封装接口调用创建小程序链接【未测试】
上级
2c0a7f4a
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
111 行增加
和
159 行删除
+111
-159
CustomerKeywordComponent.java
...aoyaozw/customer/components/CustomerKeywordComponent.java
+42
-42
FollowReplyComponent.java
...om/yaoyaozw/customer/components/FollowReplyComponent.java
+41
-42
ReferralEntity.java
...ain/java/com/yaoyaozw/customer/entity/ReferralEntity.java
+2
-0
CustomerFollowReplyServiceImpl.java
...customer/service/impl/CustomerFollowReplyServiceImpl.java
+16
-41
CustomerKeywordServiceImpl.java
...ozw/customer/service/impl/CustomerKeywordServiceImpl.java
+10
-34
没有找到文件。
src/main/java/com/yaoyaozw/customer/components/CustomerKeywordComponent.java
浏览文件 @
3b5d3d83
...
...
@@ -12,7 +12,9 @@ import com.yaoyaozw.customer.constants.CustomerCommonConstant;
import
com.yaoyaozw.customer.constants.CustomerMaterialConstant
;
import
com.yaoyaozw.customer.entity.*
;
import
com.yaoyaozw.customer.exception.BaseException
;
import
com.yaoyaozw.customer.factory.MpReferralFactory
;
import
com.yaoyaozw.customer.feigns.ReferralFeignClient
;
import
com.yaoyaozw.customer.handler.MpReferralHandler
;
import
com.yaoyaozw.customer.service.AuthorizerExpandInfoService
;
import
com.yaoyaozw.customer.service.AuthorizerInfoService
;
import
com.yaoyaozw.customer.service.CompanyAcquisitionLinkService
;
...
...
@@ -56,9 +58,9 @@ public class CustomerKeywordComponent {
@Resource
private
CompanyAcquisitionLinkService
companyAcquisitionLinkService
;
@Resource
private
AuthorizerExpandInfoService
authorizerExpandInfoService
;
@Resource
private
AuthorizerInfoService
authorizerInfoService
;
@Resource
private
MpReferralFactory
mpReferralFactory
;
/**
* 获取链接实体
...
...
@@ -90,6 +92,37 @@ public class CustomerKeywordComponent {
return
referralEntity
;
}
public
ReferralEntity
getCreateReferralEntityMp
(
CommonReferralBody
referralBody
)
{
ReferralEntity
referralEntity
=
new
ReferralEntity
();
// 赋值链接参数
BeanUtil
.
copyProperties
(
referralBody
,
referralEntity
);
Integer
newsType
=
referralEntity
.
getNewsType
();
// 判断是否需要获取书城链接
if
(
CustomerCommonConstant
.
REMOTE_LINK_NEWS_TYPE_LIST
.
contains
(
referralBody
.
getNewsType
()))
{
// 处理链接名称
if
(
CustomerCommonConstant
.
BOOK_NEWS_TYPE
.
equals
(
newsType
)
||
CustomerCommonConstant
.
ACTIVITY_NEWS_TYPE
.
equals
(
newsType
))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
String
dateStr
=
format
.
format
(
new
Date
());
handleReferralName
(
dateStr
,
referralBody
.
getAccountName
(),
referralEntity
);
}
if
(
StringUtils
.
isBlank
(
referralBody
.
getStoreType
())
&&
referralBody
.
getInfoId
()
!=
null
)
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
getById
(
referralBody
.
getInfoId
());
if
(
authorizerInfo
!=
null
)
{
referralBody
.
setStoreType
(
authorizerInfo
.
getStoreType
());
}
}
MpReferralHandler
handler
=
mpReferralFactory
.
getHandler
(
referralBody
.
getStoreType
());
if
(
handler
==
null
)
{
throw
new
BaseException
(
"不支持小程序的书城:"
+
referralBody
.
getStoreType
());
}
referralEntity
=
handler
.
queryMpReferral
(
referralEntity
);
}
return
referralEntity
;
}
/**
* 获取复用时的链接数据
*
...
...
@@ -251,34 +284,13 @@ public class CustomerKeywordComponent {
if
(
StringUtils
.
isBlank
(
neoEntity
.
getMpTitle
()))
{
throw
new
BaseException
(
"无法匹配小程序发文的标题内容"
);
}
// 番茄
// 重新处理 小程序appId、小程序path
String
storeType
;
if
(
StringUtils
.
isNotBlank
(
targetAuth
.
getStoreType
()))
{
storeType
=
targetAuth
.
getStoreType
();
}
else
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
targetAuth
.
getAppId
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
storeType
=
authorizerInfo
.
getStoreType
();
}
if
(!
CustomerCommonConstant
.
STORE_NAME_TOMATO
.
equals
(
storeType
))
{
return
;
}
AuthorizerExpandInfo
authorizerExpandInfo
=
authorizerExpandInfoService
.
lambdaQuery
().
eq
(
AuthorizerExpandInfo:
:
getAuthorizerAppid
,
neoEntity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerExpandInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号"
+
neoEntity
.
getAppid
()
+
"的绑定配置信息"
);
}
// 填入小程序appId
neoEntity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
// 重新获取链接
ReferralEntity
targetReferral
=
new
ReferralEntity
();
try
{
BeanUtil
.
copyProperties
(
sourceReferral
,
targetReferral
,
"id"
,
"accountId"
,
"name"
,
"referral"
,
"materialGraphicsId"
,
"infoId"
);
// 为参数设置公众号相关参数
targetReferral
.
setAccountId
(
authorizerExpandInfo
.
getMpDistributorId
());
targetReferral
.
setInfoId
(
targetAuth
.
getId
());
targetReferral
.
setStoreType
(
targetAuth
.
getStoreType
());
Integer
newsType
=
targetReferral
.
getNewsType
();
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
newsType
))
{
// 常用链接延用name
...
...
@@ -287,30 +299,18 @@ public class CustomerKeywordComponent {
// 书籍、活动 类型, 重新构造name
handleReferralName
(
dateStr
,
targetAuth
.
getAccountName
(),
targetReferral
);
}
doGetReferral
(
targetReferral
);
MpReferralHandler
handler
=
mpReferralFactory
.
getHandler
(
targetReferral
.
getStoreType
());
if
(
handler
==
null
)
{
throw
new
BaseException
(
"不支持小程序的书城:"
+
targetReferral
.
getStoreType
());
}
targetReferral
=
handler
.
queryMpReferral
(
targetReferral
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取链接异常: "
+
e
.
getMessage
());
}
targetReferral
.
setMaterialGraphicsId
(
neoEntity
.
getId
());
String
referral
=
targetReferral
.
getReferral
();
// 番茄处理小程序常用链接
if
(!
referral
.
contains
(
GET_BOOK_ITEM
))
{
referral
=
referral
+
"&"
+
GET_BOOK_ITEM_VAL
;
}
if
(!
referral
.
contains
(
FROM_APPID
))
{
referral
=
referral
+
"&"
+
FROM_APPID
+
"="
+
authorizerExpandInfo
.
getFlagId
();
}
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
targetReferral
.
getNewsType
()))
{
if
(
referral
.
contains
(
"scene=0"
))
{
referral
=
referral
.
replace
(
"scene=0"
,
"scene=1"
);
}
}
else
{
if
(!
referral
.
contains
(
LANDING_PAGE
))
{
referral
=
referral
+
"&"
+
LANDING_PAGE_VAL
;
}
}
targetReferral
.
setReferral
(
referral
);
neoEntity
.
setMpPath
(
referral
);
neoEntity
.
setMpAppId
(
targetReferral
.
getMpAppId
());
neoEntity
.
setContent
(
""
);
// 保存链接数据
if
(
ObjectUtil
.
isNull
(
targetReferral
.
getId
()))
{
...
...
src/main/java/com/yaoyaozw/customer/components/FollowReplyComponent.java
浏览文件 @
3b5d3d83
...
...
@@ -15,7 +15,9 @@ import com.yaoyaozw.customer.dto.follow.FollowReplySaveDTO;
import
com.yaoyaozw.customer.dto.follow.NewsMessageReplyEntity
;
import
com.yaoyaozw.customer.entity.*
;
import
com.yaoyaozw.customer.exception.BaseException
;
import
com.yaoyaozw.customer.factory.MpReferralFactory
;
import
com.yaoyaozw.customer.feigns.ReferralFeignClient
;
import
com.yaoyaozw.customer.handler.MpReferralHandler
;
import
com.yaoyaozw.customer.service.AuthorizerExpandInfoService
;
import
com.yaoyaozw.customer.service.AuthorizerInfoService
;
import
com.yaoyaozw.customer.service.CompanyAcquisitionLinkService
;
...
...
@@ -65,6 +67,8 @@ public class FollowReplyComponent {
private
AuthorizerExpandInfoService
authorizerExpandInfoService
;
@Resource
private
AuthorizerInfoService
authorizerInfoService
;
@Resource
private
MpReferralFactory
mpReferralFactory
;
/**
* 获取链接实体
...
...
@@ -96,6 +100,35 @@ public class FollowReplyComponent {
return
referralEntity
;
}
public
ReferralEntity
getCreateReferralEntityMp
(
CommonReferralBody
referralBody
)
{
ReferralEntity
referralEntity
=
new
ReferralEntity
();
// 赋值链接参数
BeanUtil
.
copyProperties
(
referralBody
,
referralEntity
);
Integer
newsType
=
referralEntity
.
getNewsType
();
// 判断是否需要获取书城链接
if
(
CustomerCommonConstant
.
REMOTE_LINK_NEWS_TYPE_LIST
.
contains
(
referralBody
.
getNewsType
()))
{
// 处理链接名称
if
(
CustomerCommonConstant
.
BOOK_NEWS_TYPE
.
equals
(
newsType
)
||
CustomerCommonConstant
.
ACTIVITY_NEWS_TYPE
.
equals
(
newsType
))
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
String
dateStr
=
format
.
format
(
new
Date
());
handleReferralName
(
dateStr
,
referralBody
.
getAccountName
(),
referralEntity
);
}
if
(
StringUtils
.
isBlank
(
referralBody
.
getStoreType
())
&&
referralBody
.
getInfoId
()
!=
null
)
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
getById
(
referralBody
.
getInfoId
());
if
(
authorizerInfo
!=
null
)
{
referralBody
.
setStoreType
(
authorizerInfo
.
getStoreType
());
}
}
MpReferralHandler
handler
=
mpReferralFactory
.
getHandler
(
referralBody
.
getStoreType
());
if
(
handler
==
null
)
{
throw
new
BaseException
(
"不支持小程序的书城:"
+
referralBody
.
getStoreType
());
}
referralEntity
=
handler
.
queryMpReferral
(
referralEntity
);
}
return
referralEntity
;
}
/**
* 获取复用时的链接数据
*
...
...
@@ -284,34 +317,13 @@ public class FollowReplyComponent {
if
(
StringUtils
.
isBlank
(
neoEntity
.
getMpTitle
()))
{
throw
new
BaseException
(
"无法匹配小程序发文的标题内容"
);
}
// 番茄
// 重新处理 小程序appId、小程序path
String
storeType
;
if
(
StringUtils
.
isNotBlank
(
targetAuth
.
getStoreType
()))
{
storeType
=
targetAuth
.
getStoreType
();
}
else
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
targetAuth
.
getAppId
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
storeType
=
authorizerInfo
.
getStoreType
();
}
if
(!
CustomerCommonConstant
.
STORE_NAME_TOMATO
.
equals
(
storeType
))
{
return
;
}
AuthorizerExpandInfo
authorizerExpandInfo
=
authorizerExpandInfoService
.
lambdaQuery
().
eq
(
AuthorizerExpandInfo:
:
getAuthorizerAppid
,
neoEntity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerExpandInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号"
+
neoEntity
.
getAppid
()
+
"的绑定配置信息"
);
}
// 填入小程序appId
neoEntity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
// 重新获取链接
ReferralEntity
targetReferral
=
new
ReferralEntity
();
try
{
BeanUtil
.
copyProperties
(
sourceReferral
,
targetReferral
,
"id"
,
"accountId"
,
"name"
,
"referral"
,
"materialGraphicsId"
,
"infoId"
);
// 为参数设置公众号相关参数
targetReferral
.
setAccountId
(
authorizerExpandInfo
.
getMpDistributorId
());
targetReferral
.
setInfoId
(
targetAuth
.
getId
());
targetReferral
.
setStoreType
(
targetAuth
.
getStoreType
());
Integer
newsType
=
targetReferral
.
getNewsType
();
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
newsType
))
{
// 常用链接延用name
...
...
@@ -320,30 +332,17 @@ public class FollowReplyComponent {
// 书籍、活动 类型, 重新构造name
handleReferralName
(
dateStr
,
targetAuth
.
getAccountName
(),
targetReferral
);
}
doGetReferral
(
targetReferral
);
MpReferralHandler
handler
=
mpReferralFactory
.
getHandler
(
targetReferral
.
getStoreType
());
if
(
handler
==
null
)
{
throw
new
BaseException
(
"不支持小程序的书城:"
+
targetReferral
.
getStoreType
());
}
targetReferral
=
handler
.
queryMpReferral
(
targetReferral
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取链接异常: "
+
e
.
getMessage
());
}
targetReferral
.
setMaterialGraphicsId
(
neoEntity
.
getId
());
String
referral
=
targetReferral
.
getReferral
();
// 番茄处理小程序常用链接
if
(!
referral
.
contains
(
GET_BOOK_ITEM
))
{
referral
=
referral
+
"&"
+
GET_BOOK_ITEM_VAL
;
}
if
(!
referral
.
contains
(
FROM_APPID
))
{
referral
=
referral
+
"&"
+
FROM_APPID
+
"="
+
authorizerExpandInfo
.
getFlagId
();
}
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
targetReferral
.
getNewsType
()))
{
if
(
referral
.
contains
(
"scene=0"
))
{
referral
=
referral
.
replace
(
"scene=0"
,
"scene=1"
);
}
}
else
{
if
(!
referral
.
contains
(
LANDING_PAGE
))
{
referral
=
referral
+
"&"
+
LANDING_PAGE_VAL
;
}
}
targetReferral
.
setReferral
(
referral
);
neoEntity
.
setMpPath
(
referral
);
neoEntity
.
setMpPath
(
targetReferral
.
getReferral
());
neoEntity
.
setMpAppId
(
targetReferral
.
getMpAppId
());
neoEntity
.
setContent
(
""
);
// 保存链接数据
if
(
ObjectUtil
.
isNull
(
targetReferral
.
getId
()))
{
...
...
src/main/java/com/yaoyaozw/customer/entity/ReferralEntity.java
浏览文件 @
3b5d3d83
...
...
@@ -251,6 +251,8 @@ public class ReferralEntity implements Serializable {
*/
@TableField
(
exist
=
false
)
private
Boolean
miniProgramQuery
;
@TableField
(
exist
=
false
)
private
String
extraHttpUrl
;
public
static
final
String
COL_ID
=
"id"
;
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerFollowReplyServiceImpl.java
浏览文件 @
3b5d3d83
...
...
@@ -65,8 +65,6 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
private
RedisTemplate
<
String
,
Object
>
redisTemplate
;
@Autowired
private
CustomerFollowReplyMultiNewsService
followReplyMultiNewsService
;
@Resource
private
AuthorizerExpandInfoService
authorizerExpandInfoService
;
@Override
...
...
@@ -171,54 +169,31 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
if
(
StringUtils
.
isBlank
(
entity
.
getMpTitle
()))
{
throw
new
BaseException
(
"无法匹配小程序发文的标题内容"
);
}
// 番茄
// 重新处理 小程序appId、小程序path
String
storeType
;
if
(
saveDto
.
getAccountEntity
()
!=
null
&&
StringUtils
.
isNotBlank
(
saveDto
.
getAccountEntity
().
getStoreType
()))
{
storeType
=
saveDto
.
getAccountEntity
().
getStoreType
();
}
else
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
storeType
=
authorizerInfo
.
getStoreType
();
}
if
(!
CustomerCommonConstant
.
STORE_NAME_TOMATO
.
equals
(
storeType
))
{
return
;
}
AuthorizerExpandInfo
authorizerExpandInfo
=
authorizerExpandInfoService
.
lambdaQuery
().
eq
(
AuthorizerExpandInfo:
:
getAuthorizerAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerExpandInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号"
+
entity
.
getAppid
()
+
"的绑定配置信息"
);
}
// 填入小程序appId
entity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
// 重新获取链接
ReferralEntity
referralEntity
;
try
{
originReferralBody
.
setAccountId
(
authorizerExpandInfo
.
getMpDistributorId
());
referralEntity
=
followReplyComponent
.
getCreateReferralEntity
(
originReferralBody
);
if
(
StringUtils
.
isBlank
(
originReferralBody
.
getStoreType
()))
{
// 查询
String
storeType
;
if
(
saveDto
.
getAccountEntity
()
!=
null
&&
StringUtils
.
isNotBlank
(
saveDto
.
getAccountEntity
().
getStoreType
()))
{
storeType
=
saveDto
.
getAccountEntity
().
getStoreType
();
}
else
{
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
storeType
=
authorizerInfo
.
getStoreType
();
}
originReferralBody
.
setStoreType
(
storeType
);
}
referralEntity
=
followReplyComponent
.
getCreateReferralEntityMp
(
originReferralBody
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取链接异常: "
+
e
.
getMessage
());
}
referralEntity
.
setMaterialGraphicsId
(
entity
.
getId
());
String
referral
=
referralEntity
.
getReferral
();
// 番茄处理小程序常用链接
if
(!
referral
.
contains
(
GET_BOOK_ITEM
))
{
referral
=
referral
+
"&"
+
GET_BOOK_ITEM_VAL
;
}
if
(!
referral
.
contains
(
FROM_APPID
))
{
referral
=
referral
+
"&"
+
FROM_APPID
+
"="
+
authorizerExpandInfo
.
getFlagId
();
}
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
referralEntity
.
getNewsType
()))
{
if
(
referral
.
contains
(
"scene=0"
))
{
referral
=
referral
.
replace
(
"scene=0"
,
"scene=1"
);
}
}
else
{
if
(!
referral
.
contains
(
LANDING_PAGE
))
{
referral
=
referral
+
"&"
+
LANDING_PAGE_VAL
;
}
}
entity
.
setMpPath
(
referral
);
entity
.
setMpAppId
(
referralEntity
.
getMpAppId
());
entity
.
setContent
(
""
);
referralEntity
.
setReferral
(
referral
);
// 保存链接数据
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerKeywordServiceImpl.java
浏览文件 @
3b5d3d83
...
...
@@ -180,49 +180,25 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe
if
(
StringUtils
.
isBlank
(
entity
.
getMpTitle
()))
{
throw
new
BaseException
(
"无法匹配小程序发文的标题内容"
);
}
// 番茄
// 重新处理 小程序appId、小程序path
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
String
storeType
=
authorizerInfo
.
getStoreType
();
if
(!
CustomerCommonConstant
.
STORE_NAME_TOMATO
.
equals
(
storeType
))
{
return
;
}
AuthorizerExpandInfo
authorizerExpandInfo
=
authorizerExpandInfoService
.
lambdaQuery
().
eq
(
AuthorizerExpandInfo:
:
getAuthorizerAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerExpandInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号"
+
entity
.
getAppid
()
+
"的绑定配置信息"
);
}
// 填入小程序appId
entity
.
setMpAppId
(
authorizerExpandInfo
.
getMpAppid
());
// 重新获取链接
ReferralEntity
referralEntity
;
try
{
originReferralBody
.
setAccountId
(
authorizerExpandInfo
.
getMpDistributorId
());
referralEntity
=
customerKeywordComponent
.
getCreateReferralEntity
(
originReferralBody
);
if
(
StringUtils
.
isBlank
(
originReferralBody
.
getStoreType
()))
{
// 查询
AuthorizerInfo
authorizerInfo
=
authorizerInfoService
.
lambdaQuery
().
eq
(
AuthorizerInfo:
:
getAppid
,
entity
.
getAppid
()).
last
(
"limit 1"
).
one
();
if
(
authorizerInfo
==
null
)
{
throw
new
BaseException
(
"无法获取公众号信息"
);
}
originReferralBody
.
setStoreType
(
authorizerInfo
.
getStoreType
());
}
referralEntity
=
customerKeywordComponent
.
getCreateReferralEntityMp
(
originReferralBody
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
"获取链接异常: "
+
e
.
getMessage
());
}
referralEntity
.
setMaterialGraphicsId
(
entity
.
getId
());
String
referral
=
referralEntity
.
getReferral
();
// 番茄处理小程序常用链接
if
(!
referral
.
contains
(
GET_BOOK_ITEM
))
{
referral
=
referral
+
"&"
+
GET_BOOK_ITEM_VAL
;
}
if
(!
referral
.
contains
(
FROM_APPID
))
{
referral
=
referral
+
"&"
+
FROM_APPID
+
"="
+
authorizerExpandInfo
.
getFlagId
();
}
if
(
CustomerCommonConstant
.
USUAL_LINK_NEWS_TYPE
.
equals
(
referralEntity
.
getNewsType
()))
{
if
(
referral
.
contains
(
"scene=0"
))
{
referral
=
referral
.
replace
(
"scene=0"
,
"scene=1"
);
}
}
else
{
if
(!
referral
.
contains
(
LANDING_PAGE
))
{
referral
=
referral
+
"&"
+
LANDING_PAGE_VAL
;
}
}
entity
.
setMpPath
(
referral
);
entity
.
setMpAppId
(
referralEntity
.
getMpAppId
());
entity
.
setContent
(
""
);
referralEntity
.
setReferral
(
referral
);
// 保存链接数据
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论