新增消息中心功能

This commit is contained in:
xiezhijun
2021-04-27 19:48:22 +08:00
parent d5e9933fe7
commit bbbc4f2753
14 changed files with 742 additions and 3 deletions

View File

@ -0,0 +1,54 @@
package com.stdiet.custom.domain;
import lombok.Data;
import com.stdiet.common.annotation.Excel;
import com.stdiet.common.core.domain.BaseEntity;
/**
* 客户消息通知对象 sys_message_notice
*
* @author xzj
* @date 2021-04-26
*/
@Data
public class SysMessageNotice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 消息属性0 公共消息 1 私有消息 */
@Excel(name = "消息属性0 公共消息 1 私有消息")
private Integer messageProperty;
/** 消息对应客户ID (公共消息时该字段为0) */
@Excel(name = "消息对应客户ID (公共消息时该字段为0)")
private Long messageCustomer;
//用户加密ID非持久化字段
private String customerId;
/** 消息类型 */
@Excel(name = "消息类型")
private Integer messageType;
/** 消息标题 */
@Excel(name = "消息标题")
private String messageTitle;
/** 消息内容 */
@Excel(name = "消息内容")
private String messageContent;
/** 是否已读 0未读 1已读 */
@Excel(name = "是否已读 0未读 1已读")
private Integer readType;
/** 当前消息对应关键参数多个参数可保存json字符串 */
@Excel(name = "当前消息对应关键参数多个参数可保存json字符串")
private String messageKey;
/** 删除标识 0未删除 1已删除 */
private Integer delFlag;
}

View File

@ -0,0 +1,75 @@
package com.stdiet.custom.domain.entityEnum;
public enum MessageNoticeEnum{
systemMessage("系统通知", 0, 0, "系统通知"),
punchComment("打卡点评", 1, 1, "%s打卡点评"); //%s 为打卡时间
//消息名称
private String name;
//消息属性 0公共 1私有
private Integer property;
//消息类型
private Integer type;
//消息标题模板
private String titleTemplate;
MessageNoticeEnum(String name, Integer property, Integer type, String titleTemplate){
this.name = name;
this.property = property;
this.type = type;
this.titleTemplate = titleTemplate;
}
/**
* 根据type类型获取枚举对象
* @param type
* @return
*/
public static MessageNoticeEnum getNoticeEnumByType(Integer type){
for (MessageNoticeEnum messageEnum : MessageNoticeEnum.values()) {
if(messageEnum.getType().intValue() == type.intValue()){
return messageEnum;
}
}
return systemMessage;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Integer getProperty() {
return property;
}
public void setProperty(Integer property) {
this.property = property;
}
public String getTitleTemplate() {
return titleTemplate;
}
public void setTitleTemplate(String titleTemplate) {
this.titleTemplate = titleTemplate;
}
}