提交 0e497a89 作者: 沈振路

公众号关回、关键词添加小程序卡片发送类型

上级 77eb8a44
...@@ -149,12 +149,15 @@ public class CustomerKeywordComponent { ...@@ -149,12 +149,15 @@ public class CustomerKeywordComponent {
entity.setOriginMediaUrl(sourceMaterial.getOriginMediaUrl()); entity.setOriginMediaUrl(sourceMaterial.getOriginMediaUrl());
entity.setExtendTitle(sourceMaterial.getExtendTitle()); entity.setExtendTitle(sourceMaterial.getExtendTitle());
entity.setExtendDesc(sourceMaterial.getExtendDesc()); entity.setExtendDesc(sourceMaterial.getExtendDesc());
entity.setMpTitle(sourceMaterial.getMpTitle());
entity.setMpAppId(sourceMaterial.getMpAppId());
entity.setMpPath(sourceMaterial.getMpPath());
if (CustomerMaterialConstant.needUpload(entity.getType())) { if (CustomerMaterialConstant.needUpload(entity.getType())) {
// 向腾讯后台上传素材文件 // 向腾讯后台上传素材文件
TencentMediaResponseVO uploadResult = tencentCustomerUtil.uploadTencentMedia(targetAuth.getAppId(), entity.getOriginMediaUrl(), entity.getType()); TencentMediaResponseVO uploadResult = tencentCustomerUtil.uploadTencentMedia(targetAuth.getAppId(), entity.getOriginMediaUrl(), entity.getType());
if (StringUtils.isNotEmpty(uploadResult.getErrmsg())) { if (StringUtils.isNotEmpty(uploadResult.getErrmsg())) {
localLog.warn("公众号: {} 上传素材失败", targetAuth.getAccountName()); localLog.warn("公众号: {} 上传素材失败 {}", targetAuth.getAccountName(), uploadResult.getErrmsg());
} }
entity.setTxMediaUrl(uploadResult.getUrl()); entity.setTxMediaUrl(uploadResult.getUrl());
entity.setTxMediaId(uploadResult.getMedia_id()); entity.setTxMediaId(uploadResult.getMedia_id());
......
...@@ -157,12 +157,15 @@ public class FollowReplyComponent { ...@@ -157,12 +157,15 @@ public class FollowReplyComponent {
entity.setExtendTitle(sourceMaterial.getExtendTitle()); entity.setExtendTitle(sourceMaterial.getExtendTitle());
entity.setExtendDesc(sourceMaterial.getExtendDesc()); entity.setExtendDesc(sourceMaterial.getExtendDesc());
entity.setSort(sourceMaterial.getSort()); entity.setSort(sourceMaterial.getSort());
entity.setMpTitle(sourceMaterial.getMpTitle());
entity.setMpAppId(sourceMaterial.getMpAppId());
entity.setMpPath(sourceMaterial.getMpPath());
if (CustomerMaterialConstant.needUpload(entity.getType())) { if (CustomerMaterialConstant.needUpload(entity.getType())) {
// 向腾讯后台上传素材文件 // 向腾讯后台上传素材文件
TencentMediaResponseVO uploadResult = tencentCustomerUtil.uploadTencentMedia(targetAuth.getAppId(), entity.getOriginMediaUrl(), entity.getType()); TencentMediaResponseVO uploadResult = tencentCustomerUtil.uploadTencentMedia(targetAuth.getAppId(), entity.getOriginMediaUrl(), entity.getType());
if (StringUtils.isNotEmpty(uploadResult.getErrmsg())) { if (StringUtils.isNotEmpty(uploadResult.getErrmsg())) {
localLog.warn("公众号: {} 上传素材失败", targetAuth.getAccountName()); localLog.error("公众号: {} 上传素材失败 {}", targetAuth.getAccountName(), uploadResult.getErrmsg());
} }
entity.setTxMediaUrl(uploadResult.getUrl()); entity.setTxMediaUrl(uploadResult.getUrl());
entity.setTxMediaId(uploadResult.getMedia_id()); entity.setTxMediaId(uploadResult.getMedia_id());
......
...@@ -18,13 +18,14 @@ public class CustomerMaterialConstant { ...@@ -18,13 +18,14 @@ public class CustomerMaterialConstant {
public final static String TENCENT_MEDIA_TYPE_PIC = "image"; 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_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_NEWS = "news";
public final static String TENCENT_MEDIA_TYPE_TEXT = "text"; public final static String TENCENT_MEDIA_TYPE_TEXT = "text";
public final static String TENCENT_MEDIA_TYPE_MULTI_NEWS = "multi_news"; public final static String TENCENT_MEDIA_TYPE_MULTI_NEWS = "multi_news";
public static Boolean needUpload(String type) { 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) { public static Boolean needReferral(String type) {
...@@ -41,6 +42,8 @@ public class CustomerMaterialConstant { ...@@ -41,6 +42,8 @@ public class CustomerMaterialConstant {
return "图文"; return "图文";
} else if (TENCENT_MEDIA_TYPE_TEXT.equals(type)) { } else if (TENCENT_MEDIA_TYPE_TEXT.equals(type)) {
return "文本"; return "文本";
} else if (TENCENT_MEDIA_TYPE_MINI_PROGRAM.equals(type)) {
return "小程序";
} }
return ""; return "";
......
...@@ -34,6 +34,22 @@ public class FollowReplySaveDTO implements Serializable { ...@@ -34,6 +34,22 @@ public class FollowReplySaveDTO implements Serializable {
private String extendDesc; private String extendDesc;
/**
* 小程序标题
*/
private String mpTitle;
/**
* 小程序appId
*/
private String mpAppId;
/**
* 小程序跳转路径
*/
private String mpPath;
@NotNull(message = "素材排序不能为空") @NotNull(message = "素材排序不能为空")
private Integer sort; private Integer sort;
......
...@@ -31,5 +31,20 @@ public class CustomerKeywordSaveDTO implements Serializable { ...@@ -31,5 +31,20 @@ public class CustomerKeywordSaveDTO implements Serializable {
private String extendDesc; private String extendDesc;
/**
* 小程序标题
*/
private String mpTitle;
/**
* 小程序appId
*/
private String mpAppId;
/**
* 小程序跳转路径
*/
private String mpPath;
private CommonReferralBody referralBody; private CommonReferralBody referralBody;
} }
...@@ -85,6 +85,24 @@ public class CustomerFollowReply implements Serializable { ...@@ -85,6 +85,24 @@ public class CustomerFollowReply implements Serializable {
private String content; 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") @TableField("sort")
......
...@@ -85,6 +85,24 @@ public class CustomerKeyword implements Serializable { ...@@ -85,6 +85,24 @@ public class CustomerKeyword implements Serializable {
private String content; 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") @TableField("status")
......
...@@ -33,6 +33,20 @@ public class FollowReplyInfoVO implements Serializable { ...@@ -33,6 +33,20 @@ public class FollowReplyInfoVO implements Serializable {
private String extendTitle; private String extendTitle;
private String extendDesc; private String extendDesc;
/**
* 小程序标题
*/
private String mpTitle;
/**
* 小程序appId
*/
private String mpAppId;
/**
* 小程序跳转路径
*/
private String mpPath;
private Integer sort; private Integer sort;
......
...@@ -33,6 +33,22 @@ public class CustomerKeywordInfoVO implements Serializable { ...@@ -33,6 +33,22 @@ public class CustomerKeywordInfoVO implements Serializable {
private String extendDesc; private String extendDesc;
/**
* 小程序标题
*/
private String mpTitle;
/**
* 小程序appId
*/
private String mpAppId;
/**
* 小程序跳转路径
*/
private String mpPath;
private Integer sort; private Integer sort;
private AuthInfoVO authInfo; private AuthInfoVO authInfo;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论