发表于: 2017-11-28 22:43:04

0 628


一.今日完成

整理完文学部前后台接口文档

.前台

1.文章封面上传

请求地址:post  /a/u/cover/{module}

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

file

图形文件

MultipartFile

符合类型和大小的图形文件

module

文件模块拼接字

String

在当前路径前增加上级目录

 返回参数:

字段

描述

类型

说明

code

状态码

number

 

message

消息

String

 

data

数据

 

 

 data:

字段

描述

类型

说明

data

图片云存储外链

String

 

 2.获取文章列表

请求地址: get  /a/article/list

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

userId

用户id

number

 

articlePage

文章页数

number

MaxSize=10;

initPage=1

 返回参数:

字段

描述

类型

说明

code

状态码

number

 

message

消息

String

 

data

数据

Object

 

 data:

字段

描述

类型

说明

articleTitle

标题

String

10字内

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

 

articleContext

内容

String

25字内

articleUpvoteStatus

点赞与否

number

0/null表示当前无人点赞,1表示有点赞

 

articleUpvote

点赞数

number

 

articleCollectionStatus

收藏状态

number

0/null表示当前无人收藏,1表示有收藏

 

articleCollection

收藏数

number

 

articleUpdateAt

状态更新时间

number

24小时之内显示小时(不足1小时按1小时计),

超过24小时显示日期

SELECT [arg] FROM article ORDER BY articleUpdateAt LIMIT 10;

 3.获取文章详情

请求地址:get  /a/article/{articleId}

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

articleId

文章id

number

 

userId

用户id

number

 

返回参数:

字段

描述

类型

说明

code

状态码

number

 

message

消息

String

 

data

数据

Object

 

 data:

字段

描述

类型

说明

articleTitle

标题

String

 

articleUpdateAt

状态更新时间

number

 

articleAuthor

作者

String

 

articleContext

内容

String

 

articleUpvoteStatus

点赞与否

number

 

articleUpvote

点赞数

number

 

articleCollectionStatus

收藏状态

number

 

articleCollection

收藏数

number

 

SELECT [arg] FROM article WHERE articleId=?;

 .后台

1.新增文章

请求地址:post  /a/u/article

前端:

后端:甘乐

请求参数:

字段

描述

类型

是否必须

说明

articleTitle

标题

String

25

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

14

articleAbstract

摘要

String

28

articleContext

内容

String

 

 返回参数:

字段

描述

类型

说明

code

状态码

byte

1成功,-1失败

message

消息

String

 

INSERT INTO article [args] VALUES([args]);

 2.编辑文章

请求地址:post  /a/u/article/{articleId}

前端:

后端:甘乐

 请求参数:

字段

描述

类型

是否必须

说明

articleId

文章id

String

 

articleTitle

标题

String

25

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

14

articleAbstract

摘要

String

28

articleContext

内容

String

 

 

返回参数:

字段

描述

类型

说明

code

状态码

number

1成功,-1失败

message

消息

String

 

UPDATE article SET([args])=[?] WHER articleId=?;

 3.文章管理

请求地址:post  /a/u/article/{articleId}/handing

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

articleId

文章id

number

 

 返回参数:

字段

描述

类型

说明

code

状态码

number

1成功,-1失败

message

消息

String

 

articleStatus

文章状态

number

1上架

0下架

UPDATE article SET articleStatus = ? WHER articleId=?;

 4.获取文章列表

请求地址:get  /a/u/article/list

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

articleTitle

标题

String

10字内

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

 

MaxArticleUpvote

最大点赞数

number

 

MinArticleUpvote

最小点赞数

number

 

MaxArticleCollection

最大收藏数

number

 

MinArticleCollection

最小收藏数

number

 

articleStatus

文章状态

number

 

articleSize

分页大小

number

 

articlePage

页数

number

 

 返回参数:

字段

描述

类型

说明

code

状态码

number

 

message

消息

String

 

data

数据

Object

 

 data:

字段

描述

类型

说明

articleTitle

标题

String

10字内

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

 

articleUpvote

点赞数

number

 

articleCollection

收藏数

number

 

articleStatus

文章状态

number

 

articleNum

文章总数

number

 

动态SQL

 5.获取文章详情

请求地址:get  /a/u/article/{articleId}

前端:

后端:甘乐

请求参数:

字段

描述

类型

说明

articleId

文章id

number

 

 返回参数:

字段

描述

类型

说明

code

状态码

number

 

message

消息

String

 

data

数据

Object

 

 data:

字段

描述

类型

说明

articleTitle

标题

String

 

articleCoverPicture

封面图

String

图片云存储外链url

articleAuthor

作者

String

 

articleAbstract

摘要

String

 

articleContext

内容

String

 

SELECT [arg] FROM article WHERE articleId=?;

 

二.明日计划

1.准备小课堂

2.完成方案设计


三.遇到问题

暂无.


四.收获

以上.


返回列表 返回列表
评论

    分享到