Merge branch 'dev/feat/partner1.6_20231226' into pre

This commit is contained in:
feng.li
2023-12-26 14:21:49 +08:00
6 changed files with 58 additions and 46 deletions

View File

@@ -83,7 +83,7 @@
<select id="exhibitionLineList" resultType="com.cool.store.dto.exhibition.ExhibitionLineDTO">
select
hpe.id as id ,
hpe.id as exhibitionId ,
hpe.partner_id as partnerId,
hpe.partner_line_id as lineId,
hpe.participation_status as participationStatus,
@@ -91,6 +91,7 @@
hpe.expected_visitors_count as expectedVisitorsCount,
hpe.expected_information as expectedInformation,
hpui.username as partnerName,
hpui.user_channel_id as channelId,
hpui.mobile as mobile,
hoai.id as wantShopArea,
hoai.area_path as wantShopAreaName

View File

@@ -36,4 +36,6 @@ public class ExhibitionLineDTO {
private String customerManager;
private Integer channelId;
}

View File

@@ -1,4 +1,5 @@
package com.cool.store.service.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
@@ -6,7 +7,6 @@ import com.cool.store.constants.RedisConstant;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.*;
import com.cool.store.dto.log.UserInfoUpdateDTO;
import com.cool.store.dto.partner.MobileCheckDTO;
import com.cool.store.entity.*;
import com.cool.store.enums.*;
import com.cool.store.exception.ApiException;
@@ -19,7 +19,6 @@ import com.cool.store.utils.RedisUtilPool;
import com.cool.store.vo.ApplyBaseInfoVO;
import com.cool.store.vo.InviteCodeDetailVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.exhibition.SignUpExhibitionVO;
import com.cool.store.vo.partner.PartnerUserBaseVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
@@ -54,6 +53,13 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
@Resource
HyPhoneLocationService hyPhoneLocationService;
@Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyExhibitionDAO hyExhibitionDAO;
@Resource
HyExhibitionGroupDAO hyExhibitionGroupDAO;
@Override
public HyPartnerUserInfoDO selectByPartnerId(String partnerId) {
return hyPartnerUserInfoDAO.selectByPartnerId(partnerId);
@@ -149,12 +155,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), OperateTypeEnum.USERINFO_UPDATE,log);
return applyBaseInfoVO;
}
@Resource
HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyExhibitionDAO hyExhibitionDAO;
@Resource
HyExhibitionGroupDAO hyExhibitionGroupDAO;
@Override
public PartnerUserBaseVO getPartnerInfo(String mobile,Integer exhibitionId) {

View File

@@ -72,6 +72,9 @@ public class ExhibitionServiceImpl implements ExhibitionService {
@Autowired
private HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
@Resource
HyPartnerUserChannelDAO hyPartnerUserChannelDAO;
@Autowired
private InterviewService interviewService;
@@ -474,11 +477,16 @@ public class ExhibitionServiceImpl implements ExhibitionService {
List<LineInterviewDTO> lineInvestmentList = hyPartnerLineInfoDAO.lineInvestmentList(lineIds);
Map<Long, LineInterviewDTO> lineInvestmentMap = lineInvestmentList.stream().collect(Collectors.toMap(LineInterviewDTO::getLineId, date -> date));
List<ExhibitionLineVO> result = new ArrayList<>();
List<Integer> channelIds = exhibitionLineDTOS.stream().map(ExhibitionLineDTO::getChannelId).collect(Collectors.toList());
Map<Integer, String> channelMap = hyPartnerUserChannelDAO.getChannelMapByIds(channelIds);
exhibitionLineDTOS.forEach(x->{
ExhibitionLineVO exhibitionLineVO = new ExhibitionLineVO();
LineInterviewDTO inter = lineInterviewMap.getOrDefault(x.getLineId(), new LineInterviewDTO());
LineInterviewDTO investment = lineInvestmentMap.getOrDefault(x.getLineId(), new LineInterviewDTO());
BeanUtil.copyProperties(x,exhibitionLineVO);
exhibitionLineVO.setChannelName(channelMap.get(x.getChannelId()));
exhibitionLineVO.setId(Integer.valueOf(x.getExhibitionId()));
exhibitionLineVO.setWantShopAreaName(x.getWantShopAreaName().replace("/", " "));
exhibitionLineVO.setInvestmentManager(investment.getInvestmentManager());
exhibitionLineVO.setInvestmentManagerName(investment.getInvestmentManagerName());
exhibitionLineVO.setInvestmentManagerMobile(investment.getInvestmentManagerMobile());

View File

@@ -2,7 +2,6 @@ package com.cool.store.controller;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.trtc.callback.VideoCallBackDTO;
import com.cool.store.request.TRTCVideoCallBackReq;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.TRTCVideoService;
import io.swagger.annotations.Api;

View File

@@ -20,72 +20,73 @@ import java.util.Arrays;
@Slf4j
//SpringBootTest 默认不启动 web 环境,会导致 websocket 发现 web 容器不可用而报错,所以需要指定 web 环境
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class EventRequestTest extends AbstractJUnit4SpringContextTests {
class EventRequestTest extends AbstractJUnit4SpringContextTests {
@Resource
private EventCenterHttpRequest eventCenterHttpRequest;
@Test
public void test() {
void test() {
log.info("test");
}
@Test
public void testSendFeiShuNotice() throws ApiException {
void testSendFeiShuNotice() throws ApiException {
//招商企业
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
//任务中枢企业
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("661c6cfg"), "2023-10-24 10:09:04", "测试", "1008611");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("661c6cfg"), "2023-07-24 10:09:04", "测试", "10088911");
}
@Test
public void testFeishuNotice() throws ApiException {
void testFeishuNotice() throws ApiException {
String userId = "34f4a9ga";
//1. 工作台通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList("34f4a9ga"), "测试");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList(userId), "测试");
//2. 分配招商经理
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER, Arrays.asList(userId), "2011-12-11 11:11:11", "测试", "1008631");
//3. 转让招商经理
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "2011-11-11 11:11:11", "测试", "1008611");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "2012-11-11 11:11:11", "测试", "1108611");
//4. 收到新线索
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList("34f4a9ga"), "1", "2023-10-24 16:40:07");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER, Arrays.asList(userId), "1", "2023-01-24 16:41:07");
//5. 加盟意向申请
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTENTION_APPLY, Arrays.asList(userId), "测试", "1007611", "2023-09-24 16:42:07");
//6. 线索跟进任务
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList("34f4a9ga"), "测试线索跟进任务");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList(userId), "测试线索跟进任务");
//7. 面试预约申请
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList("34f4a9ga"), "测试", "1008611", "2023-10-24 16:40:07");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList(userId), "测试", "1108611", "2023-10-24 16:43:07");
//8. 会销协作通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList("34f4a9ga"), "4", "老大", "会销", "2023-12-31", "系东方大酒店");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList(userId), "4", "老大", "会销", "2023-12-31", "系东方大酒店");
}
@Test
public void testSMSNotice() throws ApiException {
void testSMSNotice() throws ApiException {
String testPhone = "13739417741";
String testDate = "2023-11-05 10:00:00";
String randomStr = RandomUtil.randomString(12);
String testWXUrl = "https://wxaurl.cn/" + randomStr;
// //1. 意向申请通过
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTENTION_APPLY_PASS, testDate, testWXUrl);
// //2. 预约面试通过通知
// randomStr = RandomUtil.randomString(12);
// testWXUrl = "https://wxaurl.cn/" + randomStr;
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, testDate, testWXUrl);
// //3. 面试通过通知
// randomStr = RandomUtil.randomString(12);
// testWXUrl = "https://wxaurl.cn/" + randomStr;
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_PASS, testWXUrl);
// //4. 面试开始前一天
// randomStr = RandomUtil.randomString(12);
// testWXUrl = "https://wxaurl.cn/" + randomStr;
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, "10", testDate, testWXUrl);
// //5. 面试开始前30分钟
// randomStr = RandomUtil.randomString(12);
// testWXUrl = "https://wxaurl.cn/" + randomStr;
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, testWXUrl);
// //6. 短信邀约
// randomStr = RandomUtil.randomString(12);
// testWXUrl = "https://wxaurl.cn/" + randomStr;
// eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.SMS_INVATE, testWXUrl);
//1. 意向申请通过
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTENTION_APPLY_PASS, testDate, testWXUrl);
//2. 预约面试通过通知
randomStr = RandomUtil.randomString(12);
testWXUrl = "https://wxaurl.cn/" + randomStr;
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, testDate, testWXUrl);
//3. 面试通过通知
randomStr = RandomUtil.randomString(12);
testWXUrl = "https://wxaurl.cn/" + randomStr;
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_PASS, testWXUrl);
//4. 面试开始前一天
randomStr = RandomUtil.randomString(12);
testWXUrl = "https://wxaurl.cn/" + randomStr;
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, "10", testDate, testWXUrl);
//5. 面试开始前30分钟
randomStr = RandomUtil.randomString(12);
testWXUrl = "https://wxaurl.cn/" + randomStr;
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, testWXUrl);
//6. 短信邀约
randomStr = RandomUtil.randomString(12);
testWXUrl = "https://wxaurl.cn/" + randomStr;
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.SMS_INVATE, testWXUrl);
//8. 展会结束
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.EXHIBITION_CLOSE, "");
}