Merge remote-tracking branch 'origin/dev/feat/partner1.5_20231106' into dev/feat/partner1.5_20231106
This commit is contained in:
@@ -6,6 +6,7 @@ import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.dto.label.LabelUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
|
||||
import java.util.List;
|
||||
@@ -61,4 +62,5 @@ public interface LabelService {
|
||||
|
||||
void addEcLabel(HyPartnerLabelDO hyPartnerLabelDO);
|
||||
|
||||
List<LabelGroupListVo> getAllGroupAndLabelList();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
@@ -626,11 +625,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
if (!allPrivateSeaFlag){
|
||||
userIdsByScope = enterpriseUserService.getUserIdsByScope(userId);
|
||||
}
|
||||
String intentAreaName = getIntentAreaName(request.getIntentArea());
|
||||
String intentAreaName = getIntentAreaName(request.getIntentAreaId());
|
||||
PageHelper.startPage(request.getPageNum(),request.getPageSize());
|
||||
PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(),
|
||||
request.getWorkflowStatus(), request.getDeadlineStart(), request.getDeadlineEnd(), intentAreaName, request.getAcceptAdjustType(), request.getStoreKeyword(),
|
||||
request.getStoreKeywordType(), userIdsByScope.getInvestmentUserIds(),userIdsByScope.getDevelopmentUserIds(),request.getUserPortraitIdList(),request.getUserChannelIdList(), request.getUpdateStartTime(), request.getUpdateEndTime()));
|
||||
request.getStoreKeywordType(), userIdsByScope.getInvestmentUserIds(),userIdsByScope.getDevelopmentUserIds(),request.getUserPortraitIdList(),request.getUserChannelIdList()
|
||||
, request.getUpdateStartTime(), request.getUpdateEndTime(), request.getPartnerName(),request.getPartnerMobile(),request.getInvestmentManagerId(),request.getUserPortraitQueryType()
|
||||
,request.getIntentAreaQueryType(),request.getLineStartTime(),request.getLineEndTime(),request.getUserChannelQueryType()));
|
||||
List<PrivateSeaLineDTO> list = privateLineList.getList();
|
||||
if (CollectionUtils.isEmpty(list)){
|
||||
return privateLineList;
|
||||
|
||||
@@ -10,7 +10,9 @@ import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -18,7 +20,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -116,6 +117,24 @@ public class LabelServiceImpl implements LabelService {
|
||||
labelMapper.insertSelective(hyPartnerLabelDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LabelGroupListVo> getAllGroupAndLabelList() {
|
||||
List<LabelListVo> labelList = labelMapper.getLabelList(new LabelListDTO());
|
||||
if (CollectionUtils.isEmpty(labelList)) {
|
||||
log.info("标签列表为空");
|
||||
return Lists.newArrayList(new LabelGroupListVo());
|
||||
}
|
||||
Map<Long, List<LabelListVo>> idForVo = labelList.stream().collect(Collectors.groupingBy(LabelListVo::getLabelGroupId));
|
||||
List<LabelGroupListVo> result = idForVo.entrySet().stream().map(entry -> {
|
||||
LabelGroupListVo labelGroupListVo = new LabelGroupListVo();
|
||||
labelGroupListVo.setId(entry.getKey());
|
||||
labelGroupListVo.setLabelGroupName(entry.getValue().get(0).getLabelGroupName());
|
||||
labelGroupListVo.setLabelList(entry.getValue());
|
||||
return labelGroupListVo;
|
||||
}).sorted(Comparator.comparing(LabelGroupListVo::getId)).collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
|
||||
private Boolean whetherLabelRepeat(HyPartnerLabelDO label) throws ApiException {
|
||||
Long id = label.getId();
|
||||
label.setId(null);
|
||||
|
||||
Reference in New Issue
Block a user