站内信接口
- 消息列表
查询系统消息并添加到消息用户表
查询我的消息 - 获取用户未查看的消息个数
- 获取用户通知消息详情
- 设置用户消息已读
- 删除消息
数据表
/*
Navicat MySQL Data Transfer
Source Server : 47.94.156.208
Source Server Version : 50648
Source Host : 47.94.156.208:3306
Source Database : dspzbdshop
Target Server Type : MYSQL
Target Server Version : 50648
File Encoding : 65001
Date: 2020-11-08 16:39:28
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for fa_message_notice
-- ----------------------------
DROP TABLE IF EXISTS `fa_message_notice`;
CREATE TABLE `fa_message_notice` (
`message_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`message_type` enum('system','user') NOT NULL DEFAULT 'system' COMMENT '消息类型',
`message_title` varchar(255) DEFAULT NULL COMMENT '消息标题',
`message_content` text NOT NULL COMMENT '消息内容',
`createtime` int(10) DEFAULT NULL COMMENT '创建时间',
`updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='站内消息表';
-- ----------------------------
-- Records of fa_message_notice
-- ----------------------------
INSERT INTO `fa_message_notice` VALUES ('1', 'system', '国庆大酬宾', '<p>国庆期间,超多商品低至五折,快来抢购吧</p>', '1602493440', '1602493440');
INSERT INTO `fa_message_notice` VALUES ('2', 'user', 'xZX', '<p>ZX</p>', '1602905210', '1602905210');
INSERT INTO `fa_message_notice` VALUES ('3', 'system', 'xZX', '<p>1212</p>', '1604635818', '1604635818');
INSERT INTO `fa_message_notice` VALUES ('4', 'system', '1', '<p>12111111</p>', '1604645064', '1604645064');
-- ----------------------------
-- Table structure for fa_message_user
-- ----------------------------
DROP TABLE IF EXISTS `fa_message_user`;
CREATE TABLE `fa_message_user` (
`rec_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`message_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '消息id',
`is_see` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否查看:0未查看, 1已查看',
`deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户假删除标识,1:删除,0未删除',
`createtime` int(10) DEFAULT NULL COMMENT '创建时间',
`updatetime` int(10) DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`rec_id`),
KEY `user_id` (`user_id`),
KEY `message_id` (`message_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='用户的消息表';
-- ----------------------------
-- Records of fa_message_user
-- ----------------------------
INSERT INTO `fa_message_user` VALUES ('1', '3', '2', '0', '0', '1602905210', '1602905210');
INSERT INTO `fa_message_user` VALUES ('2', '5', '3', '1', '0', '1604635841', '1604635841');
INSERT INTO `fa_message_user` VALUES ('3', '5', '4', '1', '0', '1604645190', '1604645190');