提交 6b5fc61e 作者: 典文龙

Merge branch 'master' into customer_service_Dwl

...@@ -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")
......
...@@ -5,6 +5,7 @@ import com.yaoyaozw.customer.entity.AuthorizerInfo; ...@@ -5,6 +5,7 @@ import com.yaoyaozw.customer.entity.AuthorizerInfo;
import com.yaoyaozw.customer.mapper.AuthorizerInfoMapper; import com.yaoyaozw.customer.mapper.AuthorizerInfoMapper;
import com.yaoyaozw.customer.service.AuthorizerInfoService; import com.yaoyaozw.customer.service.AuthorizerInfoService;
import com.yaoyaozw.customer.vo.AuthInfoVO; import com.yaoyaozw.customer.vo.AuthInfoVO;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -25,9 +26,11 @@ public class AuthorizerInfoServiceImpl extends ServiceImpl<AuthorizerInfoMapper, ...@@ -25,9 +26,11 @@ public class AuthorizerInfoServiceImpl extends ServiceImpl<AuthorizerInfoMapper,
@Override @Override
public AuthInfoVO getAuthInfoByAppid(String appid) { public AuthInfoVO getAuthInfoByAppid(String appid) {
AuthInfoVO authInfo = this.baseMapper.getAuthInfoByAppid(appid); AuthInfoVO authInfo = this.baseMapper.getAuthInfoByAppid(appid);
Object storeTypeName = redisTemplate.opsForHash().get("STORE_NAME_MAP", authInfo.getStoreType()); if (StringUtils.isNotBlank(authInfo.getStoreType())) {
if (storeTypeName != null) { Object storeTypeName = redisTemplate.opsForHash().get("STORE_NAME_MAP", authInfo.getStoreType());
authInfo.setStoreTypeName(String.valueOf(storeTypeName)); if (storeTypeName != null) {
authInfo.setStoreTypeName(String.valueOf(storeTypeName));
}
} }
return authInfo; return authInfo;
} }
......
...@@ -206,12 +206,12 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe ...@@ -206,12 +206,12 @@ public class CustomerKeywordServiceImpl extends ServiceImpl<CustomerKeywordMappe
public GenericsResult<List<CommonReferralBody>> removeTextItem(Long id) { public GenericsResult<List<CommonReferralBody>> removeTextItem(Long id) {
ReferralEntity referralEntity = referralEntityService.getById(id); ReferralEntity referralEntity = referralEntityService.getById(id);
if (ObjectUtil.isNull(referralEntity)) { if (ObjectUtil.isNull(referralEntity)) {
return new GenericsResult<>(false, "未找到该文本子素材"); return new GenericsResult<>(false, "未找到该文本子素材");
} }
// 查询子素材所属素材 // 查询子素材所属素材
CustomerKeyword entity = this.getById(referralEntity.getMaterialGraphicsId()); CustomerKeyword entity = this.getById(referralEntity.getMaterialGraphicsId());
if (ObjectUtil.isNull(entity)) { if (ObjectUtil.isNull(entity)) {
return new GenericsResult<>(false, "未找到该文本所属素材"); return new GenericsResult<>(false, "未找到该文本所属素材");
} }
// 删除子文本 // 删除子文本
referralEntityService.removeById(id); referralEntityService.removeById(id);
......
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论