私海列表返回会销面试中的线索
This commit is contained in:
@@ -3,7 +3,6 @@ package com.cool.store.dao;
|
|||||||
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
|
import com.cool.store.dto.exhibition.ExhibitionLineBaseDTO;
|
||||||
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
|
import com.cool.store.dto.exhibition.ExhibitionLineDTO;
|
||||||
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
|
import com.cool.store.dto.exhibition.PartnerSignUpDTO;
|
||||||
import com.cool.store.entity.HyExhibitionDO;
|
|
||||||
import com.cool.store.entity.HyPartnerExhibitionDO;
|
import com.cool.store.entity.HyPartnerExhibitionDO;
|
||||||
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
|
import com.cool.store.entity.HyPartnerExhibitionInterviewDO;
|
||||||
import com.cool.store.mapper.HyPartnerExhibitionMapper;
|
import com.cool.store.mapper.HyPartnerExhibitionMapper;
|
||||||
@@ -111,7 +110,7 @@ public class HyPartnerExhibitionDAO {
|
|||||||
return hyPartnerExhibitionMapper.queryListByInterviewPlanIds(interviewPlanIds);
|
return hyPartnerExhibitionMapper.queryListByInterviewPlanIds(interviewPlanIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Long> queryListByLineIds(List<Long> lindIds) {
|
public List<HyPartnerExhibitionDO> queryListByLineIds(List<Long> lindIds) {
|
||||||
if (ObjectUtils.isEmpty(lindIds)) {
|
if (ObjectUtils.isEmpty(lindIds)) {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ public interface HyPartnerExhibitionMapper {
|
|||||||
* @param lindIds
|
* @param lindIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Long> queryListByLineIds(@Param("lineIds") List<Long> lindIds);
|
List<HyPartnerExhibitionDO> queryListByLineIds(@Param("lineIds") List<Long> lindIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询线索参加的会销面试相关信息
|
* 查询线索参加的会销面试相关信息
|
||||||
|
|||||||
@@ -377,10 +377,10 @@
|
|||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryListByLineIds" resultType="java.lang.Long">
|
<select id="queryListByLineIds" resultMap="BaseResultMap">
|
||||||
SELECT partner_line_id
|
SELECT partner_line_id, exhibition_id, t3.name AS exhibitionCreatorName, t3.mobile AS exhibitionCreatorMobile
|
||||||
FROM (
|
FROM (
|
||||||
SELECT partner_line_id, exhibition_id
|
SELECT partner_line_id, exhibition_id, creator
|
||||||
FROM hy_partner_exhibition
|
FROM hy_partner_exhibition
|
||||||
WHERE partner_line_id IN (
|
WHERE partner_line_id IN (
|
||||||
<foreach collection="lineIds" item="lineId" separator=",">
|
<foreach collection="lineIds" item="lineId" separator=",">
|
||||||
@@ -388,14 +388,16 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
AND deleted = 0
|
AND deleted = 0
|
||||||
|
-- 面试中状态
|
||||||
AND participation_status = 4
|
AND participation_status = 4
|
||||||
) t1
|
) t1
|
||||||
LEFT JOIN (
|
INNER JOIN (
|
||||||
SELECT id, closed_type
|
SELECT id, closed_type
|
||||||
FROM hy_exhibition
|
FROM hy_exhibition
|
||||||
WHERE deleted = 0
|
WHERE deleted = 0
|
||||||
AND closed_type = 0
|
AND closed_type = 0
|
||||||
) t2 ON t1.exhibition_id = t2.id
|
) t2 ON t1.exhibition_id = t2.id
|
||||||
|
INNER JOIN enterprise_user t3 ON t1.creator = t3.user_id
|
||||||
WHERE closed_type = 0
|
WHERE closed_type = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="queryPartnerExhibitionInterviewInfo"
|
<select id="queryPartnerExhibitionInterviewInfo"
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
package com.cool.store.entity;
|
package com.cool.store.entity;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.Date;
|
|
||||||
import javax.persistence.Table;
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author zhangchenbiao
|
* @author zhangchenbiao
|
||||||
@@ -26,6 +27,12 @@ public class HyPartnerExhibitionDO implements Serializable {
|
|||||||
@ApiModelProperty("报名的展会id,hy_exhibition.id")
|
@ApiModelProperty("报名的展会id,hy_exhibition.id")
|
||||||
private Integer exhibitionId;
|
private Integer exhibitionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("进行面试的会销创建人姓名")
|
||||||
|
private String exhibitionCreatorName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进行面试的会销创建人手机号")
|
||||||
|
private String exhibitionCreatorMobile;
|
||||||
|
|
||||||
@ApiModelProperty("线索id,hy_partner_line_info.id")
|
@ApiModelProperty("线索id,hy_partner_line_info.id")
|
||||||
private Long partnerLineId;
|
private Long partnerLineId;
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
package com.cool.store.vo;
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.cool.store.dto.partner.PrivateSeaLineDTO;
|
import com.cool.store.dto.partner.PrivateSeaLineDTO;
|
||||||
|
import com.cool.store.entity.HyPartnerExhibitionDO;
|
||||||
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
import com.cool.store.entity.HyPartnerInterviewPlanDO;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -90,6 +92,12 @@ public class PrivateSeaLineListVo {
|
|||||||
@ApiModelProperty("是否处于会销面试中")
|
@ApiModelProperty("是否处于会销面试中")
|
||||||
private Boolean whetherExhibitionInterview;
|
private Boolean whetherExhibitionInterview;
|
||||||
|
|
||||||
|
@ApiModelProperty("进行面试的会销创建人姓名")
|
||||||
|
private String exhibitionCreatorName;
|
||||||
|
|
||||||
|
@ApiModelProperty("进行面试的会销创建人手机号")
|
||||||
|
private String exhibitionCreatorMobile;
|
||||||
|
|
||||||
@ApiModelProperty("推荐加盟商ID")
|
@ApiModelProperty("推荐加盟商ID")
|
||||||
private String recommendPartnerId;
|
private String recommendPartnerId;
|
||||||
|
|
||||||
@@ -114,9 +122,10 @@ public class PrivateSeaLineListVo {
|
|||||||
|
|
||||||
|
|
||||||
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,
|
public static List<PrivateSeaLineListVo> convertList(List<PrivateSeaLineDTO> list, Map<String, String> finalDevManagerMap, Map<String, String> wantShopAreaNameMap,
|
||||||
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap,Map<Integer, String> channelMap,Map<Long, String> userPortraitMap,
|
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap, Map<Integer, String> channelMap, Map<Long, String> userPortraitMap,
|
||||||
List<Long> exhibitionInterviewLines){
|
List<HyPartnerExhibitionDO> partnerExhibitions){
|
||||||
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
|
List<PrivateSeaLineListVo> resultList = new ArrayList<>();
|
||||||
|
Map<Long, HyPartnerExhibitionDO> lineIdPartnerExhibitionMap = partnerExhibitions.stream().collect(Collectors.toMap(HyPartnerExhibitionDO::getPartnerLineId, data -> data));
|
||||||
for (PrivateSeaLineDTO x : list) {
|
for (PrivateSeaLineDTO x : list) {
|
||||||
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
|
PrivateSeaLineListVo privateSeaLineListVo = new PrivateSeaLineListVo();
|
||||||
privateSeaLineListVo.setLineId(x.getLineId());
|
privateSeaLineListVo.setLineId(x.getLineId());
|
||||||
@@ -171,10 +180,11 @@ public class PrivateSeaLineListVo {
|
|||||||
}
|
}
|
||||||
//在会销面试中的线索
|
//在会销面试中的线索
|
||||||
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.FALSE);
|
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.FALSE);
|
||||||
if (privateSeaLineListVo.getWhetherInExhibition()
|
if (CollUtil.isNotEmpty(partnerExhibitions)
|
||||||
&& ObjectUtils.isNotEmpty(exhibitionInterviewLines)
|
&& lineIdPartnerExhibitionMap.containsKey(x.getLineId())) {
|
||||||
&& exhibitionInterviewLines.contains(x.getLineId())) {
|
|
||||||
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.TRUE);
|
privateSeaLineListVo.setWhetherExhibitionInterview(Boolean.TRUE);
|
||||||
|
privateSeaLineListVo.setExhibitionCreatorName(lineIdPartnerExhibitionMap.get(x.getLineId()).getExhibitionCreatorName());
|
||||||
|
privateSeaLineListVo.setExhibitionCreatorMobile(lineIdPartnerExhibitionMap.get(x.getLineId()).getExhibitionCreatorMobile());
|
||||||
}
|
}
|
||||||
privateSeaLineListVo.setUserPortraitList(userPortraitList);
|
privateSeaLineListVo.setUserPortraitList(userPortraitList);
|
||||||
resultList.add(privateSeaLineListVo);
|
resultList.add(privateSeaLineListVo);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service.impl;
|
package com.cool.store.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
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.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
@@ -665,8 +666,12 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
return privateLineList;
|
return privateLineList;
|
||||||
}
|
}
|
||||||
List<Long> lindIds = list.stream().map(PrivateSeaLineDTO::getLineId).collect(Collectors.toList());
|
List<Long> lindIds = list.stream().map(PrivateSeaLineDTO::getLineId).collect(Collectors.toList());
|
||||||
|
List<Long> exhibitionLineIds = list.stream().filter(PrivateSeaLineDTO::getWhetherInExhibition).map(PrivateSeaLineDTO::getLineId).collect(Collectors.toList());
|
||||||
//查询处在会销面试中的线索
|
//查询处在会销面试中的线索
|
||||||
List<Long> exhibitionInterviewLines = partnerExhibitionDAO.queryListByLineIds(lindIds);
|
List<HyPartnerExhibitionDO> partnerExhibitions = new ArrayList<>();
|
||||||
|
if (CollUtil.isNotEmpty(exhibitionLineIds)) {
|
||||||
|
partnerExhibitions = partnerExhibitionDAO.queryListByLineIds(exhibitionLineIds);
|
||||||
|
}
|
||||||
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanDAO.getHyPartnerInterviewPlanByLineIds(lindIds);
|
List<HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOS = hyPartnerInterviewPlanDAO.getHyPartnerInterviewPlanByLineIds(lindIds);
|
||||||
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap = hyPartnerInterviewPlanDOS.stream().collect(Collectors.toMap(HyPartnerInterviewPlanDO::getPartnerLineId, data -> data));
|
Map<Long, HyPartnerInterviewPlanDO> hyPartnerInterviewPlanDOMap = hyPartnerInterviewPlanDOS.stream().collect(Collectors.toMap(HyPartnerInterviewPlanDO::getPartnerLineId, data -> data));
|
||||||
|
|
||||||
@@ -685,7 +690,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait())).map(PrivateSeaLineDTO::getUserPortrait).collect(Collectors.toList());
|
List<String> userPortraitList = list.stream().filter(x -> StringUtils.isNotEmpty(x.getUserPortrait())).map(PrivateSeaLineDTO::getUserPortrait).collect(Collectors.toList());
|
||||||
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
Map<Long, String> userPortraitMap = labelService.getUserPortraitMap(userPortraitList);
|
||||||
|
|
||||||
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap, hyPartnerInterviewPlanDOMap, channelMap, userPortraitMap, exhibitionInterviewLines);
|
List<PrivateSeaLineListVo> result = PrivateSeaLineListVo.convertList(list, devManagerMap, wantShopAreaNameMap, hyPartnerInterviewPlanDOMap, channelMap, userPortraitMap, partnerExhibitions);
|
||||||
privateLineList.setList(result);
|
privateLineList.setList(result);
|
||||||
return privateLineList;
|
return privateLineList;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,29 +64,29 @@ class EventRequestTest extends AbstractJUnit4SpringContextTests {
|
|||||||
String testPhone = "13739417741";
|
String testPhone = "13739417741";
|
||||||
String testDate = "2023-11-05 10:00:00";
|
String testDate = "2023-11-05 10:00:00";
|
||||||
String randomStr = RandomUtil.randomString(12);
|
String randomStr = RandomUtil.randomString(12);
|
||||||
String WxUrlPrefix = "https://wxaurl.cn/";
|
String wxUrlPrefix = "https://wxaurl.cn/";
|
||||||
String testWXUrl = WxUrlPrefix + randomStr;
|
String testWXUrl = wxUrlPrefix + randomStr;
|
||||||
//1. 意向申请通过
|
//1. 意向申请通过
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTENTION_APPLY_PASS, testDate, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTENTION_APPLY_PASS, testDate, testWXUrl);
|
||||||
//2. 预约面试通过通知
|
//2. 预约面试通过通知
|
||||||
randomStr = RandomUtil.randomString(12);
|
randomStr = RandomUtil.randomString(12);
|
||||||
testWXUrl = WxUrlPrefix + randomStr;
|
testWXUrl = wxUrlPrefix + randomStr;
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, testDate, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, testDate, testWXUrl);
|
||||||
//3. 面试通过通知
|
//3. 面试通过通知
|
||||||
randomStr = RandomUtil.randomString(12);
|
randomStr = RandomUtil.randomString(12);
|
||||||
testWXUrl = WxUrlPrefix + randomStr;
|
testWXUrl = wxUrlPrefix + randomStr;
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_PASS, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_PASS, testWXUrl);
|
||||||
//4. 面试开始前一天
|
//4. 面试开始前一天
|
||||||
randomStr = RandomUtil.randomString(12);
|
randomStr = RandomUtil.randomString(12);
|
||||||
testWXUrl = WxUrlPrefix + randomStr;
|
testWXUrl = wxUrlPrefix + randomStr;
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, "10", testDate, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, "10", testDate, testWXUrl);
|
||||||
//5. 面试开始前30分钟
|
//5. 面试开始前30分钟
|
||||||
randomStr = RandomUtil.randomString(12);
|
randomStr = RandomUtil.randomString(12);
|
||||||
testWXUrl = WxUrlPrefix + randomStr;
|
testWXUrl = wxUrlPrefix + randomStr;
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, testWXUrl);
|
||||||
//6. 短信邀约
|
//6. 短信邀约
|
||||||
randomStr = RandomUtil.randomString(12);
|
randomStr = RandomUtil.randomString(12);
|
||||||
testWXUrl = WxUrlPrefix + randomStr;
|
testWXUrl = wxUrlPrefix + randomStr;
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.SMS_INVATE, testWXUrl);
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.SMS_INVATE, testWXUrl);
|
||||||
//8. 展会结束
|
//8. 展会结束
|
||||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.EXHIBITION_CLOSE, "");
|
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.EXHIBITION_CLOSE, "");
|
||||||
|
|||||||
Reference in New Issue
Block a user