Commit 78599b52 by 王祖波

销售线索搜索修改

parent e3408b45
......@@ -77,16 +77,28 @@ public class InteractRecordApiServiceImpl implements InteractRecordApiService {
}
Integer eventType = interactRecordQDTO.getEventTypeAggs();
if (eventType != null) {
List<Integer> bizTypeList = searchQo.getBizTypeList();
if (Objects.equals(eventType, InteractRecordEventType.MATERIAL.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.MATERIAL.getCode());
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.MATERIAL.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.MATERIAL.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
} else if (Objects.equals(bizType, ShareBizType.GOODS.getCode())) {
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_MATERIAL.getCode(),MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
List<Integer> bizTypeList = Optional.ofNullable(searchQo.getBizTypeList()).orElse(new ArrayList<>());
bizTypeList.add(ShareBizType.GOODS.getCode());
bizTypeList.add(ShareBizType.MULTIPLE_GOODS.getCode());
searchQo.setEventTypeList(Lists.newArrayList(MaterialInteractRecordEventType.VISIT_PRODUCT.getCode()));
if (CollectionUtils.isEmpty(searchQo.getBizTypeList())) {
bizTypeList = Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode());
}else {
bizTypeList.retainAll(Lists.newArrayList(ShareBizType.GOODS.getCode(),ShareBizType.MULTIPLE_GOODS.getCode()));
if (CollectionUtils.isEmpty(bizTypeList)) {
bizTypeList = Lists.newArrayList(-1);
}
}
searchQo.setBizTypeList(bizTypeList);
}else {
searchQo.setEventTypeList(Lists.newArrayList(eventType));
......
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