Commit adc5f4b5 by songyinghui

feature: 会员订单写入数据组

parent c49632a3
package com.gic.haoban.manage.service.service.content.impl;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.UniqueIdUtils;
import com.gic.content.api.enums.MaterialOrderFieldEnum;
import com.gic.content.api.enums.MaterialSearchSceneEnum;
import com.gic.content.api.qdto.material.ContentMaterialPageQDTO;
import com.gic.content.api.service.ContentMaterialApiService;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.enums.content.InteractRecordSearchType;
......@@ -67,6 +73,8 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
MemberQueryService memberQueryService;
@Autowired
StaffClerkRelationService staffClerkRelationService;
@Autowired
private ContentMaterialApiService contentMaterialApiService;
/**
......@@ -87,11 +95,24 @@ public class PotentialCustomerServiceImpl implements PotentialCustomerService {
return new Page<>();
}
if (InteractRecordSearchType.MATERIAL.getCode().equals(potentialCustomerQO.getSearchType())) {
// 按素材搜索
//todo 查询1000个素材id
List<String> bizIds = Collections.emptyList();
// 按素材搜索
ContentMaterialPageQDTO searchQuery = new ContentMaterialPageQDTO();
searchQuery.setEnterpriseId(potentialCustomerQO.getEnterpriseId());
searchQuery.setQueryScene(MaterialSearchSceneEnum.GIC_MARKETING.value);
searchQuery.setSearch(potentialCustomerQO.getSearch());
searchQuery.setOrderField(MaterialOrderFieldEnum.PUBLISH_BEGIN_TIME.value);
BasePageInfo pageInfo = new BasePageInfo();
pageInfo.setPageSize(1000);
ServiceResponse<List<Long>> serviceResponse = contentMaterialApiService.listMaterialIdBySearch(searchQuery, pageInfo);
if (serviceResponse.isSuccess() && CollectionUtils.isNotEmpty(serviceResponse.getResult())) {
bizIds = serviceResponse.getResult()
.stream()
.map(String::valueOf)
.collect(Collectors.toList());
}
if (CollectionUtils.isEmpty(bizIds)) {
log.info("按素材搜索, {} 搜索素材结果为空", potentialCustomerQO.getSearch());
log.info("按素材搜索, {} 搜索素材内容结果为空", potentialCustomerQO.getSearch());
return new Page<>();
}
potentialCustomerQO.setBizIds(bizIds);
......
......@@ -36,7 +36,7 @@ import java.util.Optional;
import java.util.stream.Collectors;
/**
* 好办小程序-销售线索
* 好办-销售线索
**/
@Slf4j
@RestController
......
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