私海列表
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dao;
|
|||||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||||
import com.cool.store.dto.partner.StageCountDTO;
|
import com.cool.store.dto.partner.StageCountDTO;
|
||||||
|
import com.cool.store.dto.partner.*;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@@ -12,6 +13,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -111,8 +114,8 @@ public class HyPartnerLineInfoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public PageInfo<PartnerBlackListDTO> getBlackList( String keyWord, String intentArea , Integer acceptAdjustType){
|
public PageInfo<PartnerBlackListDTO> getBlackList( String userNameKeyword,String phoneKeyword, String intentArea , Integer acceptAdjustType){
|
||||||
return hyPartnerLineInfoMapper.getBlackList(keyWord,intentArea,acceptAdjustType);
|
return hyPartnerLineInfoMapper.getBlackList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -123,6 +126,17 @@ public class HyPartnerLineInfoDAO {
|
|||||||
return hyPartnerLineInfoMapper.joinAndRemoveBlack(lineId,status,joinReason,removeReason);
|
return hyPartnerLineInfoMapper.joinAndRemoveBlack(lineId,status,joinReason,removeReason);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public PageInfo<PublicSeaLineDTO> getPublicSeaLineList( String userNameKeyword, String phoneKeyword, String intentArea, Integer acceptAdjustType, Date updateStartTime, Date updateEndTime, List<String> userIdList){
|
||||||
|
return hyPartnerLineInfoMapper.getPublicSeaLineList(userNameKeyword,phoneKeyword,intentArea,acceptAdjustType,updateStartTime,updateEndTime,userIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<HyPartnerLineInfoDO> getPartnerLastLine(List<String> partnerIdList){
|
||||||
|
if (CollectionUtils.isEmpty(partnerIdList)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return hyPartnerLineInfoMapper.getPartnerLastLine(partnerIdList);
|
||||||
|
}
|
||||||
public HyPartnerLineInfoDO getByPartnerId(String partnerId){
|
public HyPartnerLineInfoDO getByPartnerId(String partnerId){
|
||||||
if (StringUtils.isEmpty(partnerId)){
|
if (StringUtils.isEmpty(partnerId)){
|
||||||
return null;
|
return null;
|
||||||
@@ -131,4 +145,11 @@ public class HyPartnerLineInfoDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<LineCountDTO> getFollowCountList( List<String> partnerIdList){
|
||||||
|
if (CollectionUtils.isEmpty(partnerIdList)){
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
return hyPartnerLineInfoMapper.getFollowCountList(partnerIdList);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.cool.store.mapper;
|
package com.cool.store.mapper;
|
||||||
|
|
||||||
|
import com.cool.store.dto.partner.*;
|
||||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
||||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
||||||
import com.cool.store.dto.partner.StageCountDTO;
|
import com.cool.store.dto.partner.StageCountDTO;
|
||||||
@@ -7,6 +8,7 @@ import com.cool.store.entity.HyPartnerLineInfoDO;
|
|||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -107,12 +109,14 @@ public interface HyPartnerLineInfoMapper {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询黑名单列表
|
* 查询黑名单列表
|
||||||
* @param keyWord
|
* @param userNameKeyword
|
||||||
|
* @param phoneKeyword
|
||||||
* @param intentArea
|
* @param intentArea
|
||||||
* @param acceptAdjustType
|
* @param acceptAdjustType
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
PageInfo<PartnerBlackListDTO> getBlackList(@Param("keyWord") String keyWord,
|
PageInfo<PartnerBlackListDTO> getBlackList(@Param("userNameKeyword") String userNameKeyword,
|
||||||
|
@Param("phoneKeyword") String phoneKeyword,
|
||||||
@Param("intentArea") String intentArea ,
|
@Param("intentArea") String intentArea ,
|
||||||
@Param("acceptAdjustType") Integer acceptAdjustType);
|
@Param("acceptAdjustType") Integer acceptAdjustType);
|
||||||
|
|
||||||
@@ -133,4 +137,37 @@ public interface HyPartnerLineInfoMapper {
|
|||||||
HyPartnerLineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
HyPartnerLineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询公海线索
|
||||||
|
* @param userNameKeyword
|
||||||
|
* @param phoneKeyword
|
||||||
|
* @param intentArea
|
||||||
|
* @param acceptAdjustType
|
||||||
|
* @param updateStartTime
|
||||||
|
* @param updateEndTime
|
||||||
|
* @param userIdList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<PublicSeaLineDTO> getPublicSeaLineList(@Param("userNameKeyword") String userNameKeyword,
|
||||||
|
@Param("phoneKeyword") String phoneKeyword,
|
||||||
|
@Param("intentArea") String intentArea,
|
||||||
|
@Param("acceptAdjustType") Integer acceptAdjustType,
|
||||||
|
@Param("updateStartTime") Date updateStartTime,
|
||||||
|
@Param("updateEndTime") Date updateEndTime,
|
||||||
|
@Param("userIdList") List<String> userIdList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询对应的加盟商最近线索
|
||||||
|
* @param partnerIdList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<HyPartnerLineInfoDO> getPartnerLastLine(@Param("partnerIdList") List<String> partnerIdList);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加盟商跟进次数
|
||||||
|
* @param partnerIdList
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<LineCountDTO> getFollowCountList(@Param("partnerIdList") List<String> partnerIdList);
|
||||||
}
|
}
|
||||||
@@ -357,8 +357,11 @@
|
|||||||
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
|
from hy_partner_line_info a inner join hy_partner_user_info b where a.partner_id = b.partner_id
|
||||||
where deleted = 0
|
where deleted = 0
|
||||||
and line_status = 3
|
and line_status = 3
|
||||||
<if test="keyWord!=null and keyWord !=''">
|
<if test="userNameKeyword!=null and userNameKeyword !=''">
|
||||||
and (b.username like concat('%', #{keyWord}, '%') or b.mobile like concat('%', #{keyWord}, '%'))
|
and b.username like concat('%', #{userNameKeyword}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="phoneKeyword!=null and phoneKeyword !=''">
|
||||||
|
and b.mobile like concat('%', #{phoneKeyword}, '%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intentArea!=null and intentArea!=''">
|
<if test="intentArea!=null and intentArea!=''">
|
||||||
and b.want_shop_area = #{intentArea}
|
and b.want_shop_area = #{intentArea}
|
||||||
@@ -391,4 +394,60 @@
|
|||||||
where partner_id = #{partnerId}
|
where partner_id = #{partnerId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
|
||||||
|
select
|
||||||
|
a.create_time as createTime,
|
||||||
|
b.partner_id as partner_id,
|
||||||
|
b.mobile as mobile,
|
||||||
|
b.username as userName,
|
||||||
|
b.want_shop_area as wantShopArea,
|
||||||
|
b.accept_adjust_type as acceptAdjustType
|
||||||
|
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
|
||||||
|
where a.line_status = 1
|
||||||
|
<if test="userNameKeyword!=null and userNameKeyword!=''">
|
||||||
|
and b.username like concat('%',#{userNameKeyword},'%')
|
||||||
|
</if>
|
||||||
|
<if test="phoneKeyword!=null and phoneKeyword!=''">
|
||||||
|
and b.mobile like concat('%',#{phoneKeyword},'%')
|
||||||
|
</if>
|
||||||
|
<if test="intentArea!=null and intentArea!=''">
|
||||||
|
and b.want_shop_area = #{intentArea}
|
||||||
|
</if>
|
||||||
|
<if test="acceptAdjustType!=null">
|
||||||
|
and b.accept_adjust_type = #{acceptAdjustType}
|
||||||
|
</if>
|
||||||
|
<if test="updateStartTime!=null and updateEndTime!=''">
|
||||||
|
and a.update_time BETWEEN #{updateStartTime} and #{updateEndTime}
|
||||||
|
</if>
|
||||||
|
<if test="userIdList!=null and userIdList.size>0">
|
||||||
|
<foreach collection="userIdList" item="userId" open="and a.investment_manager in (" close=")" separator=",">
|
||||||
|
#{userId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getPartnerLastLine" resultMap="BaseResultMap">
|
||||||
|
SELECT
|
||||||
|
<include refid="Base_Column_List"></include>
|
||||||
|
FROM hy_partner_line_info h1
|
||||||
|
WHERE h1.create_time = (
|
||||||
|
SELECT MAX(h2.create_time)
|
||||||
|
FROM hy_partner_line_info h2
|
||||||
|
WHERE h1.partner_id = h2.partner_id
|
||||||
|
<if test="partnerIdList!=null and partnerIdList.size>0">
|
||||||
|
<foreach collection="partnerIdList" item="partnerId" open="and h1.partner_id in (" close=")" separator=",">
|
||||||
|
#{partnerId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
|
||||||
|
SELECT partner_id, COUNT(1) AS num_of_leads
|
||||||
|
FROM hy_partner_line_info
|
||||||
|
GROUP BY partner_id;
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.cool.store.dto.partner;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2023/6/15 21:19
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LineCountDTO {
|
||||||
|
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
private Integer followCount;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
package com.cool.store.dto.partner;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2023/6/15 20:21
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class PublicSeaLineDTO {
|
||||||
|
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
private Long lineId;
|
||||||
|
|
||||||
|
private String partnerId;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String mobile;
|
||||||
|
|
||||||
|
private String wantShopArea;
|
||||||
|
|
||||||
|
private String acceptAdjustType;
|
||||||
|
}
|
||||||
@@ -17,8 +17,11 @@ import java.util.Date;
|
|||||||
public class LineRequest extends PageInfoRequest{
|
public class LineRequest extends PageInfoRequest{
|
||||||
|
|
||||||
|
|
||||||
@ApiModelProperty("关键字")
|
@ApiModelProperty("用户名关键字")
|
||||||
private String keyWord;
|
private String userNameKeyword;
|
||||||
|
|
||||||
|
@ApiModelProperty("手机号关键字")
|
||||||
|
private String phoneKeyword;
|
||||||
|
|
||||||
@ApiModelProperty("意向区域")
|
@ApiModelProperty("意向区域")
|
||||||
private String intentArea;
|
private String intentArea;
|
||||||
@@ -26,8 +29,11 @@ public class LineRequest extends PageInfoRequest{
|
|||||||
@ApiModelProperty("调剂类型")
|
@ApiModelProperty("调剂类型")
|
||||||
private Integer acceptAdjustType;
|
private Integer acceptAdjustType;
|
||||||
|
|
||||||
@ApiModelProperty("更新时间")
|
@ApiModelProperty("更新开始时间")
|
||||||
private Date updateTime;
|
private Date updateStartTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新结束时间")
|
||||||
|
private Date updateEndTime;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,22 @@ public class PrivateSeaLineListVo {
|
|||||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||||
private Integer acceptAdjustType;
|
private Integer acceptAdjustType;
|
||||||
|
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String storeCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("门店名称")
|
||||||
|
private String storeName;
|
||||||
|
|
||||||
|
@ApiModelProperty("线索状态")
|
||||||
|
private Integer lineStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("推荐加盟商ID")
|
||||||
|
private String recommendPartnerId;
|
||||||
|
|
||||||
|
@ApiModelProperty("推荐加盟商名称")
|
||||||
|
private String recommendPartnerName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,5 +59,9 @@ public class PublicSeaLineListVo {
|
|||||||
|
|
||||||
@ApiModelProperty("跟进次数")
|
@ApiModelProperty("跟进次数")
|
||||||
private Integer followCount;
|
private Integer followCount;
|
||||||
|
@ApiModelProperty("意向开店区域ID")
|
||||||
|
private String wantShopArea;
|
||||||
|
|
||||||
|
private String acceptAdjustType;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,10 +2,7 @@ package com.cool.store.service;
|
|||||||
|
|
||||||
import com.cool.store.request.CloseFollowRequest;
|
import com.cool.store.request.CloseFollowRequest;
|
||||||
import com.cool.store.request.LineRequest;
|
import com.cool.store.request.LineRequest;
|
||||||
import com.cool.store.vo.BlackListVO;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
|
|
||||||
import com.cool.store.vo.PartnerLineInfoVO;
|
|
||||||
import com.cool.store.vo.StageCountVO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -99,5 +96,13 @@ public interface HyPartnerLineInfoService {
|
|||||||
*/
|
*/
|
||||||
Boolean closeOrPassFollow(String userId,CloseFollowRequest closeFollowRequest);
|
Boolean closeOrPassFollow(String userId,CloseFollowRequest closeFollowRequest);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公海线索
|
||||||
|
* @param userId
|
||||||
|
* @param lineRequest
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId,LineRequest lineRequest);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,12 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.cool.store.dao.EnterpriseUserDAO;
|
||||||
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
import com.cool.store.dao.HyPartnerLineInfoDAO;
|
||||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||||
import com.cool.store.dto.partner.PartnerBlackListDTO;
|
import com.cool.store.dao.UserRegionMappingDAO;
|
||||||
import com.cool.store.dto.partner.PartnerLineInfoAndBaseInfoDTO;
|
import com.cool.store.dto.partner.*;
|
||||||
import com.cool.store.dto.partner.StageCountDTO;
|
import com.cool.store.entity.EnterpriseUserDO;
|
||||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||||
import com.cool.store.entity.HyPartnerUserInfoDO;
|
import com.cool.store.entity.HyPartnerUserInfoDO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
@@ -16,24 +17,20 @@ import com.cool.store.enums.WorkflowStatusEnum;
|
|||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.CloseFollowRequest;
|
import com.cool.store.request.CloseFollowRequest;
|
||||||
import com.cool.store.request.LineRequest;
|
import com.cool.store.request.LineRequest;
|
||||||
|
import com.cool.store.service.EnterpriseUserService;
|
||||||
import com.cool.store.service.HyPartnerLineInfoService;
|
import com.cool.store.service.HyPartnerLineInfoService;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.cool.store.vo.BlackListVO;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.PartnerLineInfoAndBaseInfoVO;
|
|
||||||
import com.cool.store.vo.PartnerLineInfoVO;
|
|
||||||
import com.cool.store.vo.StageCountVO;
|
|
||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -48,6 +45,10 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||||
|
@Resource
|
||||||
|
EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
@Resource
|
||||||
|
UserRegionMappingDAO userRegionMappingDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StageCountVO selectStagePendingCount(String userId) {
|
public StageCountVO selectStagePendingCount(String userId) {
|
||||||
@@ -138,7 +139,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
@Override
|
@Override
|
||||||
public PageInfo<BlackListVO> getBlackList(LineRequest LineRequest) {
|
public PageInfo<BlackListVO> getBlackList(LineRequest LineRequest) {
|
||||||
PageHelper.startPage(LineRequest.getPageNum(),LineRequest.getPageSize());
|
PageHelper.startPage(LineRequest.getPageNum(),LineRequest.getPageSize());
|
||||||
PageInfo blackListDTOPageInfo = hyPartnerLineInfoDAO.getBlackList(LineRequest.getKeyWord(), LineRequest.getIntentArea(), LineRequest.getAcceptAdjustType());
|
PageInfo blackListDTOPageInfo = hyPartnerLineInfoDAO.getBlackList(LineRequest.getUserNameKeyword(), LineRequest.getPhoneKeyword(),LineRequest.getIntentArea(), LineRequest.getAcceptAdjustType());
|
||||||
List<PartnerBlackListDTO> list = blackListDTOPageInfo.getList();
|
List<PartnerBlackListDTO> list = blackListDTOPageInfo.getList();
|
||||||
List<BlackListVO> result = new ArrayList<>();
|
List<BlackListVO> result = new ArrayList<>();
|
||||||
list.stream().forEach(x->{
|
list.stream().forEach(x->{
|
||||||
@@ -228,6 +229,68 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(hyPartnerLineInfoDO);
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageInfo<PublicSeaLineListVo> publicSeaLineList(String userId, LineRequest lineRequest) {
|
||||||
|
//确认是招商经理还是部门负责人
|
||||||
|
EnterpriseUserDO userInfo = enterpriseUserDAO.getUserInfoById(userId);
|
||||||
|
List<String> userIds = new ArrayList<>();
|
||||||
|
if (userInfo.getIsLeader()){
|
||||||
|
if (StringUtil.isNotEmpty(userInfo.getLeaderDeptIds())){
|
||||||
|
List<String> regionIds = JSONObject.parseArray(userInfo.getLeaderDeptIds(), String.class);
|
||||||
|
List<EnterpriseUserDO> enterpriseUserDOS = enterpriseUserDAO.searchUserByRegionIdsAndKeyword(regionIds, null, true);
|
||||||
|
userIds =enterpriseUserDOS.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
userIds = Arrays.asList(userId);
|
||||||
|
}
|
||||||
|
PageHelper.startPage(lineRequest.getPageNum(),lineRequest.getPageSize());
|
||||||
|
PageInfo publicSeaLineList = hyPartnerLineInfoDAO.getPublicSeaLineList(lineRequest.getUserNameKeyword(), lineRequest.getPhoneKeyword(),
|
||||||
|
lineRequest.getIntentArea(), lineRequest.getAcceptAdjustType(), lineRequest.getUpdateStartTime(), lineRequest.getUpdateEndTime(), userIds);
|
||||||
|
|
||||||
|
List<PublicSeaLineDTO> list = publicSeaLineList.getList();
|
||||||
|
if (CollectionUtils.isEmpty(list)){
|
||||||
|
return new PageInfo<>();
|
||||||
|
}
|
||||||
|
//上一次结束的线索
|
||||||
|
List<String> partnerIdList = list.stream().map(PublicSeaLineDTO::getPartnerId).collect(Collectors.toList());
|
||||||
|
List<HyPartnerLineInfoDO> partnerLastLine = hyPartnerLineInfoDAO.getPartnerLastLine(partnerIdList);
|
||||||
|
List<String> investmentManagerIds = partnerLastLine.stream().map(HyPartnerLineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
|
List<EnterpriseUserDO> userInfoList = enterpriseUserDAO.getUserInfoByUserIds(investmentManagerIds);
|
||||||
|
Map<String, String> mobileMap = userInfoList.stream().filter(x ->
|
||||||
|
StringUtil.isNotEmpty(x.getMobile())).collect(Collectors.toMap(EnterpriseUserDO::getUserId, EnterpriseUserDO::getMobile));
|
||||||
|
Map<String, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = partnerLastLine.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getPartnerId, data -> data));
|
||||||
|
|
||||||
|
List<LineCountDTO> followCountList = hyPartnerLineInfoDAO.getFollowCountList(partnerIdList);
|
||||||
|
Map<String, Integer> countMap = followCountList.stream().collect(Collectors.toMap(LineCountDTO::getPartnerId, LineCountDTO::getFollowCount));
|
||||||
|
|
||||||
|
List<PublicSeaLineListVo> result = new ArrayList<>();
|
||||||
|
list.forEach(x->{
|
||||||
|
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
|
||||||
|
|
||||||
|
publicSeaLineListVo.setPartnerId(x.getPartnerId());
|
||||||
|
publicSeaLineListVo.setCreateTime(x.getCreateTime());
|
||||||
|
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
||||||
|
publicSeaLineListVo.setPartnerUserPhone(x.getMobile());
|
||||||
|
// TODO: 2023/6/15 手机号归属地
|
||||||
|
publicSeaLineListVo.setPhoneAddress("");
|
||||||
|
publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||||
|
publicSeaLineListVo.setId(x.getLineId());
|
||||||
|
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||||
|
publicSeaLineListVo.setFollowCount(countMap.getOrDefault(x.getPartnerId(),0));
|
||||||
|
|
||||||
|
HyPartnerLineInfoDO hy = hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerId(), new HyPartnerLineInfoDO());
|
||||||
|
publicSeaLineListVo.setRejectPublicReason(hy.getRejectPublicReason());
|
||||||
|
publicSeaLineListVo.setRejectRealReason(hy.getRejectRealReason());
|
||||||
|
publicSeaLineListVo.setLastCloseDate(hy.getCloseTime());
|
||||||
|
publicSeaLineListVo.setLastInvestmentManager(hy.getInvestmentManager());
|
||||||
|
publicSeaLineListVo.setPartnerUserPhone(mobileMap.get(hy.getInvestmentManager()));
|
||||||
|
result.add(publicSeaLineListVo);
|
||||||
|
});
|
||||||
|
publicSeaLineList.setList(result);
|
||||||
|
return publicSeaLineList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* convertPartnerBlackListDTOToVo
|
* convertPartnerBlackListDTOToVo
|
||||||
* @param partnerBlackListDTO
|
* @param partnerBlackListDTO
|
||||||
|
|||||||
@@ -82,8 +82,7 @@ public class DeskController {
|
|||||||
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
|
@ApiImplicitParam(name = "type", value = "类型 待处理-Pending 待跟进-follow", required = false),
|
||||||
})
|
})
|
||||||
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){
|
public ResponseResult<StageCountVO> queryStageCount(@RequestParam(value = "type",required = false)String type){
|
||||||
String userId = "";
|
return ResponseResult.success(deskService.getStageCountByType(CurrentUserHolder.getUserId(),type));
|
||||||
return ResponseResult.success(deskService.getStageCountByType(userId,type));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(path = "/queryInterviewPlan")
|
@GetMapping(path = "/queryInterviewPlan")
|
||||||
@@ -204,7 +203,6 @@ public class DeskController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(path = "/queryPublicSeqLineList")
|
@PostMapping(path = "/queryPublicSeqLineList")
|
||||||
@ApiOperation("公海列表")
|
@ApiOperation("公海列表")
|
||||||
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){
|
public ResponseResult<PageInfo<PublicSeaLineListVo>> queryPublicSeaLineList(@RequestBody LineRequest LineRequest){
|
||||||
@@ -213,8 +211,6 @@ public class DeskController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(path = "/queryPrivateSeaLineList")
|
@PostMapping(path = "/queryPrivateSeaLineList")
|
||||||
@ApiOperation("私海列表")
|
@ApiOperation("私海列表")
|
||||||
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
|
public ResponseResult<PageInfo<PrivateSeaLineListVo>> queryPrivateSeqLineList(@RequestBody PrivateSeaLineListRequest privateSeaLineListRequest){
|
||||||
@@ -222,8 +218,6 @@ public class DeskController {
|
|||||||
return ResponseResult.success();
|
return ResponseResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping(path = "/queryBlackList")
|
@PostMapping(path = "/queryBlackList")
|
||||||
@ApiOperation("黑名单列表")
|
@ApiOperation("黑名单列表")
|
||||||
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest LineRequest){
|
public ResponseResult<PageInfo<BlackListVO>> queryBlackList(@RequestBody LineRequest LineRequest){
|
||||||
@@ -250,9 +244,7 @@ public class DeskController {
|
|||||||
@PostMapping(path = "/closeOrPassFollow")
|
@PostMapping(path = "/closeOrPassFollow")
|
||||||
@ApiOperation("意向申请审核 结束跟进/通过流程")
|
@ApiOperation("意向申请审核 结束跟进/通过流程")
|
||||||
public ResponseResult<Boolean> closeOrPassFollow(@RequestBody CloseFollowRequest closeFollowRequest){
|
public ResponseResult<Boolean> closeOrPassFollow(@RequestBody CloseFollowRequest closeFollowRequest){
|
||||||
|
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(CurrentUserHolder.getUserId(),closeFollowRequest));
|
||||||
String userId = "";
|
|
||||||
return ResponseResult.success(hyPartnerLineInfoService.closeOrPassFollow(userId,closeFollowRequest));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping(path = "/changeIntentInfo")
|
@PostMapping(path = "/changeIntentInfo")
|
||||||
|
|||||||
Reference in New Issue
Block a user