提交 c0b57dff 作者: 沈振路

关回多图文编辑回显

上级 5a006ffe
......@@ -279,6 +279,7 @@ public class CustomerFollowReplyServiceImpl extends ServiceImpl<CustomerFollowRe
FollowReplyInfoVO infoVo = new FollowReplyInfoVO();
BeanUtil.copyProperties(entity, infoVo);
if (!CustomerMaterialConstant.TENCENT_MEDIA_TYPE_MULTI_NEWS.equals(entity.getType())) {
// 获取素材的链接数据
if (CustomerMaterialConstant.needReferral(entity.getType())) {
// 是需要设置referral的类型
......@@ -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获取公众号信息
AuthInfoVO authInfo = authorizerInfoService.getAuthInfoByAppid(infoVo.getAppid());
if (ObjectUtil.isNull(authInfo)) {
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.yaoyaozw.customer.entity.CommonReferralBody;
import com.yaoyaozw.customer.entity.CustomerFollowReplyMultiNews;
import com.yaoyaozw.customer.vo.AuthInfoVO;
import lombok.Data;
......@@ -39,6 +40,8 @@ public class FollowReplyInfoVO implements Serializable {
private CommonReferralBody referralBody;
private List<CustomerFollowReplyMultiNews> multiNewsList;
private List<CommonReferralBody> textBodyList;
public CommonReferralBody getReferralBody() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论