1.3期 列表+全量私海
This commit is contained in:
@@ -10,6 +10,8 @@ import com.cool.store.vo.PartnerIntentInfoVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/9 14:54
|
||||
@@ -26,7 +28,8 @@ public interface HyPartnerIntentInfoService {
|
||||
* @param pageNumber
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber);
|
||||
PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber,String keyword, Integer callStatus,
|
||||
List<String> userPortraitIdList, Long lastFollowStartTime, Long lastFollowEndTime, String userChannelIdList);
|
||||
|
||||
/**
|
||||
* 根据线索查询加盟商意向申请信息
|
||||
|
||||
@@ -3,10 +3,7 @@ package com.cool.store.service;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.entity.HyPartnerLineInfoDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.request.CloseFollowRequest;
|
||||
import com.cool.store.request.LineRequest;
|
||||
import com.cool.store.request.PrivateSeaLineListRequest;
|
||||
import com.cool.store.request.TransferInvestmentManagerRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@@ -60,6 +57,8 @@ public interface HyPartnerLineInfoService {
|
||||
*/
|
||||
Boolean transferInvestmentManager(LoginUserInfo user, TransferInvestmentManagerRequest request) throws ApiException;
|
||||
|
||||
Boolean batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException;
|
||||
|
||||
/**
|
||||
* 分配招商经理
|
||||
* @param userId
|
||||
@@ -117,7 +116,7 @@ public interface HyPartnerLineInfoService {
|
||||
* @param privateSeaLineListRequest
|
||||
* @return
|
||||
*/
|
||||
PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest privateSeaLineListRequest) ;
|
||||
PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest privateSeaLineListRequest,Boolean allPrivateSeaFlag) ;
|
||||
|
||||
PartnerLineBaseInfoVO getPartnerLinBaseInfo(String partnerId);
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.partner.UserChannelDTO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/8/10 11:12
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface HyPartnerUserChannelService {
|
||||
|
||||
/**
|
||||
* 查询所有的线索来源
|
||||
* @return
|
||||
*/
|
||||
List<UserChannelDTO> queryAllUserChannelList();
|
||||
|
||||
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:23
|
||||
@@ -28,6 +29,21 @@ public interface LabelService {
|
||||
*/
|
||||
void addLabel(LabelAddDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 标签MAP
|
||||
* @param userPortraitStrList
|
||||
* @return
|
||||
*/
|
||||
Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList);
|
||||
|
||||
/**
|
||||
* 查询标签中文名称集合
|
||||
* @param userPortraitMap
|
||||
* @param userPortraitStr
|
||||
* @return
|
||||
*/
|
||||
List<String> getUserPortraitList(Map<Long,String> userPortraitMap,String userPortraitStr);
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
* @param dto 新标签信息
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.service.impl;
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
@@ -36,6 +37,7 @@ import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
@@ -91,7 +93,8 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
throw new ServiceException(ErrorCodeEnum.PARTNER_BASE_INFO_NOT_EXIST);
|
||||
}
|
||||
hyPartnerBaseInfo.setId(addTagsRequest.getPartnerBaseInfoId());
|
||||
hyPartnerBaseInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())? JSONObject.toJSONString(addTagsRequest.getTags()):"");
|
||||
hyPartnerBaseInfo.setUserPortrait(CollectionUtils.isNotEmpty(addTagsRequest.getTags())?
|
||||
addTagsRequest.getTags().stream().map(Object::toString).collect(Collectors.joining(CommonConstants.COMMA, CommonConstants.COMMA, CommonConstants.COMMA)):"");
|
||||
hyPartnerBaseInfoDAO.updateByPrimaryKeySelective(hyPartnerBaseInfo);
|
||||
HyPartnerLineInfoDO line = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerBaseInfo.getPartnerId());
|
||||
//添加日志
|
||||
|
||||
@@ -15,14 +15,13 @@ import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
import com.cool.store.request.BaseUserInfoRequest;
|
||||
import com.cool.store.request.IndustryCognitionInfoRequest;
|
||||
import com.cool.store.request.PartnerIntentInfoRequest;
|
||||
import com.cool.store.request.PartnerWantShopInfoRequest;
|
||||
import com.cool.store.service.HyPartnerIntentInfoService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.HyPhoneLocationService;
|
||||
import com.cool.store.service.LogService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
@@ -73,12 +72,16 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||
@Autowired
|
||||
private LogService logService;
|
||||
|
||||
@Resource
|
||||
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
||||
@Resource
|
||||
LabelService labelService;
|
||||
@Autowired
|
||||
private NoticeService noticeService;
|
||||
|
||||
@Override
|
||||
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber) {
|
||||
public PageInfo<PartnerIntentApplyInfoVO> getPartnerIntentApplyList(String userId, String type, Integer pageSize, Integer pageNumber,String keyword, Integer callStatus,
|
||||
List<String> userPortraitIdList, Long lastFollowStartTime, Long lastFollowEndTime, String userChannelIdList) {
|
||||
PartnerIntentApplyInfoVO partnerIntentApplyInfoVO = new PartnerIntentApplyInfoVO();
|
||||
String workflowStatus = "";
|
||||
if (CommonConstants.PENDING.equals(type)) {
|
||||
@@ -87,22 +90,35 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
|
||||
if (CommonConstants.FOLLOW.equals(type)) {
|
||||
workflowStatus = WorkflowStatusEnum.INTENT_0.getCode();
|
||||
}
|
||||
String lastFollowStartTimeStr = null;
|
||||
String lastFollowEndTimeStr = null;
|
||||
if (lastFollowStartTime!=null||lastFollowEndTime!=null){
|
||||
lastFollowStartTimeStr = DateUtil.format(new Date(lastFollowStartTime), CoolDateUtils.DATE_FORMAT_SEC);
|
||||
lastFollowEndTimeStr = DateUtil.format(new Date(lastFollowEndTime), CoolDateUtils.DATE_FORMAT_SEC);
|
||||
}
|
||||
PageHelper.startPage(pageNumber,pageSize);
|
||||
PageInfo partnerIntentApplyInfo = new PageInfo(hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus));
|
||||
PageInfo partnerIntentApplyInfo = new PageInfo(hyPartnerIntentInfoDAO.selectPartnerIntentApplyInfoList(userId, WorkflowStageEnum.INTENT.getCode(), workflowStatus,keyword
|
||||
,callStatus,userPortraitIdList,lastFollowStartTimeStr,lastFollowEndTimeStr,userChannelIdList));
|
||||
if (partnerIntentApplyInfo==null){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<PartnerIntentApplyInfoDTO> list = partnerIntentApplyInfo.getList();
|
||||
List<String> partnerIds = list.stream().map(PartnerIntentApplyInfoDTO::getPartnerId).collect(Collectors.toList());
|
||||
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
|
||||
Map<String, HyPartnerUserInfoDO> infoDOMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, data -> data));
|
||||
List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PartnerIntentApplyInfoDTO::getUserChannelId).collect(Collectors.toList());
|
||||
List<HyPartnerUserChannelDO> userChannelList = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(userChannelIds)){
|
||||
userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
||||
}
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerIntentApplyInfoDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userChannelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
|
||||
List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PartnerIntentApplyInfoDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
|
||||
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
|
||||
List<PartnerIntentApplyInfoVO> resultList = PartnerIntentApplyInfoVO.convertList(list, infoDOMap, wantShopAreaNameMap, workflowStatus);
|
||||
List<PartnerIntentApplyInfoVO> resultList = PartnerIntentApplyInfoVO.convertList(list, wantShopAreaNameMap, workflowStatus,userChannelMap,labelService.getUserPortraitMap(userPortraitList));
|
||||
partnerIntentApplyInfo.setList(resultList);
|
||||
return partnerIntentApplyInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean updatePartnerIntentInfo(LoginUserInfo userInfo, BaseUserInfoRequest baseUserInfoRequest) {
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.message.RemindInterviewMsgDTO;
|
||||
import com.cool.store.dto.message.SendCardMessageDTO;
|
||||
import com.cool.store.dto.partner.PartnerIntentApplyInfoDTO;
|
||||
import com.cool.store.dto.partner.PartnerInterviewInfoDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.MessageTypeEnum;
|
||||
@@ -16,11 +17,13 @@ import com.cool.store.http.ISVHttpRequest;
|
||||
import com.cool.store.mapper.HyPartnerInterviewMapper;
|
||||
import com.cool.store.mapper.HyPartnerInterviewPlanMapper;
|
||||
import com.cool.store.mapper.HyPartnerLineInfoMapper;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
import com.cool.store.request.CloseFollowRequest;
|
||||
import com.cool.store.request.GetInterviewListReq;
|
||||
import com.cool.store.service.HyPartnerInterviewPlanService;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.InterviewService;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.vo.InterviewDetailInfoVO;
|
||||
import com.cool.store.vo.PartnerInterviewInfoVO;
|
||||
@@ -78,6 +81,10 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
|
||||
@Autowired
|
||||
private InterviewService interviewService;
|
||||
@Resource
|
||||
LabelService labelService;
|
||||
@Resource
|
||||
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
||||
|
||||
|
||||
@Value("${feishu.notice.link.url:null}")
|
||||
@@ -129,6 +136,9 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
List<PartnerInterviewInfoVO> result = new ArrayList<>();
|
||||
List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList());
|
||||
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
|
||||
List<Integer> userChannelIds = hyPartnerUserInfoDOS.stream().filter(x -> x.getUserChannelId() != null).map(HyPartnerUserInfoDO::getUserChannelId).collect(Collectors.toList());
|
||||
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
||||
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
|
||||
List<String> interviewerUserIds = list.stream().filter(x-> StringUtils.isNotEmpty(x.getInterviewer())).map(PartnerInterviewInfoDTO::getInterviewer).collect(Collectors.toList());
|
||||
List<EnterpriseUserDO> userInfoByUserIds = enterpriseUserDAO.getUserInfoByUserIds(interviewerUserIds);
|
||||
Map<String, EnterpriseUserDO> interviewerUserMap = userInfoByUserIds.stream().collect(Collectors.toMap(EnterpriseUserDO::getUserId, data -> data));
|
||||
@@ -136,8 +146,10 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList());
|
||||
List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds);
|
||||
Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data));
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerInterviewInfoDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||
list.stream().forEach(x->{
|
||||
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x);
|
||||
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x,userPortraitMap,userNameMap.get(x.getPartnerId()),channelMap);
|
||||
partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername());
|
||||
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile());
|
||||
partnerInterviewInfoVO.setInterviewerName(interviewerUserMap.getOrDefault(x.getInterviewer(),new EnterpriseUserDO()).getName());
|
||||
@@ -170,12 +182,17 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
List<String> partnerIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerId).collect(Collectors.toList());
|
||||
List<HyPartnerUserInfoDO> hyPartnerUserInfoDOS = hyPartnerUserInfoDAO.selectByPartnerIds(partnerIds);
|
||||
Map<String, HyPartnerUserInfoDO> userNameMap = hyPartnerUserInfoDOS.stream().collect(Collectors.toMap(HyPartnerUserInfoDO::getPartnerId, Data->Data));
|
||||
List<Integer> userChannelIds = hyPartnerUserInfoDOS.stream().filter(x -> x.getUserChannelId() != null).map(HyPartnerUserInfoDO::getUserChannelId).collect(Collectors.toList());
|
||||
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
||||
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
|
||||
List<Long> lineIds = list.stream().map(PartnerInterviewInfoDTO::getPartnerLineId).collect(Collectors.toList());
|
||||
List<HyPartnerLineInfoDO> hyPartnerLineInfoDOS= hyPartnerLineInfoDAO.getHyPartnerLineInfoListByIds(lineIds);
|
||||
Map<Long, HyPartnerLineInfoDO> hyPartnerLineInfoDOMap = hyPartnerLineInfoDOS.stream().collect(Collectors.toMap(HyPartnerLineInfoDO::getId, data -> data));
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PartnerInterviewInfoDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||
List<PartnerInterviewInfoVO> result = new ArrayList<>();
|
||||
list.stream().forEach(x->{
|
||||
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x);
|
||||
PartnerInterviewInfoVO partnerInterviewInfoVO = convertPartnerInterviewInfoDTOToVo(x,userPortraitMap,userNameMap.get(x.getPartnerId()),channelMap);
|
||||
partnerInterviewInfoVO.setPartnerName(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getUsername());
|
||||
partnerInterviewInfoVO.setPartnerPhone(userNameMap.getOrDefault(x.getPartnerId(),new HyPartnerUserInfoDO()).getMobile());
|
||||
partnerInterviewInfoVO.setLineStatus(hyPartnerLineInfoDOMap.getOrDefault(x.getPartnerLineId(),new HyPartnerLineInfoDO()).getLineStatus());
|
||||
@@ -310,7 +327,7 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
* @param partnerInterviewInfoDTO
|
||||
* @return
|
||||
*/
|
||||
private PartnerInterviewInfoVO convertPartnerInterviewInfoDTOToVo(PartnerInterviewInfoDTO partnerInterviewInfoDTO){
|
||||
private PartnerInterviewInfoVO convertPartnerInterviewInfoDTOToVo(PartnerInterviewInfoDTO partnerInterviewInfoDTO,Map<Long, String> userPortraitMap, HyPartnerUserInfoDO hyPartnerUserInfoDO,Map<Long, String> channelMap){
|
||||
PartnerInterviewInfoVO partnerInterviewInfoVO = new PartnerInterviewInfoVO();
|
||||
partnerInterviewInfoVO.setInterviewId(partnerInterviewInfoDTO.getInterviewId());
|
||||
partnerInterviewInfoVO.setInterviewPlanId(partnerInterviewInfoDTO.getId());
|
||||
@@ -325,6 +342,17 @@ public class HyPartnerInterviewPlanServiceImpl implements HyPartnerInterviewPlan
|
||||
partnerInterviewInfoVO.setAuthCode(partnerInterviewInfoDTO.getIntentionContractNo());
|
||||
partnerInterviewInfoVO.setEndTime(DateUtil.format(partnerInterviewInfoDTO.getEndTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
|
||||
partnerInterviewInfoVO.setApproveTime(DateUtil.format(partnerInterviewInfoDTO.getApproveTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
|
||||
partnerInterviewInfoVO.setLastFollowTime(DateUtil.format(partnerInterviewInfoDTO.getLastFollowTime(),CoolDateUtils.DATE_FORMAT_SEC_2));
|
||||
Integer callStatus = null;
|
||||
if(partnerInterviewInfoDTO.getCallStatus()!=null){
|
||||
callStatus = partnerInterviewInfoDTO.getCallStatus()==1?partnerInterviewInfoDTO.getCallStatus():0;
|
||||
}
|
||||
partnerInterviewInfoVO.setCallStatus(callStatus);
|
||||
if (hyPartnerUserInfoDO!=null){
|
||||
partnerInterviewInfoVO.setUserChannelName(channelMap.get(hyPartnerUserInfoDO.getUserChannelId()));
|
||||
}
|
||||
List<String> userPortrait = labelService.getUserPortraitList(userPortraitMap, partnerInterviewInfoDTO.getUserPortrait());
|
||||
partnerInterviewInfoVO.setUserPortraitList(userPortrait);
|
||||
return partnerInterviewInfoVO;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
@@ -24,6 +25,7 @@ import com.cool.store.vo.*;
|
||||
import com.cool.store.vo.interview.InterviewVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@@ -77,9 +79,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||
@Resource
|
||||
HyPhoneLocationService hyPhoneLocationService;
|
||||
@Resource
|
||||
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
||||
|
||||
@Autowired
|
||||
private NoticeService noticeService;
|
||||
@Resource
|
||||
LabelService labelService;
|
||||
|
||||
@Autowired
|
||||
private SmsService smsService;
|
||||
@@ -103,6 +109,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
PartnerLineInfoAndBaseInfoVO partnerLineInfoAndBaseInfoVO = convertPartnerLineInfoAndBaseInfoDTOToVo(partnerLineInfoAndBaseInfoDTO);
|
||||
|
||||
String userPortrait = partnerLineInfoAndBaseInfoDTO.getUserPortrait();
|
||||
if (StringUtils.isNotEmpty(userPortrait)){
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(Arrays.asList(userPortrait));
|
||||
List<String> userPortraitList = userPortraitMap.values().stream()
|
||||
.collect(Collectors.toList());
|
||||
partnerLineInfoAndBaseInfoVO.setUserPortrait(userPortraitList);
|
||||
}
|
||||
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getPassUserId())){
|
||||
userIds.add(partnerLineInfoAndBaseInfoDTO.getPassUserId());
|
||||
@@ -186,6 +201,24 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchTransferInvestmentManager(LoginUserInfo user, BatchTransferInvestmentManagerRequest request) throws ApiException {
|
||||
if (CollectionUtils.isEmpty(request.getLineIds())||StringUtils.isEmpty(request.getUserId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
for (Long lineId:request.getLineIds()) {
|
||||
TransferInvestmentManagerRequest transferInvestmentManagerRequest = new TransferInvestmentManagerRequest();
|
||||
transferInvestmentManagerRequest.setUserId(request.getUserId());
|
||||
transferInvestmentManagerRequest.setLineId(lineId);
|
||||
try {
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest);
|
||||
} catch (ApiException e) {
|
||||
log.info("transferInvestmentManager_success Transfer_interview_management_failed,lineId:{}",lineId);
|
||||
}
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean allocationInvestmentManager(LoginUserInfo user, List<Long> lineIdList) {
|
||||
if (user==null|| CollectionUtils.isEmpty(lineIdList)){
|
||||
@@ -472,6 +505,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
|
||||
List<Long> wantShopAreaList = list.stream().map(PublicSeaLineDTO::getWantShopArea).filter(Objects::nonNull).map(Long::parseLong).distinct().collect(Collectors.toList());
|
||||
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
|
||||
|
||||
List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PublicSeaLineDTO::getUserChannelId).collect(Collectors.toList());
|
||||
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
||||
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
|
||||
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PublicSeaLineDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||
List<PublicSeaLineListVo> result = new ArrayList<>();
|
||||
list.forEach(x->{
|
||||
PublicSeaLineListVo publicSeaLineListVo = new PublicSeaLineListVo();
|
||||
@@ -496,6 +536,9 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
String closeTime = DateUtil.format(hy.getCloseTime(), CoolDateUtils.DATE_FORMAT_SEC_2);
|
||||
publicSeaLineListVo.setLastCloseDate(closeTime);
|
||||
publicSeaLineListVo.setLastInvestmentManager(nameMobileMap.get(hy.getInvestmentManager()));
|
||||
List<String> userPortrait = labelService.getUserPortraitList(userPortraitMap, x.getUserPortrait());
|
||||
publicSeaLineListVo.setUserPortraitList(userPortrait);
|
||||
publicSeaLineListVo.setUserChannelName(channelMap.get(x.getUserChannelId()));
|
||||
result.add(publicSeaLineListVo);
|
||||
});
|
||||
publicSeaLineList.setList(result);
|
||||
@@ -506,8 +549,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest request) {
|
||||
UserPositionAndUserScopeDTO userIdsByScope = enterpriseUserService.getUserIdsByScope(userId);
|
||||
public PageInfo<PrivateSeaLineListVo> privateSeaLineList(String userId, PrivateSeaLineListRequest request,Boolean allPrivateSeaFlag) {
|
||||
//allPrivateSeaFlag 为true的时候 查询全量私海
|
||||
UserPositionAndUserScopeDTO userIdsByScope = new UserPositionAndUserScopeDTO();
|
||||
if (!allPrivateSeaFlag){
|
||||
userIdsByScope = enterpriseUserService.getUserIdsByScope(userId);
|
||||
}
|
||||
String intentAreaName = getIntentAreaName(request.getIntentArea());
|
||||
PageHelper.startPage(request.getPageNum(),request.getPageSize());
|
||||
PageInfo privateLineList = new PageInfo(hyPartnerLineInfoDAO.getPrivateSeaLineList(request.getKeyword(), request.getKeywordType(), request.getWorkflowStage(),
|
||||
@@ -530,7 +577,15 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
List<Long> wantShopAreaList = list.stream().filter(x->StringUtils.isNotEmpty(x.getWantShopArea())).map(PrivateSeaLineDTO::getWantShopArea).map(Long::parseLong).distinct().collect(Collectors.toList());
|
||||
Map<String, String> wantShopAreaNameMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaList);
|
||||
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap,hyPartnerInterviewPlanDOMap);
|
||||
|
||||
List<Integer> userChannelIds = list.stream().filter(x -> x.getUserChannelId() != null).map(PrivateSeaLineDTO::getUserChannelId).collect(Collectors.toList());
|
||||
List<HyPartnerUserChannelDO> userChannelList = hyPartnerUserChannelMapper.getUserChannelByIds(userChannelIds);
|
||||
Map<Long, String> channelMap = userChannelList.stream().collect(Collectors.toMap(HyPartnerUserChannelDO::getChannelId, HyPartnerUserChannelDO::getChannelName));
|
||||
|
||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait() )).map(PrivateSeaLineDTO::getUserPortrait).collect(Collectors.toList());
|
||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||
|
||||
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap,hyPartnerInterviewPlanDOMap,channelMap,userPortraitMap);
|
||||
privateLineList.setList(result);
|
||||
return privateLineList;
|
||||
}
|
||||
@@ -806,9 +861,6 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
partnerLineInfoAndBaseInfoVO.setId(partnerLineInfoAndBaseInfoDTO.getId());
|
||||
partnerLineInfoAndBaseInfoVO.setPartnerUserId(partnerLineInfoAndBaseInfoDTO.getPartnerId());
|
||||
partnerLineInfoAndBaseInfoVO.setInvestmentManager(partnerLineInfoAndBaseInfoDTO.getInvestmentManager());
|
||||
if (StringUtils.isNotEmpty(partnerLineInfoAndBaseInfoDTO.getUserPortrait())){
|
||||
partnerLineInfoAndBaseInfoVO.setUserPortrait(JSONObject.parseArray(partnerLineInfoAndBaseInfoDTO.getUserPortrait(),String.class));
|
||||
}
|
||||
partnerLineInfoAndBaseInfoVO.setPartnerBaseInfoId(partnerLineInfoAndBaseInfoDTO.getPartnerBaseInfoId());
|
||||
partnerLineInfoAndBaseInfoVO.setWorkflowStage(partnerLineInfoAndBaseInfoDTO.getWorkflowStage());
|
||||
partnerLineInfoAndBaseInfoVO.setWorkflowStatus(partnerLineInfoAndBaseInfoDTO.getWorkflowStatus());
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dto.partner.UserChannelDTO;
|
||||
import com.cool.store.entity.HyPartnerUserChannelDO;
|
||||
import com.cool.store.mapper.HyPartnerUserChannelMapper;
|
||||
import com.cool.store.service.HyPartnerUserChannelService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/8/10 11:14
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class HyPartnerUserChannelServiceImpl implements HyPartnerUserChannelService {
|
||||
|
||||
@Resource
|
||||
HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
||||
|
||||
@Override
|
||||
public List<UserChannelDTO> queryAllUserChannelList() {
|
||||
List<HyPartnerUserChannelDO> allUserChannel = hyPartnerUserChannelMapper.getAllUserChannel();
|
||||
List<UserChannelDTO> result = new ArrayList<>();
|
||||
allUserChannel.forEach(x->{
|
||||
UserChannelDTO userChannelDTO = new UserChannelDTO();
|
||||
userChannelDTO.setUserChannelId(x.getChannelId());
|
||||
userChannelDTO.setUserChannelName(x.getChannelName());
|
||||
result.add(userChannelDTO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -11,17 +11,22 @@ import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:24
|
||||
* @version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LabelServiceImpl implements LabelService {
|
||||
|
||||
@Autowired
|
||||
@@ -100,4 +105,47 @@ public class LabelServiceImpl implements LabelService {
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList){
|
||||
Set<Long> userPortraitIdList = new HashSet<>();
|
||||
for (String userPortrait:userPortraitStrList) {
|
||||
String[] parts = userPortrait.split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
Long value = Long.parseLong(trimmedPart);
|
||||
userPortraitIdList.add(value);
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<HyPartnerLabelDO> labelListByIds = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(userPortraitIdList)){
|
||||
labelListByIds = labelMapper.getLabelListByIds(new ArrayList<>(userPortraitIdList));
|
||||
}
|
||||
return labelListByIds.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId,HyPartnerLabelDO::getLabelName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getUserPortraitList(Map<Long, String> userPortraitMap, String userPortraitStr) {
|
||||
List<String> userPortraitList= new ArrayList<>();
|
||||
if(StringUtils.isNotEmpty(userPortraitStr)){
|
||||
String[] parts = userPortraitStr.split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return userPortraitList;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user