通知优化 区分各个类型
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @Author: young.yu
|
||||
* @Date: 2023-07-19 16:49
|
||||
@@ -7,34 +9,40 @@ package com.cool.store.enums;
|
||||
*/
|
||||
public enum FeiShuNoticeMsgEnum {
|
||||
|
||||
//分配招商经理
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索 于 {0} 分配给您,线索信息{1}手机号{2},请及时跟进"),
|
||||
//转让招商经理
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索 于 {0} 转让给您,线索信息{1}手机号{2},请及时跟进"),
|
||||
//意向申请通知
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人{0}手机号{1}于 {2} 提交加盟意向申请,请及时处理");
|
||||
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索 于 {0} 分配给您,线索信息{1}手机号{2},请及时跟进", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索 于 {0} 转让给您,线索信息{1}手机号{2},请及时跟进", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人{0}手机号{1}于 {2} 提交加盟意向申请,请及时处理", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
FOLLOW_TASK("线索跟进任务", "{0}", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
INTERVIEW_APPOINTMENT("面试预约申请", "{0}","img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
;
|
||||
|
||||
private String title;
|
||||
private String content;
|
||||
private String imageMediaId;
|
||||
|
||||
FeiShuNoticeMsgEnum(String title, String content) {
|
||||
FeiShuNoticeMsgEnum(String title, String content, String imageMediaId) {
|
||||
this.title = title;
|
||||
this.content = content;
|
||||
this.imageMediaId = imageMediaId;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
public String getImageMediaId() {
|
||||
return imageMediaId;
|
||||
}
|
||||
|
||||
public JSONObject getMessageObject() {
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("name", this.title);
|
||||
object.put("imageMediaId", this.imageMediaId);
|
||||
return object;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: MessageTypeEnum
|
||||
* @Description:
|
||||
* @date 2023-06-15 10:14
|
||||
*/
|
||||
public enum MessageTypeEnum {
|
||||
|
||||
SCHEDULE_REMINDER("schedule_reminder", "日历提醒事件", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag"),
|
||||
FOLLOW_TASK("follow_task", "跟进任务提醒", "img_v2_0709ece3-77a8-49a4-820f-f245b2a4fdag")
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
private String code;
|
||||
|
||||
private String name;
|
||||
|
||||
private String imageMediaId;
|
||||
|
||||
MessageTypeEnum(String code, String name, String imageMediaId) {
|
||||
this.code = code;
|
||||
this.name = name;
|
||||
this.imageMediaId = imageMediaId;
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getImageMediaId() {
|
||||
return imageMediaId;
|
||||
}
|
||||
|
||||
public static String getImageMediaId(String code){
|
||||
for (MessageTypeEnum value : MessageTypeEnum.values()) {
|
||||
if(value.code.equals(code)){
|
||||
return value.imageMediaId;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public JSONObject getMessageTypeObject() {
|
||||
JSONObject object = new JSONObject();
|
||||
object.put("code", this.code);
|
||||
object.put("name", this.name);
|
||||
object.put("imageMediaId", this.imageMediaId);
|
||||
return object;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user