线索报名会销跳转地址

This commit is contained in:
feng.li
2023-12-28 13:34:03 +08:00
parent f8d4c2b355
commit 12810baa00
4 changed files with 55 additions and 28 deletions

View File

@@ -18,7 +18,7 @@ public enum FeiShuNoticeMsgEnum {
FOLLOW_TASK("线索跟进任务", "{0}", "img_v2_1960b7ef-8c4e-4c3d-8b67-3d918a85578g", "1567d83b966f2d312fd7fcd2e72dbce9"),
INTERVIEW_APPOINTMENT("面试预约申请", "您有一个【面试预约申请】待处理,预约人 {0} 手机号 {1} ,预约面试时间 {2} ","img_v2_107bb06b-2a7a-43e1-a6ae-e5d2f2dae17g", "1567d83b966f2d312fd7fcd2e72dbce9"),
EXHIBITION_COLLABORATOR("会销协作通知", "{0} 已将您添加为【{1}】的会销协作人,日期为 {2},地点为“{3}” ","img_v3_026c_d561bb71-f085-40ca-9c36-5fe134cacd2g", "1567d83b966f2d312fd7fcd2e72dbce9", "/joint-sales/manage-detail", "/mobile/joint-sales/manage-detail"),
PARTNER_SIGNUP_EXHIBITION("线索已报名会销", "您跟进的线索客户{0} {1} 已报名于 {2} 举办的【{3}】 ,地点为“{4}”","img_v3_026c_5bcf178d-19e6-4445-9677-f748a3f916fg", "1567d83b966f2d312fd7fcd2e72dbce9"),
PARTNER_SIGNUP_EXHIBITION("线索已报名会销", "您跟进的线索客户{0} {1} 已报名于 {2} 举办的【{3}】 ,地点为“{4}”","img_v3_026c_5bcf178d-19e6-4445-9677-f748a3f916fg", "1567d83b966f2d312fd7fcd2e72dbce9", "/clue/details"),
;
private String title;
@@ -29,6 +29,15 @@ public enum FeiShuNoticeMsgEnum {
private String PCPath;
private String mobilePath;
FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode, String pcPath) {
this.title = title;
this.content = content;
this.imageMediaId = imageMediaId;
this.templateCode = templateCode;
this.PCPath = pcPath;
this.mobilePath = "/mobile";
}
FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode) {
this.title = title;
this.content = content;
@@ -38,12 +47,12 @@ public enum FeiShuNoticeMsgEnum {
this.mobilePath = "/mobile";
}
FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode, String PCPath, String mobilePath) {
FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode, String pcPath, String mobilePath) {
this.title = title;
this.content = content;
this.imageMediaId = imageMediaId;
this.templateCode = templateCode;
this.PCPath = PCPath;
this.PCPath = pcPath;
this.mobilePath = mobilePath;
}

View File

@@ -22,7 +22,6 @@ import java.text.MessageFormat;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
/**
* @author Fun Li 2023/10/23 10:01
@@ -158,12 +157,24 @@ public class EventCenterHttpRequest {
}
private String getPathVariable(FeiShuNoticeMsgEnum msgEnum, Object... objects) {
String pathVariable = "";
if (Objects.requireNonNull(msgEnum) == FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR) {
pathVariable = "?id=" + objects[0];
System.arraycopy(objects, 1, objects, 0, objects.length - 1);
StringBuilder pathVariable = new StringBuilder();
switch (msgEnum) {
case EXHIBITION_COLLABORATOR:
pathVariable.append("?id=").append(objects[0]);
System.arraycopy(objects, 1, objects, 0, objects.length - 1);
break;
case PARTNER_SIGNUP_EXHIBITION:
pathVariable.append("?lineId=")
.append(objects[0])
.append("&clueType=private")
.append("&partnerId=")
.append(objects[1]);
System.arraycopy(objects, 2, objects, 0, objects.length - 2);
break;
default:
return "";
}
return pathVariable;
return new String(pathVariable);
}
}

View File

@@ -636,8 +636,15 @@ public class ExhibitionServiceImpl implements ExhibitionService {
if (sendNotice){
//发送通知
List<String> feishuUserIdListByUserIds = enterpriseUserDAO.getFeishuUserIdListByUserIds(Arrays.asList(investManager));
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION,feishuUserIdListByUserIds,mobileCheckDTO.getPartnerName(),mobileCheckDTO.getMobile(),
DateUtils.format(hyExhibitionDO.getStartDate(),CoolDateUtils.DATE_FORMAT_DAY_2),hyExhibitionDO.getExhibitionName(),hyExhibitionDO.getLocation());
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION,
feishuUserIdListByUserIds,
mobileCheckDTO.getLineId(),
mobileCheckDTO.getPartnerId(),
mobileCheckDTO.getPartnerName(),
mobileCheckDTO.getMobile(),
DateUtils.format(hyExhibitionDO.getStartDate(),CoolDateUtils.DATE_FORMAT_DAY_2),
hyExhibitionDO.getExhibitionName(),
hyExhibitionDO.getLocation());
}
return new SignUpExhibitionVO(Boolean.TRUE,CommonConstants.ZERO,null);
}

View File

@@ -41,24 +41,24 @@ class EventRequestTest extends AbstractJUnit4SpringContextTests {
@Test
void testFeishuNotice() throws ApiException {
String userId = "34f4a9ga";
//1. 工作台通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList(userId), "测试");
//2. 分配招商经理
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(userId), "2012-11-11 11:11:11", "测试", "1108611");
//4. 收到新线索
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(userId), "测试", "1007611", "2023-09-24 16:42:07");
//6. 线索跟进任务
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList(userId), "测试线索跟进任务");
//7. 面试预约申请
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList(userId), "测试", "1108611", "2023-10-24 16:43:07");
//8. 会销协作通知
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList(userId), "68", "老大", "会销", "2023-12-31", "系东方大酒店");
// //1. 工作台通知
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.common_notice, Arrays.asList(userId), "测试");
// //2. 分配招商经理
// 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(userId), "2012-11-11 11:11:11", "测试", "1108611");
// //4. 收到新线索
// 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(userId), "测试", "1007611", "2023-09-24 16:42:07");
// //6. 线索跟进任务
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.FOLLOW_TASK, Arrays.asList(userId), "测试线索跟进任务");
// //7. 面试预约申请
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.INTERVIEW_APPOINTMENT, Arrays.asList(userId), "测试", "1108611", "2023-10-24 16:43:07");
// //8. 会销协作通知
// eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.EXHIBITION_COLLABORATOR, Arrays.asList(userId), "68", "老大", "会销", "2023-12-31", "系东方大酒店");
//9. 线索报名会销
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION, Arrays.asList(userId), "线索客户", "1008611", "2023-10-24", "会销", "蜀山");
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION, Arrays.asList(userId), "237298", "e2771d330ec54648841a38607f06b598", "线索客户", "1008611", "2023-10-24", "会销", "蜀山");
}
@Test