1{2"code":1,3"data":{4"count":1122,5"list":[6{7"id":1,// 博客 ID8"title":"Sample Blog Title",// 博客的标题9"intro":"This is a brief introduction to the blog.",// 博客的简介10"content":"This is the content written in Markdown format.",// md 编辑器产生的内容时,对应的 md 的内容11"html":"<p>This is the HTML content generated from Markdown.</p>",// md 编辑器产生的内容时,对应的生成的 HTML12"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容13"isTop":0,// 是否置顶:0:不置顶,1:置顶14"readCount":1024,// 阅读数15"createTime":"2024-08-22T15:30:00Z",// 创建时间16"updateTime":"2024-08-22T15:45:00Z",// 更新时间17"publishTime":"2024-08-22T16:00:00Z",// 发布时间18"thumbnail":"https://example.com/thumbnail.jpg",// 缩略图, 是一个 URL19"status":"published",// 博客状态20"cateId":4,// 博客分类枚举值21"tags":"golang,struct,example"// 标签,英文逗号分隔,如:"并发,线程,Java"22}23]24},25"message":"获取数据成功"26}
8. 根据关键字搜索获取博客列表
请求方法: POST
请求 URL: /api/admin/blog/getBlogListByWord
请求参数(form表单)
字段名
类型
描述
是否必须
pageNum
int
分页页码
是
pageSize
int
分页大小
是
word
string
关键字
是
返回结果
1{2"code":1,3"data":{4"count":1122,5"list":[6{7"id":1,// 博客 ID8"title":"Sample Blog Title",// 博客的标题9"intro":"This is a brief introduction to the blog.",// 博客的简介10"content":"This is the content written in Markdown format.",// md 编辑器产生的内容时,对应的 md 的内容11"html":"<p>This is the HTML content generated from Markdown.</p>",// md 编辑器产生的内容时,对应的生成的 HTML12"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容13"isTop":0,// 是否置顶:0:不置顶,1:置顶14"readCount":1024,// 阅读数15"createTime":"2024-08-22T15:30:00Z",// 创建时间16"updateTime":"2024-08-22T15:45:00Z",// 更新时间17"publishTime":"2024-08-22T16:00:00Z",// 发布时间18"thumbnail":"https://example.com/thumbnail.jpg",// 缩略图, 是一个 URL19"status":"published",// 博客状态20"cateId":4,// 博客分类枚举值21"tags":"golang,struct,example"// 标签,英文逗号分隔,如:"并发,线程,Java"22}23]24},25"message":"获取数据成功"26}
9. 搜索博客
请求方法: POST
请求 URL: /api/admin/blog/searchBlog
请求参数(form表单)
字段名
类型
描述
是否必须
pageNum
int
分页页码
是
pageSize
int
分页大小
是
word
string
关键字
否
status
int
博客的状态值:10-已创建;20-已下架;30-已发布
否
返回结果
1{2"code":1,3"data":{4"count":1122,5"list":[6{7"id":1,// 博客 ID8"title":"Sample Blog Title",// 博客的标题9"intro":"This is a brief introduction to the blog.",// 博客的简介10"content":"This is the content written in Markdown format.",// md 编辑器产生的内容时,对应的 md 的内容11"html":"<p>This is the HTML content generated from Markdown.</p>",// md 编辑器产生的内容时,对应的生成的 HTML12"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容13"isTop":0,// 是否置顶:0:不置顶,1:置顶14"readCount":1024,// 阅读数15"createTime":"2024-08-22T15:30:00Z",// 创建时间16"updateTime":"2024-08-22T15:45:00Z",// 更新时间17"publishTime":"2024-08-22T16:00:00Z",// 发布时间18"thumbnail":"https://example.com/thumbnail.jpg",// 缩略图, 是一个 URL19"status":"published",// 博客状态20"cateId":4,// 博客分类枚举值21"tags":"golang,struct,example"// 标签,英文逗号分隔,如:"并发,线程,Java"22}23]24},25"message":"获取数据成功"26}
10. 获取博客详情
请求方法: POST
请求 URL: /api/admin/blog/getBlogDetail
请求参数(form表单)
字段名
类型
描述
是否必须
id
int64
博客ID
是
返回结果
1{2"code":1,3"data":{4"id":1,// 博客 ID5"title":"Sample Blog Title",// 博客的标题6"intro":"This is a brief introduction to the blog.",// 博客的简介7"content":"This is the content written in Markdown format.",// md 编辑器产生的内容时,对应的 md 的内容8"html":"<p>This is the HTML content generated from Markdown.</p>",// md 编辑器产生的内容时,对应的生成的 HTML9"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容10"isTop":0,// 是否置顶:0:不置顶,1:置顶11"readCount":1024,// 阅读数12"createTime":"2024-08-22T15:30:00Z",// 创建时间13"updateTime":"2024-08-22T15:45:00Z",// 更新时间14"publishTime":"2024-08-22T16:00:00Z",// 发布时间15"thumbnail":"https://example.com/thumbnail.jpg",// 缩略图, 是一个 URL16"status":"published",// 博客状态17"cateId":4,// 博客分类枚举值18"tags":"golang,struct,example"// 标签,英文逗号分隔,如:"并发,线程,Java"19},20"message":"获取博客成功"21}
11. 创建友链
请求方法: POST
请求 URL: /api/admin/link/create
请求参数(form表单)
字段名
类型
描述
是否必须
title
string
名称
是
url
string
URL
是
seq
int
序号
否
validTime
int64
有效时间(UNIX 时间戳)
否
remark
string
备注
否
返回结果
1{2"code":1,3"data":null,4"message":"添加成功"5}
12. 修改友链
请求方法: POST
请求 URL: /api/admin/link/update
请求参数(form表单)
字段名
类型
描述
是否必须
id
int64
友链ID
是
title
string
名称
否
url
string
URL
否
seq
int
序号
否
validTime
int64
有效时间(UNIX 时间戳)
否
remark
string
备注
否
返回结果
1{2"code":1,3"data":null,4"message":"更新成功"5}
13. 获取友链信息
请求方法: POST
请求 URL: /api/admin/link/getLinkInfo
请求参数(form表单)
字段名
类型
描述
是否必须
id
int64
友链ID
是
返回结果
1{2"code":1,3"data":{4"id":1,// id5"title":"Sample Link Title",// 标题6"url":"https://example.com",// 链接到的 URL7"seq":1,// 序号,从小到大排序8"createTime":"2024-08-22T15:30:00Z",// 创建时间9"updateTime":"2024-08-22T15:45:00Z",// 修改时间10"validTime":"2024-12-31T23:59:59Z",// 有效时间11"remark":"This is a sample remark.",// 备注12"status":1// 状态: 0-已下架;1-正常13},14"message":"获取成功"15}
14. 获取友链
请求方法: POST
请求 URL: /api/admin/link/getLinkList
请求参数(form表单)
字段名
类型
描述
是否必须
pageNum
int
分页页码
是
pageSize
int
分页大小
是
status
int
友链状态:0-已下架;1-已上架;-1-全部
是
返回结果
1{2"code":1,3"data":{4"count":1122,5"list":[6{7"id":1,// id8"title":"Sample Link Title",// 标题9"url":"https://example.com",// 链接到的 URL10"seq":1,// 序号,从小到大排序11"createTime":"2024-08-22T15:30:00Z",// 创建时间12"updateTime":"2024-08-22T15:45:00Z",// 修改时间13"validTime":"2024-12-31T23:59:59Z",// 有效时间14"remark":"This is a sample remark.",// 备注15"status":1// 状态: 0-已下架;1-正常16}17]18},19"message":"获取成功"20}
1{2"code":1,3"data":{4"count":11212,// 总条数5"list":[6{7"id":1234567890123456789,// 公告 ID8"title":"Sample Notice Title",// 公告标题9"content":"This is the content of the notice.",// 公告内容10"createTime":"2024-08-22T15:30:00Z",// 创建时间11"updateTime":"2024-08-22T15:45:00Z",// 更新时间12"validTime":"2024-12-31T23:59:59Z",// 有效时间13"status":1// 公告状态(1-上架, 0-下架)14}15]16},17"message":"获取成功"18}
29. 获取通知详情
请求方法: POST
请求 URL: /api/admin/notice/getNoticeInfo
请求参数
字段名
类型
描述
是否必须
id
int64
通知ID
是
返回结果
1{2"code":1,3"data":{4"id":1234567890123456789,// 公告 ID5"title":"Sample Notice Title",// 公告标题6"content":"This is the content of the notice.",// 公告内容7"createTime":"2024-08-22T15:30:00Z",// 创建时间8"updateTime":"2024-08-22T15:45:00Z",// 更新时间9"validTime":"2024-12-31T23:59:59Z",// 有效时间10"status":1// 公告状态(1-上架, 0-下架)11},12"message":"获取成功"13}
30. 创建专栏
请求方法: POST
请求 URL: /api/admin/special/create
请求参数
字段名
类型
描述
是否必须
title
string
名称
否
intro
string
介绍
否
cover
string
封面
否
返回结果
1{2"code":1,3"data":null,4"message":"创建成功"5}
31. 更新专栏
请求方法: POST
请求 URL: /api/admin/special/update
请求参数
字段名
类型
描述
是否必须
id
int64
专栏ID
否
title
string
名称
否
intro
string
介绍
否
cover
string
封面
否
status
int
状态:10-未发布;20-已删除;30-已发布
否
返回结果
1{2"code":1,3"data":null,4"message":"更新成功"5}
32. 搜索专栏
请求方法: POST
请求 URL: /api/admin/special/searchSpecial
请求参数
字段名
类型
描述
是否必须
pageNum
int
分页页码
是
pageSize
int
分页大小
是
word
string
关键字
否
status
int
博客的状态值:10-已创建;20-已下架;30-已发布
否
返回结果
1{2"code":1,3"data":{4"count":1231231,// 总条数5"list":[6{7"id":1,// id8"title":"Sample Special Title",// 标题9"intro":"This is a brief introduction.",// 简介10"cover":"https://example.com/cover.jpg",// 封面11"createTime":"2024-08-22T15:30:00Z",// 创建时间12"updateTime":"2024-08-22T15:45:00Z",// 更新时间13"publishTime":"2024-08-23T09:00:00Z",// 发布时间14"status":30,// 状态15"totalCount":23432,// 总小节数16"publishedCount":112// 已发布的小节数17}18]19},20"message":"获取数据成功"21}
33. 专栏添加小节
请求方法: POST
请求 URL: /api/admin/special/addSection
请求参数
字段名
类型
描述
是否必须
specialId
int64
专栏ID
是
title
string
小节标题
否
seq
int
排序
否
返回结果
1{2"code":1,3"data":null,4"message":"添加成功"5}
34. 专栏更新小节
请求方法: POST
请求 URL: /api/admin/special/updateSection
请求参数
字段名
类型
描述
是否必须
specialId
int64
所属专栏 ID
是
sectionId
int64
小节 ID
是
title
string
小节的标题
否
intro
string
小节的简介,暂时用不到
否
content
string
md 编辑器产生的内容,对应的 md 内容
否
html
string
md 编辑器产生的内容,对应的生成的 HTML
否
tags
string
标签,英文逗号分隔,如:"并发,线程,Java"
否
isHtml
int
0:md 编辑器产生的内容,1:富文本编辑器产生的内容
否
readCount
int64
阅读数
否
seq
int
序号,从小到大排序,默认 100
否
status
int
小节状态 10-已创建;20-已下架;30-已发布
否
返回结果
1{2"code":1,3"data":null,4"message":"更新成功"5}
35. 专栏获取小节列表
请求方法: POST
请求 URL: /api/admin/special/getSectionList
请求参数
字段名
类型
描述
是否必须
specialId
int64
所属专栏 ID
是
status
int
小节状态 10-已创建;20-已下架;30-已发布
否
返回结果
1{2"code":1,3"data":{4"count":12321,// 总条数5"list":[6{7"id":1,// 小节 ID8"title":"Sample Section Title",// 小节的标题9"intro":"This is a brief introduction.",// 小节的简介,暂时用不到10"content":"This is the Markdown content.",// md 编辑器产生的内容,对应的 md 内容11"html":"<p>This is the generated HTML content.</p>",// md 编辑器产生的内容,对应的生成的 HTML12"tags":"并发,线程,Java",// 标签,英文逗号分隔,如:"并发,线程,Java"13"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容14"readCount":1234,// 阅读数15"specialId":9876543210123456789,// 所属专栏 ID16"seq":100,// 序号,从小到大排序,默认 10017"createTime":"2024-08-22T15:30:00Z",// 创建时间18"updateTime":"2024-08-22T15:45:00Z",// 更新时间19"publishTime":"2024-08-23T09:00:00Z",// 发布时间20"status":30// 小节状态21}22]23},24"message":"获取数据成功"25}
36. 专栏获取小节详情
请求方法: POST
请求 URL: /api/admin/special/getSectionDetail
请求参数
字段名
类型
描述
是否必须
sectionId
int64
小节 ID
是
返回结果
1{2"code":1,3"data":{4"id":1,// 小节 ID5"title":"Sample Section Title",// 小节的标题6"intro":"This is a brief introduction.",// 小节的简介,暂时用不到7"content":"This is the Markdown content.",// md 编辑器产生的内容,对应的 md 内容8"html":"<p>This is the generated HTML content.</p>",// md 编辑器产生的内容,对应的生成的 HTML9"tags":"并发,线程,Java",// 标签,英文逗号分隔,如:"并发,线程,Java"10"isHtml":1,// 0:md 编辑器产生的内容,1:富文本编辑器产生的内容11"readCount":1234,// 阅读数12"specialId":9876543210123456789,// 所属专栏 ID13"seq":100,// 序号,从小到大排序,默认 10014"createTime":"2024-08-22T15:30:00Z",// 创建时间15"updateTime":"2024-08-22T15:45:00Z",// 更新时间16"publishTime":"2024-08-23T09:00:00Z",// 发布时间17"status":30// 小节状态18},19"message":"获取小节详情成功"20}