代码拉取完成,页面将自动刷新
在写
文档管理、文档多条件组合检索、评论管理、评论查询、标签统计与查询、专栏管理与查询、树型分类结构生成、分类查询
等操作接口,可供博客应用、文库应用、公告应用等需要依靠文档检索功能的前台系统快速接入使用。(注:所有更新操作均采用乐观锁机制,更新失败重试次数可在配置文件里设置)
写入模块
查询模块
文档模块
分类模块
标签模块
评论模块
专栏模块
sdk:提供表示层所需的传输对象
表现层:提供对外接口服务以及配置服务
应用层:处理业务逻辑
领域层:提供仓储服务,封装底层数据
基础服务层:提供DB、ES、以及常用工具服务
文档
存储)字段名称 | 字段解释 | 字段类型 |
---|---|---|
id | ES主键id | keyword |
app_id | 文档所属应用id | keyword |
category_id | 文档所属分类id | keyword |
column_id | 文档所属专栏id(允许多个) | keyword |
author_id | 文档作者id(允许多个) | keyword |
document_id | 文档id | keyword |
title | 文档标题 | keyword |
content | 文档内容 | keyword |
tag | 文档标签(允许多个) | keyword |
remarks | 文档备注 | keyword |
extra | 文档附加内容(自定义) | keyword |
summary | 文档总结摘要 | keyword |
auth_level | 文档查看权限级别(0~99自定义,用户权限等级如果低于authLevel,则不能查看该文章) | Long |
score | 文档推荐分值(自定义,可按此字段对文档进行排序,用于热门文档推荐)` | Long |
love_num | 文档收藏数(可按此字段对文档进行排序) | Long |
like_num | 文档点赞数(可按此字段对文档进行排序) | Long |
read_num | 文档阅读数(可按此字段对文档进行排序) | Long |
share_num | 文档分享数(可按此字段对文档进行排序) | Long |
comment_num | 文档评论数(可按此字段对文档进行排序) | Long |
filter | 文档检索过滤条件(自定义,允许多个,例:1-仅自己可见、2-所有人可见) | Long |
attr | 文档属性(自定义,允许多个,例:1-转载文章、2-原创文章) | Long |
type | 文档类型(自定义,例:0-普通文章,1-官方公告) | Long |
status | 文档状态(0-删除,1-正常) | Long |
create_time | 文档创建时间 | Long |
update_time | 文档更新时间 | Long |
分类
、专栏
、标签
、评论
、子评论
存储)create table `category`
(
id bigint unsigned auto_increment
primary key,
app_id varchar(63) not null comment '应用id',
category_id varchar(63) not null comment '分类id',
parent_id varchar(63) not null comment '父类id',
category_name varchar(127) not null default '' comment '分类名称',
detail text default '' comment '详情',
extra text default '' comment '附加内容',
score bigint not null default 0 comment '排序权值',
attr int not null default 0 comment '属性',
type int not null default 0 comment '类型',
status int not null default 1 comment '状态(1-正常、0-删除)',
version bigint not null default 0 comment '版本号(乐观锁)',
create_time bigint not null default 0 comment '创建时间',
update_time bigint not null default 0 comment '更新时间'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
create table `author_column`
(
id bigint unsigned auto_increment
primary key,
app_id varchar(63) not null comment '应用id',
category_id varchar(63) not null comment '分类id',
column_id varchar(63) not null comment '专栏id',
author_id varchar(63) not null comment '作者id',
column_name varchar(127) not null default '' comment '专栏名称',
detail text default '' comment '详情',
extra text default '' comment '附加内容',
score bigint not null default 0 comment '排序权值',
document_num bigint not null default 0 comment '该专栏下的文档数量',
attr int not null default 0 comment '属性',
type int not null default 0 comment '类型',
status int not null default 1 comment '状态(1-正常、0-删除)',
version bigint not null default 0 comment '版本号(乐观锁)',
create_time bigint not null default 0 comment '创建时间',
update_time bigint not null default 0 comment '更新时间'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
create table `tag`
(
id bigint unsigned auto_increment
primary key,
app_id varchar(63) not null comment '应用id',
tag_name varchar(127) not null default '' comment '标签名称',
number bigint not null default 0 comment '带有该标签的文档数量',
status int not null default 1 comment '状态(1-正常、0-删除)',
version bigint not null default 0 comment '版本号(乐观锁)',
create_time bigint not null default 0 comment '创建时间',
update_time bigint not null default 0 comment '更新时间'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
create table `comment`
(
id bigint unsigned auto_increment
primary key,
app_id varchar(63) not null comment '应用id',
document_id varchar(63) not null comment '文档id',
comment_id varchar(63) not null comment '评论id',
author_id varchar(63) not null comment '作者id',
content text default '' comment '主体内容',
extra text default '' comment '附加内容',
like_num bigint not null default 0 comment '点赞数',
love_num bigint not null default 0 comment '收藏数',
share_num bigint not null default 0 comment '转发数',
sub_comment_num bigint not null default 0 comment '子评论数',
attr int not null default 0 comment '属性',
type int not null default 0 comment '类型',
status int not null default 1 comment '状态(1-正常、0-删除)',
version bigint not null default 0 comment '版本号(乐观锁)',
create_time bigint not null default 0 comment '创建时间',
update_time bigint not null default 0 comment '更新时间'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
create table `sub_comment`
(
id bigint unsigned auto_increment
primary key,
app_id varchar(63) not null comment '应用id',
document_id varchar(63) not null comment '文档id',
comment_id varchar(63) not null comment '评论id',
sub_comment_id varchar(63) not null comment '子评论id',
author_id varchar(63) not null comment '作者id',
reply_to varchar(63) not null comment '回复对象id',
content text default '' comment '主体内容',
extra text default '' comment '附加内容',
like_num bigint not null default 0 comment '点赞数',
love_num bigint not null default 0 comment '收藏数',
share_num bigint not null default 0 comment '转发数',
attr int not null default 0 comment '属性',
type int not null default 0 comment '类型',
status int not null default 1 comment '状态(1-正常、0-删除)',
version bigint not null default 0 comment '版本号(乐观锁)',
create_time bigint not null default 0 comment '创建时间',
update_time bigint not null default 0 comment '更新时间'
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。