Merge remote-tracking branch 'hsay/dev/feat/partner1.6_20231226' into dev/feat/partner1.6_20231226
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -20,72 +20,74 @@ 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);
|
||||
String WXUrlPrefix = "https://wxaurl.cn/";
|
||||
String testWXUrl = WXUrlPrefix + randomStr;
|
||||
//1. 意向申请通过
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTENTION_APPLY_PASS, testDate, testWXUrl);
|
||||
//2. 预约面试通过通知
|
||||
randomStr = RandomUtil.randomString(12);
|
||||
testWXUrl = WXUrlPrefix + randomStr;
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_APPOINTMENT_PASS, testDate, testWXUrl);
|
||||
//3. 面试通过通知
|
||||
randomStr = RandomUtil.randomString(12);
|
||||
testWXUrl = WXUrlPrefix + randomStr;
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_PASS, testWXUrl);
|
||||
//4. 面试开始前一天
|
||||
randomStr = RandomUtil.randomString(12);
|
||||
testWXUrl = WXUrlPrefix + randomStr;
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_DAY, "10", testDate, testWXUrl);
|
||||
//5. 面试开始前30分钟
|
||||
randomStr = RandomUtil.randomString(12);
|
||||
testWXUrl = WXUrlPrefix + randomStr;
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.INTERVIEW_BEGIN_IN_MINUTES, testWXUrl);
|
||||
//6. 短信邀约
|
||||
randomStr = RandomUtil.randomString(12);
|
||||
testWXUrl = WXUrlPrefix + randomStr;
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.SMS_INVATE, testWXUrl);
|
||||
//8. 展会结束
|
||||
eventCenterHttpRequest.sendSmsVariable(testPhone, SMSMsgEnum.EXHIBITION_CLOSE, "");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user