Commit a06c6f29 by 王祖波

导购知识库列表数据

parent 7510617c
......@@ -319,7 +319,7 @@ public class ContentMaterialController {
likeMap = likeList.stream().collect(Collectors.toMap(ContentMaterialLikeDTO::getContentMaterialId, t -> t));
}
//阅读、评论数据
List<ContentMaterialKnowVO> knowList = materialDataAdaptor.queryKnowData(enterpriseId, contentMaterialIdList);
List<ContentMaterialKnowVO> knowList = materialDataAdaptor.queryKnowData(enterpriseId, clerkId,contentMaterialIdList);
Map<Long, ContentMaterialKnowVO> knowMap = new HashMap<>();
if (CollectionUtils.isNotEmpty(knowList)) {
knowMap = knowList.stream().collect(Collectors.toMap(ContentMaterialKnowVO::getContentMaterialId, t -> t));
......
......@@ -101,7 +101,7 @@ public class MaterialDataAdaptor {
/**
* 知识库素材列表数据
*/
private static final String MATERIAL_KNOWL_DATA = "data_cms_matl_knowl_list";
private static final String MATERIAL_KNOWL_HAOBAN_DATA = "data_cms_matl_knowl_haoban_list";
@Autowired
private EnterpriseService enterpriseService;
......@@ -525,7 +525,7 @@ public class MaterialDataAdaptor {
* @param materialIdList 素材id列表
* @return
*/
public List<ContentMaterialKnowVO> queryKnowData(String enterpriseId, List<Long> materialIdList) {
public List<ContentMaterialKnowVO> queryKnowData(String enterpriseId, String clerkId,List<Long> materialIdList) {
Map<String, Object> inlineParams = new HashMap<>();
if (CollectionUtils.isEmpty(materialIdList)) {
......@@ -533,13 +533,12 @@ public class MaterialDataAdaptor {
}
inlineParams.put("enterpriseId", enterpriseId);
inlineParams.put("contentMaterialId", StringUtils.join(materialIdList, ","));
//只查询公开的评论
inlineParams.put("showFlag", 1);
inlineParams.put("visibleClerkId", clerkId);
inlineParams.put("pageNum", 1);
inlineParams.put("pageSize", materialIdList.size());
Map<String, Object> result = null;
try {
result = DataApiUtils.http(JSON.toJSONString(inlineParams), MATERIAL_KNOWL_DATA);
result = DataApiUtils.http(JSON.toJSONString(inlineParams), MATERIAL_KNOWL_HAOBAN_DATA);
} catch (Exception e) {
log.error("获取知识库数据异常",e);
return new ArrayList<>();
......
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