feat:消息存储

This commit is contained in:
zuoqinbo 2023-10-19 10:30:14 +08:00
parent 370da0330b
commit ef5c2bc0b7
2 changed files with 35 additions and 9 deletions

View File

@ -36,24 +36,30 @@ public class MessageInfo {
private List<String> toImAccountList; private List<String> toImAccountList;
/** /**
* 消息模板ID * 消息标题
*/ */
@NotNull(message = "消息模板ID不能为空") @NotNull(message = "消息标题不能为空")
private String msgTemplateId; private String msgHeader;
/**
* 消息模板内容
*/
@NotNull(message = "消息模板内容不能为空")
private String msgTemplateContent;
/** /**
* 消息内容 * 消息内容
*/ */
@NotNull(message = "消息内容不能为空") @NotNull(message = "消息内容不能为空")
private String msgContent; private String msgContent;
/**
* 消息模板ID
*/
@NotNull(message = "消息模板ID不能为空")
private String msgTemplateId;
/**
* 消息模板内容
*/
@NotNull(message = "消息模板内容不能为空")
private String msgTemplateContent;
/** /**
* 消息扩展信息 * 消息扩展信息
*/ */

View File

@ -75,3 +75,23 @@ CREATE TABLE IF NOT EXISTS im_robot_msg_template
create index idx_im_robot_id create index idx_im_robot_id
on im_robot_msg_template (robot_id); on im_robot_msg_template (robot_id);
CREATE TABLE IF NOT EXISTS im_message_history
(
id bigint auto_increment comment '主键',
message_id varchar(50) not null comment '消息ID',
channel_provider varchar(50) not null comment 'IM消息平台名称',
from_account varchar(50) not null comment 'IM消息发送账户',
message text not null comment '消息内容,JSON格式',
is_delete tinyint default 0 not null comment '未删除0,删除id',
create_at datetime default CURRENT_TIMESTAMP not null comment '创建时间',
update_at datetime default CURRENT_TIMESTAMP not null comment '更新时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8 comment 'IM消息模历史表';
create index idx_im_message_id
on im_message_history (message_id);