提交 c0b57dff 作者: 沈振路

关回多图文编辑回显

上级 5a006ffe
...@@ -279,6 +279,7 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe ...@@ -279,6 +279,7 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
FollowReplyInfoVO infoVo = new FollowReplyInfoVO(); FollowReplyInfoVO infoVo = new FollowReplyInfoVO();
BeanUtil.copyProperties(entity, infoVo); BeanUtil.copyProperties(entity, infoVo);
if (!CustomerMaterialConstant.TENCENT_MEDIA_TYPE_MULTI_NEWS.equals(entity.getType())) {
// 获取素材的链接数据 // 获取素材的链接数据
if (CustomerMaterialConstant.needReferral(entity.getType())) { if (CustomerMaterialConstant.needReferral(entity.getType())) {
// 是需要设置referral的类型 // 是需要设置referral的类型
...@@ -300,6 +301,17 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe ...@@ -300,6 +301,17 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
} }
} }
} }
} else {
// 获取多图文
List<CustomerFollowReplyMultiNews> multiNewsList = followReplyMultiNewsService.list(new QueryWrapper<CustomerFollowReplyMultiNews>().eq("reply_id", id));
if (CollectionUtil.isNotEmpty(multiNewsList)) {
List<Long> multiNewsIdList = multiNewsList.stream().map(CustomerFollowReplyMultiNews::getId).collect(Collectors.toList());
List<ReferralEntity> referralEntityList = referralEntityService.list(new QueryWrapper<ReferralEntity>().in(ReferralEntity.COL_MATERIAL_GRAPHICS_ID, multiNewsIdList));
Map<Long, ReferralEntity> referralEntityMap = referralEntityList.stream().collect(Collectors.toMap(ReferralEntity::getMaterialGraphicsId, Function.identity(), (o1, o2) -> o2));
multiNewsList.forEach(item -> item.setReferralEntity(referralEntityMap.get(item.getId())));
infoVo.setMultiNewsList(multiNewsList);
}
}
// 根据appid获取公众号信息 // 根据appid获取公众号信息
AuthInfoVO authInfo = authorizerInfoService.getAuthInfoByAppid(infoVo.getAppid()); AuthInfoVO authInfo = authorizerInfoService.getAuthInfoByAppid(infoVo.getAppid());
if (ObjectUtil.isNull(authInfo)) { if (ObjectUtil.isNull(authInfo)) {
......
...@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil; ...@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize; import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yaoyaozw.customer.entity.CommonReferralBody; import com.yaoyaozw.customer.entity.CommonReferralBody;
import com.yaoyaozw.customer.entity.CustomerFollowReplyMultiNews;
import com.yaoyaozw.customer.vo.AuthInfoVO; import com.yaoyaozw.customer.vo.AuthInfoVO;
import lombok.Data; import lombok.Data;
...@@ -39,6 +40,8 @@ public class FollowReplyInfoVO implements Serializable { ...@@ -39,6 +40,8 @@ public class FollowReplyInfoVO implements Serializable {
private CommonReferralBody referralBody; private CommonReferralBody referralBody;
private List<CustomerFollowReplyMultiNews> multiNewsList;
private List<CommonReferralBody> textBodyList; private List<CommonReferralBody> textBodyList;
public CommonReferralBody getReferralBody() { public CommonReferralBody getReferralBody() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论