1 Star 3 Fork 0

繁华独角戏 / 自媒体新闻平台

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

1.项目介绍:

该项目是一个自媒体新闻平台项目,该项目主要包含三部分分别是门户管理,作家中心和运营中心,详细介绍如下

门户平台

  • 门户中心主要负责新闻分类列表的展示,用户信息的展示

  • 分页展示新闻列表,展示最新新闻,展示用户信息,点进去头像之后,可以查看该用户的作家主页,可以查看作家某一个新闻的详细信息,对新闻进行评价,分享

作家中心

  • 作家中心主要负责文章,内容发布,评论的管理以及个人信息的修改

  • 内容管理主要显示历史发表过的文章,用户可以删除或者撤回已经发布的文章,也可以根据状态进行相应的查询

  • 对于文章使用的是markdown的格式,可以对文章内容进行预览,定时发布和发布,发布之后,文章内容就会进入审核模式

  • 评论内容,用于可以对评论进行管理,可以查看评论,也可以删除评论

  • 粉丝内容,用户可以查看粉丝内容

运营中心

  • 运营中心这主要负责文章内容的审核,用户的管理,文章的分裂,友情链接的设置,IP黑名单,管理员的设置

2.微服务架构图

输入图片说明

3.技术选型

存储层:

文件存储: OSS FastDFS GridFS

数据持久化: MySQL/MariaDB MongoDB

缓存层: Redis

服务:

服务间通信:RabbitMQ RestApi Feign

注册中心: Nacos

接口:

Nginx GateWay

前端:

JS HTML CSS VUE ElmentUI

技术支持:

SpringBoot,MybatisPlus,SpringCloud

4.技术亮点

  • Redis:分布式会话,Session共享,单点登陆,防刷,计数

  • Fastdfs+Nginx/GridFs:搭建分布式文件系统,单文件/批量文件,人脸隐私保护拦截

  • Maven:项目构建,聚合,分层,架构设计,面向对象

  • 集成阿里服务,使用阿里人脸识别,文本/图片安全审核,短信服务

  • RabbitMQ:对接口进行异步解耦,延迟消息,异步发送

  • SpringCloud:模块划分,方便业务的管理,扩展

  • Freemarker:为了贴合自媒体项目的需求,会使用FreeMarker,去生成一些静态页面

5.软件架构说明

img.png

6.使用说明

后续更新........

7.数据库设计

admin_user管理员账号

-- auto-generated definition
create table admin_user
(
    id           varchar(24) not null
        primary key,
    username     varchar(32) not null comment '用户名',
    password     varchar(64) null comment '密码',
    face_id      varchar(64) null comment '人脸入库图片信息,该信息保存到mongoDB的gridFS中',
    admin_name   varchar(12) null comment '管理人员的姓名',
    created_time datetime    not null comment '创建时间 创建时间',
    updated_time datetime    not null comment '更新时间 更新时间',
    constraint username
        unique (username)
)
    comment '运营管理平台的admin级别用户' charset = utf8mb4;

普通用户app_user

-- auto-generated definition
create table app_user
(
    id            varchar(24)        not null
        primary key,
    mobile        varchar(32)        not null comment '手机号',
    nickname      varchar(16)        not null comment '昵称,媒体号',
    face          varchar(128)       not null comment '头像',
    realname      varchar(128)       null comment '真实姓名',
    email         varchar(32)        null comment '邮箱地址',
    sex           int                null comment '性别 1:男  0:女  2:保密',
    birthday      date               null comment '生日',
    province      varchar(32)        null comment '省份',
    city          varchar(32)        null comment '城市',
    district      varchar(32)        null comment '区县',
    active_status int(255) default 0 not null comment '用户状态:0:未激活。 1:已激活:基本信息是否完善,真实姓名,邮箱地址,性别,生日,住址等,如果没有完善,则用户不能在作家中心操作,不能关注。2:已冻结。',
    total_income  int(255) default 0 not null comment '累计已结算的收入金额,也就是已经打款的金额,每次打款后再此累加',
    created_time  datetime           not null comment '创建时间 创建时间',
    updated_time  datetime           not null comment '更新时间 更新时间',
    constraint mobile
        unique (mobile)
)
    comment '网站用户' charset = utf8mb4;

文章article

-- auto-generated definition
create table article
(
    id              varchar(24)      not null
        primary key,
    title           varchar(64)      not null comment '文章标题',
    content         longtext         not null comment '文章内容,长度不超过9999,需要在前后端判断',
    category_id     int(2)           not null comment '文章所属分类id',
    article_type    int(1)           not null comment '文章类型,1:图文(1张封面),2:纯文字',
    article_cover   varchar(256)     null comment '文章封面图,article_type=1 的时候展示',
    is_appoint      int(1)           not null comment '是否是预约定时发布的文章,1:预约(定时)发布,0:即时发布    在预约时间到点的时候,把1改为0,则发布',
    article_status  int(1)           not null comment '文章状态,1:审核中(用户已提交),2:机审结束,等待人工审核,3:审核通过(已发布),4:审核未通过;5:文章撤回(已发布的情况下才能撤回和删除)',
    publish_user_id varchar(24)      not null comment '发布者用户id',
    publish_time    datetime         not null comment '文章发布时间(也是预约发布的时间)',
    read_counts     int    default 0 not null comment '用户累计点击阅读数(喜欢数)(点赞) - 放redis',
    comment_counts  int    default 0 not null comment '文章评论总数。评论防刷,距离上次评论需要间隔时间控制几秒',
    mongo_file_id   varchar(64)      null,
    is_delete       int(1) default 0 not null comment '逻辑删除状态,非物理删除,1:删除,0:未删除',
    create_time     datetime         not null comment '文章的创建时间',
    update_time     datetime         not null comment '文章的修改时间'
)
    comment '文章资讯表' charset = utf8mb4;

分类表category

create table category
(
    id        int(2) auto_increment
        primary key,
    name      varchar(12) not null comment '分类名,比如:科技,人文,历史,汽车等等',
    tag_color varchar(12) not null comment '标签颜色',
    constraint name
        unique (name)
)
    comment '新闻资讯文章的分类(或者称之为领域)' charset = utf8mb4;

评论表comments

create table comments
(
    id                    varchar(24)  not null
        primary key,
    writer_id             varchar(24)  not null comment '评论的文章是哪个作者的关联id',
    father_id             varchar(24)  not null comment '如果是回复留言,则本条为子留言,需要关联查询',
    article_id            varchar(24)  not null comment '回复的那个文章id',
    article_title         varchar(64)  not null comment '冗余文章标题,宽表处理,非规范化的sql思维,对于几百万文章和几百万评论的关联查询来讲,性能肯定不行,所以做宽表处理,从业务角度来说,文章发布以后不能随便修改标题和封面的',
    article_cover         varchar(128) null comment '文章封面',
    comment_user_id       varchar(24)  not null comment '发布留言的用户id',
    comment_user_nickname varchar(16)  not null comment '冗余用户昵称,非一致性字段,用户修改昵称后可以不用同步',
    comment_user_face     varchar(128) not null comment '冗余的用户头像',
    content               varchar(128) not null comment '留言内容',
    create_time           datetime     not null comment '留言时间'
)
    comment '文章评论表' charset = utf8mb4;

粉丝表fans

create table fans
(
    id           varchar(24)  not null
        primary key,
    writer_id    varchar(24)  not null comment '作家用户id',
    fan_id       varchar(24)  not null comment '粉丝用户id',
    face         varchar(128) null comment '粉丝头像',
    fan_nickname varchar(16)  not null comment '粉丝昵称',
    sex          int          not null comment '粉丝性别',
    province     varchar(16)  not null comment '省份',
    constraint writer_id
        unique (writer_id, fan_id)
)
    comment '粉丝表,用户与粉丝的关联关系,粉丝本质也是用户。
关联关系保存到es中,粉丝数方式和用户点赞收藏文章一样。累加累减都用redis来做。
字段与用户表有些冗余,主要用于数据可视化,数据一旦有了之后,用户修改性别和省份无法影响此表,只认第一次的数据。

' charset = utf8mb4;

8.功能设计

8.1 从前端谈功能架构

img.png

8.2 从微服务端谈功能架构

后续更新........

空文件

简介

该项目是一个自媒体新闻平台项目,该项目主要包含三部分分别是门户管理,作家中心和运营中心。门户管理展示的是新闻分类和每个分类下的列表,用户能够对文章进行查看,点赞,评论,收藏;作家中心可以发布markdown格式文章,可以对发布的文章进行删除和撤回,可以对自己用户信息进行修改,也可以查看评论,删除评论;运营管理是一个后台管理系统,在该系统中可以对用户发布的文章进行审核,审核分为AI审核,人工审核等 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/tzmoxi/imooc-news-dev.git
git@gitee.com:tzmoxi/imooc-news-dev.git
tzmoxi
imooc-news-dev
自媒体新闻平台
master

搜索帮助