Merge remote-tracking branch 'origin/dev/feat/partner1.5_20231106' into dev/feat/partner1.5_20231106
This commit is contained in:
@@ -2,16 +2,12 @@ package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||
import com.cool.store.dto.partner.StageCountDTO;
|
||||
import com.cool.store.dto.partner.*;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.collections4.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -139,9 +135,12 @@ public class HyPartnerLineInfoDAO {
|
||||
|
||||
public List<PrivateSeaLineDTO> getPrivateSeaLineList(String keyword, String keywordType, String workflowStage, String workflowStatus, String deadlineStart, String deadlineEnd,
|
||||
String intentAreaName, Integer acceptAdjustType, String storeKeyword, String storeKeywordType, List<String> userIdList,
|
||||
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime){
|
||||
List<String> developmentManagerList,List<Long> userPortraitIdList,List<Long> userChannelIdList, String updateStartTime, String updateEndTime
|
||||
,String partnerName,String partnerMobile,String investmentManagerId,String userPortraitQueryType
|
||||
,String intentAreaQueryType,String lineStartTime,String lineEndTime,String userChannelQueryType){
|
||||
return hyPartnerLineInfoMapper.getPrivateSeaLineList( keyword, keywordType, workflowStage, workflowStatus, deadlineStart, deadlineEnd,
|
||||
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime);
|
||||
intentAreaName, acceptAdjustType, storeKeyword, storeKeywordType, userIdList,developmentManagerList,userPortraitIdList,userChannelIdList, updateStartTime, updateEndTime
|
||||
,partnerName,partnerMobile,investmentManagerId,userPortraitQueryType,intentAreaQueryType,lineStartTime,lineEndTime,userChannelQueryType);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -181,7 +181,15 @@ public interface HyPartnerLineInfoMapper {
|
||||
@Param("userPortraitIdList") List<Long> userPortraitIdList,
|
||||
@Param("userChannelIdList") List<Long> userChannelIdList,
|
||||
@Param("updateStartTime") String updateStartTime,
|
||||
@Param("updateEndTime") String updateEndTime);
|
||||
@Param("updateEndTime") String updateEndTime,
|
||||
@Param("partnerName") String partnerName,
|
||||
@Param("partnerMobile") String partnerMobile,
|
||||
@Param("investmentManagerId") String investmentManagerId,
|
||||
@Param("userPortraitQueryType") String userPortraitQueryType,
|
||||
@Param("intentAreaQueryType") String intentAreaQueryType,
|
||||
@Param("lineStartTime") String lineStartTime,
|
||||
@Param("lineEndTime") String lineEndTime,
|
||||
@Param("userChannelQueryType") String userChannelQueryType);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -562,12 +562,30 @@
|
||||
<if test="updateStartTime!=null and updateEndTime!=null">
|
||||
AND hpli.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
|
||||
</if>
|
||||
<if test="intentAreaName!=null and intentAreaName!=''">
|
||||
<if test="lineStartTime != null and lineEndTime != null">
|
||||
AND hpli.create_time BETWEEN #{lineStartTime} and #{lineEndTime}
|
||||
</if>
|
||||
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType == 'contains'">
|
||||
and hoai.area_path like concat('%/',#{intentAreaName},'/%')
|
||||
</if>
|
||||
<if test="intentAreaName!=null and intentAreaName!='' and intentAreaQueryType!=null and intentAreaQueryType == 'notContains'">
|
||||
and hoai.area_path not like concat('%/',#{intentAreaName},'/%')
|
||||
</if>
|
||||
<if test="intentAreaQueryType !=null and intentAreaQueryType == 'blank'">
|
||||
AND hpuinfo.want_shop_area is null
|
||||
</if>
|
||||
<if test="acceptAdjustType!=null">
|
||||
AND hpuinfo.accept_adjust_type = #{acceptAdjustType}
|
||||
</if>
|
||||
<if test="partnerName !=null and partnerName!=''">
|
||||
AND hpuinfo.username like concat('%',#{partnerName},'%')
|
||||
</if>
|
||||
<if test="partnerMobile !=null and partnerMobile!=''">
|
||||
AND hpuinfo.mobile like concat('%',#{partnerMobile},'%')
|
||||
</if>
|
||||
<if test="investmentManagerId !=null and investmentManagerId!=''">
|
||||
AND hpli.investment_manager = #{investmentManagerId}
|
||||
</if>
|
||||
<if test="storeKeyword!=null and storeKeyword!='' and storeKeywordType!=null and storeKeywordType=='storeCode'">
|
||||
AND hpuinfo.shop_code like concat('%',#{storeKeyword},'%')
|
||||
</if>
|
||||
@@ -585,16 +603,33 @@
|
||||
#{userId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0">
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='contains'">
|
||||
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
|
||||
bi.user_portrait like concat("%,", #{userPortraitId}, ",%")
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userChannelIdList!=null and userChannelIdList.size>0">
|
||||
<if test="userPortraitIdList!=null and userPortraitIdList.size>0 and userPortraitQueryType!=null and userPortraitQueryType=='notContains'">
|
||||
<foreach collection="userPortraitIdList" separator="or" open="and (" close=")" item="userPortraitId">
|
||||
bi.user_portrait not like concat("%,", #{userPortraitId}, ",%")
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userPortraitQueryType!=null and userPortraitQueryType=='blank'">
|
||||
bi.user_portrait is null
|
||||
</if>
|
||||
|
||||
<if test="userChannelIdList!=null and userChannelIdList.size>0 and userChannelQueryType!=null and userChannelQueryType == 'contains' ">
|
||||
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id in (" close=")" separator="," item="userChannelId">
|
||||
#{userChannelId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userChannelIdList!=null and userChannelIdList.size>0 and userChannelQueryType!=null and userChannelQueryType == 'notContains' ">
|
||||
<foreach collection="userChannelIdList" open="and hpuinfo.user_channel_id not in (" close=")" separator="," item="userChannelId">
|
||||
#{userChannelId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="userChannelQueryType!=null and userChannelQueryType == 'blank' ">
|
||||
hpuinfo.user_channel_id is null
|
||||
</if>
|
||||
<if test="userIdList!=null and userIdList.size==0 and developmentManagerList!=null and developmentManagerList.size>0">
|
||||
<foreach collection="developmentManagerList" item="developmentManager" open="and hpli.development_manager in (" close=")" separator=",">
|
||||
#{developmentManager}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -35,26 +33,52 @@ public class PrivateSeaLineListRequest extends PageInfoRequest {
|
||||
@ApiModelProperty("截止时间_结束")
|
||||
private String deadlineEnd;
|
||||
|
||||
@ApiModelProperty("意向区域")
|
||||
private String intentArea;
|
||||
|
||||
@ApiModelProperty("调剂方式")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
|
||||
@ApiModelProperty("加盟商手机号")
|
||||
private String partnerMobile;
|
||||
|
||||
@ApiModelProperty("招商经理ID")
|
||||
private String investmentManagerId;
|
||||
|
||||
@ApiModelProperty("意向区域(type为空的时候不需要传值)")
|
||||
private String intentAreaId;
|
||||
|
||||
@ApiModelProperty("意向区域 包含-contains/不包含-notContains/为空-blank")
|
||||
private String intentAreaQueryType;
|
||||
|
||||
@ApiModelProperty("【推荐店铺编码】、【推荐店铺名称】、【加盟商姓名】或【手机号】")
|
||||
private String storeKeyword;
|
||||
@ApiModelProperty("【storeCode -推荐店铺编码】、【storeName 推荐店铺名称】、【partnerName 加盟商姓名】或【partnerMobile 手机号】")
|
||||
private String storeKeywordType;
|
||||
|
||||
@ApiModelProperty("用户画像ID列表(type为空的时候不需要传值)")
|
||||
private List<Long> userPortraitIdList;
|
||||
|
||||
@ApiModelProperty("用户画像 包含-contains/不包含-notContains/为空-blank")
|
||||
private String userPortraitQueryType;
|
||||
|
||||
@ApiModelProperty("线索来源ID列表(type为空的时候不需要传值)")
|
||||
private List<Long> userChannelIdList;
|
||||
|
||||
@ApiModelProperty("线索来源 包含-contains/不包含-notContains/为空-blank")
|
||||
private String userChannelQueryType;
|
||||
|
||||
@ApiModelProperty("更新开始时间")
|
||||
private String updateStartTime;
|
||||
|
||||
@ApiModelProperty("更新结束时间")
|
||||
private String updateEndTime;
|
||||
|
||||
@ApiModelProperty("创建时间_开始")
|
||||
private String lineStartTime;
|
||||
|
||||
@ApiModelProperty("创建时间_结束")
|
||||
private String lineEndTime;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:33
|
||||
@@ -27,4 +28,7 @@ public class LabelGroupListVo {
|
||||
@ApiModelProperty("编辑时间")
|
||||
private Date editDate;
|
||||
|
||||
@ApiModelProperty("标签列表")
|
||||
private List<LabelListVo> labelList;
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -7,16 +7,14 @@ import com.cool.store.dto.label.LabelUpdateDTO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -40,6 +38,13 @@ public class LabelController {
|
||||
return ResponseResult.success(new PageInfo<>(result));
|
||||
}
|
||||
|
||||
@ApiOperation("查询标签组及子标签列表")
|
||||
@GetMapping("/labelGroupAndLabelList")
|
||||
public ResponseResult<List<LabelGroupListVo>> getAllLabelList() {
|
||||
List<LabelGroupListVo> result = labelService.getAllGroupAndLabelList();
|
||||
return ResponseResult.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("新增标签")
|
||||
@PostMapping("/add")
|
||||
public ResponseResult addLabel(@RequestBody LabelAddDTO dto) throws ApiException {
|
||||
|
||||
Reference in New Issue
Block a user