Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
O
operate-customer-service
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
沈振路
operate-customer-service
Commits
6b5fc61e
提交
6b5fc61e
authored
5月 23, 2024
作者:
典文龙
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into customer_service_Dwl
上级
00196da4
0e497a89
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
117 行增加
和
8 行删除
+117
-8
CustomerKeywordComponent.java
...aoyaozw/customer/components/CustomerKeywordComponent.java
+4
-1
FollowReplyComponent.java
...om/yaoyaozw/customer/components/FollowReplyComponent.java
+4
-1
CustomerMaterialConstant.java
...yaoyaozw/customer/constants/CustomerMaterialConstant.java
+4
-1
FollowReplySaveDTO.java
.../com/yaoyaozw/customer/dto/follow/FollowReplySaveDTO.java
+16
-0
CustomerKeywordSaveDTO.java
...yaoyaozw/customer/dto/keyword/CustomerKeywordSaveDTO.java
+15
-0
CustomerFollowReply.java
...ava/com/yaoyaozw/customer/entity/CustomerFollowReply.java
+18
-0
CustomerKeyword.java
...in/java/com/yaoyaozw/customer/entity/CustomerKeyword.java
+18
-0
AuthorizerInfoServiceImpl.java
...aozw/customer/service/impl/AuthorizerInfoServiceImpl.java
+6
-3
CustomerKeywordServiceImpl.java
...ozw/customer/service/impl/CustomerKeywordServiceImpl.java
+2
-2
FollowReplyInfoVO.java
...va/com/yaoyaozw/customer/vo/follow/FollowReplyInfoVO.java
+14
-0
CustomerKeywordInfoVO.java
...m/yaoyaozw/customer/vo/keyword/CustomerKeywordInfoVO.java
+16
-0
没有找到文件。
src/main/java/com/yaoyaozw/customer/components/CustomerKeywordComponent.java
浏览文件 @
6b5fc61e
...
...
@@ -149,12 +149,15 @@ public class CustomerKeywordComponent {
entity
.
setOriginMediaUrl
(
sourceMaterial
.
getOriginMediaUrl
());
entity
.
setExtendTitle
(
sourceMaterial
.
getExtendTitle
());
entity
.
setExtendDesc
(
sourceMaterial
.
getExtendDesc
());
entity
.
setMpTitle
(
sourceMaterial
.
getMpTitle
());
entity
.
setMpAppId
(
sourceMaterial
.
getMpAppId
());
entity
.
setMpPath
(
sourceMaterial
.
getMpPath
());
if
(
CustomerMaterialConstant
.
needUpload
(
entity
.
getType
()))
{
// 向腾讯后台上传素材文件
TencentMediaResponseVO
uploadResult
=
tencentCustomerUtil
.
uploadTencentMedia
(
targetAuth
.
getAppId
(),
entity
.
getOriginMediaUrl
(),
entity
.
getType
());
if
(
StringUtils
.
isNotEmpty
(
uploadResult
.
getErrmsg
()))
{
localLog
.
warn
(
"公众号: {} 上传素材失败
"
,
targetAuth
.
getAccountName
());
localLog
.
warn
(
"公众号: {} 上传素材失败
{}"
,
targetAuth
.
getAccountName
(),
uploadResult
.
getErrmsg
());
}
entity
.
setTxMediaUrl
(
uploadResult
.
getUrl
());
entity
.
setTxMediaId
(
uploadResult
.
getMedia_id
());
...
...
src/main/java/com/yaoyaozw/customer/components/FollowReplyComponent.java
浏览文件 @
6b5fc61e
...
...
@@ -157,12 +157,15 @@ public class FollowReplyComponent {
entity
.
setExtendTitle
(
sourceMaterial
.
getExtendTitle
());
entity
.
setExtendDesc
(
sourceMaterial
.
getExtendDesc
());
entity
.
setSort
(
sourceMaterial
.
getSort
());
entity
.
setMpTitle
(
sourceMaterial
.
getMpTitle
());
entity
.
setMpAppId
(
sourceMaterial
.
getMpAppId
());
entity
.
setMpPath
(
sourceMaterial
.
getMpPath
());
if
(
CustomerMaterialConstant
.
needUpload
(
entity
.
getType
()))
{
// 向腾讯后台上传素材文件
TencentMediaResponseVO
uploadResult
=
tencentCustomerUtil
.
uploadTencentMedia
(
targetAuth
.
getAppId
(),
entity
.
getOriginMediaUrl
(),
entity
.
getType
());
if
(
StringUtils
.
isNotEmpty
(
uploadResult
.
getErrmsg
()))
{
localLog
.
warn
(
"公众号: {} 上传素材失败"
,
targetAuth
.
getAccountName
());
localLog
.
error
(
"公众号: {} 上传素材失败 {}"
,
targetAuth
.
getAccountName
(),
uploadResult
.
getErrmsg
());
}
entity
.
setTxMediaUrl
(
uploadResult
.
getUrl
());
entity
.
setTxMediaId
(
uploadResult
.
getMedia_id
());
...
...
src/main/java/com/yaoyaozw/customer/constants/CustomerMaterialConstant.java
浏览文件 @
6b5fc61e
...
...
@@ -18,13 +18,14 @@ public class CustomerMaterialConstant {
public
final
static
String
TENCENT_MEDIA_TYPE_PIC
=
"image"
;
public
final
static
String
TENCENT_MEDIA_TYPE_VOICE
=
"voice"
;
public
final
static
String
TENCENT_MEDIA_TYPE_MINI_PROGRAM
=
"miniprogrampage"
;
public
final
static
String
TENCENT_MEDIA_TYPE_NEWS
=
"news"
;
public
final
static
String
TENCENT_MEDIA_TYPE_TEXT
=
"text"
;
public
final
static
String
TENCENT_MEDIA_TYPE_MULTI_NEWS
=
"multi_news"
;
public
static
Boolean
needUpload
(
String
type
)
{
return
TENCENT_MEDIA_TYPE_PIC
.
equals
(
type
)
||
TENCENT_MEDIA_TYPE_VOICE
.
equals
(
type
);
return
TENCENT_MEDIA_TYPE_PIC
.
equals
(
type
)
||
TENCENT_MEDIA_TYPE_VOICE
.
equals
(
type
)
||
TENCENT_MEDIA_TYPE_MINI_PROGRAM
.
equals
(
type
)
;
}
public
static
Boolean
needReferral
(
String
type
)
{
...
...
@@ -41,6 +42,8 @@ public class CustomerMaterialConstant {
return
"图文"
;
}
else
if
(
TENCENT_MEDIA_TYPE_TEXT
.
equals
(
type
))
{
return
"文本"
;
}
else
if
(
TENCENT_MEDIA_TYPE_MINI_PROGRAM
.
equals
(
type
))
{
return
"小程序"
;
}
return
""
;
...
...
src/main/java/com/yaoyaozw/customer/dto/follow/FollowReplySaveDTO.java
浏览文件 @
6b5fc61e
...
...
@@ -34,6 +34,22 @@ public class FollowReplySaveDTO implements Serializable {
private
String
extendDesc
;
/**
* 小程序标题
*/
private
String
mpTitle
;
/**
* 小程序appId
*/
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
private
String
mpPath
;
@NotNull
(
message
=
"素材排序不能为空"
)
private
Integer
sort
;
...
...
src/main/java/com/yaoyaozw/customer/dto/keyword/CustomerKeywordSaveDTO.java
浏览文件 @
6b5fc61e
...
...
@@ -31,5 +31,20 @@ public class CustomerKeywordSaveDTO implements Serializable {
private
String
extendDesc
;
/**
* 小程序标题
*/
private
String
mpTitle
;
/**
* 小程序appId
*/
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
private
String
mpPath
;
private
CommonReferralBody
referralBody
;
}
src/main/java/com/yaoyaozw/customer/entity/CustomerFollowReply.java
浏览文件 @
6b5fc61e
...
...
@@ -85,6 +85,24 @@ public class CustomerFollowReply implements Serializable {
private
String
content
;
/**
* 小程序标题
*/
@TableField
(
"mp_title"
)
private
String
mpTitle
;
/**
* 小程序appId
*/
@TableField
(
"mp_app_id"
)
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
@TableField
(
"mp_path"
)
private
String
mpPath
;
/**
* 发文排序
*/
@TableField
(
"sort"
)
...
...
src/main/java/com/yaoyaozw/customer/entity/CustomerKeyword.java
浏览文件 @
6b5fc61e
...
...
@@ -85,6 +85,24 @@ public class CustomerKeyword implements Serializable {
private
String
content
;
/**
* 小程序标题
*/
@TableField
(
"mp_title"
)
private
String
mpTitle
;
/**
* 小程序appId
*/
@TableField
(
"mp_app_id"
)
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
@TableField
(
"mp_path"
)
private
String
mpPath
;
/**
* 状态
*/
@TableField
(
"status"
)
...
...
src/main/java/com/yaoyaozw/customer/service/impl/AuthorizerInfoServiceImpl.java
浏览文件 @
6b5fc61e
...
...
@@ -5,6 +5,7 @@ import com.yaoyaozw.customer.entity.AuthorizerInfo;
import
com.yaoyaozw.customer.mapper.AuthorizerInfoMapper
;
import
com.yaoyaozw.customer.service.AuthorizerInfoService
;
import
com.yaoyaozw.customer.vo.AuthInfoVO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.stereotype.Service
;
...
...
@@ -25,9 +26,11 @@ public class AuthorizerInfoServiceImpl extends ServiceImpl<AuthorizerInfoMapper,
@Override
public
AuthInfoVO
getAuthInfoByAppid
(
String
appid
)
{
AuthInfoVO
authInfo
=
this
.
baseMapper
.
getAuthInfoByAppid
(
appid
);
Object
storeTypeName
=
redisTemplate
.
opsForHash
().
get
(
"STORE_NAME_MAP"
,
authInfo
.
getStoreType
());
if
(
storeTypeName
!=
null
)
{
authInfo
.
setStoreTypeName
(
String
.
valueOf
(
storeTypeName
));
if
(
StringUtils
.
isNotBlank
(
authInfo
.
getStoreType
()))
{
Object
storeTypeName
=
redisTemplate
.
opsForHash
().
get
(
"STORE_NAME_MAP"
,
authInfo
.
getStoreType
());
if
(
storeTypeName
!=
null
)
{
authInfo
.
setStoreTypeName
(
String
.
valueOf
(
storeTypeName
));
}
}
return
authInfo
;
}
...
...
src/main/java/com/yaoyaozw/customer/service/impl/CustomerKeywordServiceImpl.java
浏览文件 @
6b5fc61e
...
...
@@ -206,12 +206,12 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe
public
GenericsResult
<
List
<
CommonReferralBody
>>
removeTextItem
(
Long
id
)
{
ReferralEntity
referralEntity
=
referralEntityService
.
getById
(
id
);
if
(
ObjectUtil
.
isNull
(
referralEntity
))
{
return
new
GenericsResult
<>(
false
,
"未找到该文本子素材"
);
return
new
GenericsResult
<>(
false
,
"未找到该文本
的
子素材"
);
}
// 查询子素材所属素材
CustomerKeyword
entity
=
this
.
getById
(
referralEntity
.
getMaterialGraphicsId
());
if
(
ObjectUtil
.
isNull
(
entity
))
{
return
new
GenericsResult
<>(
false
,
"未找到该文本所属素材"
);
return
new
GenericsResult
<>(
false
,
"未找到该文本所属
的
素材"
);
}
// 删除子文本
referralEntityService
.
removeById
(
id
);
...
...
src/main/java/com/yaoyaozw/customer/vo/follow/FollowReplyInfoVO.java
浏览文件 @
6b5fc61e
...
...
@@ -33,6 +33,20 @@ public class FollowReplyInfoVO implements Serializable {
private
String
extendTitle
;
private
String
extendDesc
;
/**
* 小程序标题
*/
private
String
mpTitle
;
/**
* 小程序appId
*/
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
private
String
mpPath
;
private
Integer
sort
;
...
...
src/main/java/com/yaoyaozw/customer/vo/keyword/CustomerKeywordInfoVO.java
浏览文件 @
6b5fc61e
...
...
@@ -33,6 +33,22 @@ public class CustomerKeywordInfoVO implements Serializable {
private
String
extendDesc
;
/**
* 小程序标题
*/
private
String
mpTitle
;
/**
* 小程序appId
*/
private
String
mpAppId
;
/**
* 小程序跳转路径
*/
private
String
mpPath
;
private
Integer
sort
;
private
AuthInfoVO
authInfo
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论