Commit 7811671c authored by 刘基明's avatar 刘基明

基金详情接口fix

parent 54b3f5b2
......@@ -24,9 +24,16 @@ public class FeignBackClientForProducts implements FallbackFactory<FeignClientFo
}
@Override
public CommonResp<List<ProductInfoVO>> getProductInfoByIds(List<String> ids) {
public CommonResp<List<ProductInfoVO>> getProductInfoByIds(List<String> fundIds) {
log.error("请求信息", throwable);
log.error("FeignClientForProducts.getProductInfoByIds-查询产品ids:{}", ids);
log.error("FeignClientForProducts.getProductInfoByIds-查询产品ids:{}", fundIds);
return null;
}
@Override
public CommonResp<List<ProductInfoVO>> getProductInfoByIdsNew(List<String> fundIds) {
log.error("请求信息", throwable);
log.error("FeignClientForProducts.getProductInfoByIdsNew-查询私募产品ids:{}", fundIds);
return null;
}
......
......@@ -21,9 +21,13 @@ public interface FeignClientForProducts {
CommonResp<ProductInfoVO> getProductDetailInfo(@ApiParam("产品id") @RequestParam("id") String id);
@ApiOperation("批量获取私募产品详情")
@ApiOperation("批量获取私募产品详情(旧),Theme详情用")
@GetMapping("/getProductInfoByIds")
CommonResp<List<ProductInfoVO>> getProductInfoByIds(@ApiParam("产品id") @RequestParam("fundIds") List<String> fundIds);
CommonResp<List<ProductInfoVO>> getProductInfoByIds(@ApiParam("筛选条件对象") @RequestParam List<String> fundIds);
@ApiOperation("批量获取私募产品详情(新),Topic详情用")
@GetMapping("/getProductInfoByIdsNew")
CommonResp<List<ProductInfoVO>> getProductInfoByIdsNew(@ApiParam("筛选条件对象") @RequestParam List<String> fundIds);
@ApiOperation("基金公司-简单信息")
@GetMapping("/fund/companyInfoSimple")
......
......@@ -137,7 +137,7 @@ public class NotificationManager {
themeNotifyQo.setTopicTitle(topicService.queryTitleById(themeNotifyQo.getTopicId()));
}
// 评论的评论
if (NotificationTypeEnum.COMMENT.getCode().equals(themeNotifyQo.getMessageType())){
if (NotificationTypeEnum.COMMENT_REPLY.getCode().equals(themeNotifyQo.getMessageType())){
CommentEntity commentEntity = commentService.queryByCommentId(themeNotifyQo.getReplyCommentId());
if (commentEntity != null) {
themeNotifyQo.setFormerContent(commentEntity.getContent());
......
......@@ -288,7 +288,7 @@ public class BatchFeignCallService {
// .fundIds(Lists.newArrayList(tanpuFundIds))
// .build();
// 探普产品
List<ProductInfoVO> list = feignService.getProductInfoByIds(setToList(tanpuFundIds));
List<ProductInfoVO> list = feignService.getProductInfoByIdsForTheme(setToList(tanpuFundIds));
List<FundInfoBaseResp> fundInfoBaseRespList = list.stream().map(item -> {
FundInfoBaseResp fundInfoBaseResp = FundInfoBaseResp.builder().build();
BeanUtils.copyProperties(item, fundInfoBaseResp);
......
......@@ -139,7 +139,19 @@ public class FeignService {
});
}
public List<ProductInfoVO> getProductInfoByIds(List<String> fundIds) {
public List<ProductInfoVO> getProductInfoByIdsForTopic(List<String> fundIds) {
return batchExecute("getProductInfoByIds_", fundIds, ProductInfoVO.class,
ProductInfoVO::getFundId, ids -> {
CommonResp<List<ProductInfoVO>> resp = feignForProduct.getProductInfoByIds(ids);
if (resp.isSuccess()) {
return resp.getData();
} else {
return new ArrayList<>();
}
});
}
public List<ProductInfoVO> getProductInfoByIdsForTheme(List<String> fundIds) {
return batchExecute("getProductInfoByIds_", fundIds, ProductInfoVO.class,
ProductInfoVO::getFundId, ids -> {
CommonResp<List<ProductInfoVO>> resp = feignForProduct.getProductInfoByIds(ids);
......
......@@ -170,7 +170,7 @@ public class NotificationService {
// 类型2点赞返回评论点赞和主题点赞
queryWrapper.in(NotificationEntity::getMessageType,
Arrays.asList(NotificationTypeEnum.LIKE.getCode(), NotificationTypeEnum.COMMENT_LIKE.getCode()));
} else if (!NotificationTypeEnum.COMMENT.getCode().equals(type)) {
} else if (NotificationTypeEnum.COMMENT.getCode().equals(type)) {
// 类型3返回 回复主题和回复评论
queryWrapper.in(NotificationEntity::getMessageType,
Arrays.asList(NotificationTypeEnum.COMMENT.getCode(), NotificationTypeEnum.COMMENT_REPLY.getCode()));
......
......@@ -231,7 +231,7 @@ public class TopicService {
List<ProductInfoVO> fund = Collections.emptyList();
// 基金
if (entity.getSubjectSubType() == ProductTypeEnum.PRIVATE.type || entity.getSubjectSubType() == ProductTypeEnum.TAMP.type) {
fund = feignService.getProductInfoByIds(Collections.singletonList(entity.getSubjectId()));
fund = feignService.getProductInfoByIdsForTopic(Collections.singletonList(entity.getSubjectId()));
} else if (entity.getSubjectSubType() == ProductTypeEnum.PUBLIC.type) {
fund = feignService.getPublicFundList(Collections.singletonList(entity.getSubjectId()));
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment