diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/FeiShuNoticeMsgEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/FeiShuNoticeMsgEnum.java
index 3b3708de6..a9dc06759 100644
--- a/coolstore-partner-common/src/main/java/com/cool/store/enums/FeiShuNoticeMsgEnum.java
+++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/FeiShuNoticeMsgEnum.java
@@ -9,16 +9,16 @@ import com.alibaba.fastjson.JSONObject;
*/
public enum FeiShuNoticeMsgEnum {
- common_notice("工作台通知", "{0}", "img_v2_45d7a901-1eab-498b-a760-b38d287f0c1g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", ""),
- ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索于 {0} 分配给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
- TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索于 {0} 转让给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
- BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
- EC_RECEIVE_LINE("收到EC新线索", "有{0}条新线索于EC同步给您,线索信息 {1},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
- INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人 {0} 手机号 {1} 于 {2} 提交加盟意向申请,请及时处理", "img_v2_c909097d-67d1-4c11-a911-a2584b67ca6g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
- FOLLOW_TASK("线索跟进任务", "{0}", "img_v2_1960b7ef-8c4e-4c3d-8b67-3d918a85578g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/"),
- INTERVIEW_APPOINTMENT("面试预约申请", "您有一个【面试预约申请】待处理,预约人 {0} 手机号 {1} ,预约面试时间 {2} ","img_v2_107bb06b-2a7a-43e1-a6ae-e5d2f2dae17g", "1567d83b966f2d312fd7fcd2e72dbce9", "/work/bench", "/mobile"),
+ common_notice("工作台通知", "{0}", "img_v2_45d7a901-1eab-498b-a760-b38d287f0c1g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索于 {0} 分配给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索于 {0} 转让给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ EC_RECEIVE_LINE("收到EC新线索", "有{0}条新线索于EC同步给您,线索信息 {1},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人 {0} 手机号 {1} 于 {2} 提交加盟意向申请,请及时处理", "img_v2_c909097d-67d1-4c11-a911-a2584b67ca6g", "1567d83b966f2d312fd7fcd2e72dbce9"),
+ 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", "/work/bench", "/mobile"),
+ PARTNER_SIGNUP_EXHIBITION("线索已报名会销", "您跟进的线索客户{0} {1} 已报名于 {2} 举办的【{3}】 ,地点为“{4}”","img_v3_026c_5bcf178d-19e6-4445-9677-f748a3f916fg", "1567d83b966f2d312fd7fcd2e72dbce9", "/clue/details"),
;
private String title;
@@ -29,12 +29,30 @@ public enum FeiShuNoticeMsgEnum {
private String PCPath;
private String mobilePath;
- FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode, String PCPath, 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.PCPath = pcPath;
+ this.mobilePath = "/mobile";
+ }
+
+ FeiShuNoticeMsgEnum(String title, String content, String imageMediaId, String templateCode) {
+ this.title = title;
+ this.content = content;
+ this.imageMediaId = imageMediaId;
+ this.templateCode = templateCode;
+ this.PCPath = "/work/bench";
+ this.mobilePath = "/mobile";
+ }
+
+ 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.mobilePath = mobilePath;
}
diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyPartnerUserInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyPartnerUserInfoMapper.xml
index f7cf65927..23641e8b1 100644
--- a/coolstore-partner-dao/src/main/resources/mapper/HyPartnerUserInfoMapper.xml
+++ b/coolstore-partner-dao/src/main/resources/mapper/HyPartnerUserInfoMapper.xml
@@ -118,7 +118,7 @@
diff --git a/coolstore-partner-model/src/main/java/com/cool/store/dto/partner/MobileCheckDTO.java b/coolstore-partner-model/src/main/java/com/cool/store/dto/partner/MobileCheckDTO.java
index d88015c28..1fc2a3ad1 100644
--- a/coolstore-partner-model/src/main/java/com/cool/store/dto/partner/MobileCheckDTO.java
+++ b/coolstore-partner-model/src/main/java/com/cool/store/dto/partner/MobileCheckDTO.java
@@ -18,6 +18,7 @@ public class MobileCheckDTO {
private String workflowStatus;
private String closeTime;
private String investmentManager;
+ private String investmentManagerName;
private Long lineId;
private String partnerName;
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java b/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java
index 943702e95..434f1eaff 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/http/EventCenterHttpRequest.java
@@ -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);
}
}
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineHighSeasServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineHighSeasServiceImpl.java
index 16362a9f7..16585a11b 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineHighSeasServiceImpl.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/LineHighSeasServiceImpl.java
@@ -288,7 +288,7 @@ public class LineHighSeasServiceImpl implements LineHighSeasService {
if (mobileCheckDTO.getLineStatus().equals(LineStatusEnum.PUBLIC_SEAS.getCode())) {
throw new ServiceException(ErrorCodeEnum.PUBLIC_LINE_NOT_FOLLOW);
} else {
- String message = MessageFormat.format(ErrorCodeEnum.LINE_EXIST_FOLLOW.getMessage(), mobileCheckDTO.getInvestmentManager(), mobileCheckDTO.getInvestmentManagerMobile());
+ String message = MessageFormat.format(ErrorCodeEnum.LINE_EXIST_FOLLOW.getMessage(), mobileCheckDTO.getInvestmentManagerName(), mobileCheckDTO.getInvestmentManagerMobile());
return new ResponseResult(ErrorCodeEnum.LINE_EXIST_FOLLOW.getCode(),message);
}
}
diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java
index adb3b9199..505c15e57 100644
--- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java
+++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/exhibition/ExhibitionServiceImpl.java
@@ -43,6 +43,7 @@ import javax.annotation.Resource;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.*;
+import java.util.function.Function;
import java.util.stream.Collectors;
/**
@@ -512,7 +513,11 @@ public class ExhibitionServiceImpl implements ExhibitionService {
BeanUtil.copyProperties(x,exhibitionLineBaseVO);
result.add(exhibitionLineBaseVO);
});
- return result;
+ //去重
+ return result.stream()
+ .collect(Collectors.toMap(ExhibitionLineBaseVO::getMobile, Function.identity(), (existing, replacement) -> existing))
+ .values().stream()
+ .collect(Collectors.toList());
}
@Override
@@ -630,8 +635,16 @@ public class ExhibitionServiceImpl implements ExhibitionService {
whetherInExhibition(Arrays.asList(lineId),Boolean.TRUE);
if (sendNotice){
//发送通知
- eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.PARTNER_SIGNUP_EXHIBITION,Arrays.asList(investManager),mobileCheckDTO.getPartnerName(),mobileCheckDTO.getMobile(),
- DateUtils.format(hyExhibitionDO.getStartDate(),CoolDateUtils.DATE_FORMAT_DAY_2),hyExhibitionDO.getExhibitionName(),hyExhibitionDO.getLocation());
+ List feishuUserIdListByUserIds = enterpriseUserDAO.getFeishuUserIdListByUserIds(Arrays.asList(investManager));
+ 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);
}
diff --git a/coolstore-partner-webb/src/test/java/com/cool/store/service/EventRequestTest.java b/coolstore-partner-webb/src/test/java/com/cool/store/service/EventRequestTest.java
index 64e7adda2..711412efa 100644
--- a/coolstore-partner-webb/src/test/java/com/cool/store/service/EventRequestTest.java
+++ b/coolstore-partner-webb/src/test/java/com/cool/store/service/EventRequestTest.java
@@ -41,22 +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), "4", "老大", "会销", "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), "237298", "e2771d330ec54648841a38607f06b598", "线索客户", "1008611", "2023-10-24", "会销", "蜀山");
}
@Test