注:如果没有写明请求或返回参数可在swagger查看(Try it out)
### 1 、/entrance/register (注册 )
注:注册使用邮箱发送验证码
请求参数
{
"code": "string", 验证码
"email": "string", 邮箱
"nickname": "string", 昵称
"password": "string" 密码
}
{
"code": "string", 验证码 (通过接口会获得一张图片)
"email": "string", 邮箱
"password": "string" 密码
}
无需参数通过登录时存于cookie进行校验判断
请求参数 :
参数(String) | 说明 |
---|---|
id | 用户id |
{
"id": "111", 用户id
"nickname": "111", 昵称
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg", 头像
"major": "11", 专业
"grade": 1, 年级
"follow": 0, 我的关注数量
"fans": 0 粉丝数量
}
请求参数
{
"againPassword": "string", 再次确认
"id": "string", 用户id
"newPassword": "string", 新密码
"password": "string" 旧密码
}
id | 用户id |
---|---|
file | 文件名 |
请求参数 (swagger中其他参数可不写)
{ "grade": 0, 年级
"id": "string", 用户id
"major": "string", 专业
"nickname": "string" 昵称
}
返回参数
{
"avatarUrl": "string",
"grade": 0,
"id": "string",
"major": "string",
"nickname": "string"
}
eg: http://localhost:8080/userattachment/fans?id=1&page=1&per_page=10
id为用户id page为第几页 per_page 为每页的数量
eg: 同上
###4 /userattachment 取消关注
eg: http://localhost:8080/project?page=1&per_page=10
{
"content": [
{
"createdAt": null,
"deleted": 0,
"id": 7, //项目id
"userId": "111", //发起人id
"title": "111", //标题
"projectContent": "11", //项目简介/项目意向
"partnerContent": "11", //队友需求/个人介绍
"conpensation": 1, //是否有偿 0 为无偿 1 为有偿
"type": 1, //0 为找队友 1为找项目
"lastModified": "2019-08-19T12:41:30", //最晚更新时间
"user": { //发起人的信息
"createdAt": null,
"deleted": 0,
"id": "7",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg",
"major": "11",
"grade": 1,
"lastLoginAt": null
},
"label": [] //项目标签
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageSize": 10,
"pageNumber": 0,
"unpaged": false,
"paged": true
},
"totalPages": 1, //总共几页
"totalElements": 1, //几条数据
"last": true,
"size": 10,
"number": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"numberOfElements": 1,
"first": true,
"empty": false
}
请求参数:(表单提交)
label | 项目标签 | 可多个 |
---|---|---|
userId | 用户id | |
type | 0 为找队友 1为找项目 | |
title | 标题 | |
projectContent | 项目简介/项目意向 | |
partnerContent | 队友需求/个人介绍 |
eg:http://localhost:8080/project/myproject?id=3&page=1&per_page=10
id: 当前用户id
type = 0 为找队友 1为找项目
{
"myId": "string", 我的id
"postId": 0, 文章id
"summary": "string", 文章标题
"type": 0, 0 为点赞 1 为取消点赞
"userId": "string" 文章主人id
}
eg:http://localhost:8080/post?board=ARTICLE&id=1&page=1&per_page=10
board为类别 id为用户id(没有时为未登录状态)
返回数据
{
"content": [
{
"id": 13, 文章id
"title": "安师大", 标题
"board": "ARTICLE", 分类
"classification": "其他相关", 二级分类
"content": "爱上大叔大叔蔷薇蔷薇蔷", 内容
"likeCount": 0, 点赞数量
"joinCount": 0, 收藏数量
"lastActiveAt": "2019-08-18T05:48:56", 发布时间
"looked": 0, 观看数量
"isLike": 0, 当前用户是否点赞过 0 未点赞 1 已点赞 未登录时为空
"isCollection": 0, 当前用户是否收藏过 0 未收藏 1 已收藏
"topic": [ 文章标签
"hahaha"
],
"path": [ 图片多张
"MmViOGIzYjMyODAzNDI1YzhkZjNkMjQzYjgyYWI3NTA=.jpg"
],
"userVO": { 用户信息
"id": "13",
"nickname": "asas",
"avatarUrl": "asa"
}
},
{
"id": 12,
"title": "安师大",
"board": "ARTICLE",
"classification": "其他相关",
"content": "爱上大叔大叔蔷薇蔷薇蔷",
"likeCount": 0,
"joinCount": 0,
"lastActiveAt": "2019-08-18T05:48:38",
"looked": 0,
"isLike": 0,
"isCollection": 0,
"topic": [
"hahaha"
],
"path": [],
"userVO": {
"id": "12",
"nickname": "asas",
"avatarUrl": "asa"
}
},
{
"id": 11,
"title": "安师大",
"board": "ARTICLE",
"classification": "其他相关",
"content": "爱上大叔大叔蔷薇蔷薇蔷",
"likeCount": 0,
"joinCount": 0,
"lastActiveAt": "2019-08-18T05:47:32",
"looked": 0,
"isLike": 0,
"isCollection": 0,
"topic": [
"hahaha"
],
"path": [],
"userVO": {
"id": "11",
"nickname": "asas",
"avatarUrl": "asa"
}
},
{
"id": 10,
"title": "安师大",
"board": "ARTICLE",
"classification": "全部文章",
"content": "爱上大叔大叔蔷薇蔷薇蔷",
"likeCount": 0,
"joinCount": 0,
"lastActiveAt": "2019-08-14T20:12:35",
"looked": 0,
"isLike": 0,
"isCollection": 0,
"topic": [],
"path": [
"YTI1MjcxZDc2YmM0NDEwYjhlYzIyMDAyODA0MzMxMWM=.jpg",
"NTMwZWQyZjczOTZkNGY4OTllZGY1ZjE4YjkxYjA1ODQ=.jpg"
],
"userVO": {
"id": "10",
"nickname": "asas",
"avatarUrl": "asa"
}
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageSize": 10,
"pageNumber": 0,
"unpaged": false,
"paged": true
},
"totalPages": 1,
"totalElements": 4,
"last": true,
"size": 10,
"number": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"numberOfElements": 4,
"first": true,
"empty": false
}
返回参数
{
"id": 11,
"title": "安师大",
"board": "ARTICLE",
"classification": "其他相关",
"content": "爱上大叔大叔蔷薇蔷薇蔷",
"likeCount": 0,
"joinCount": 0,
"lastActiveAt": "2019-08-18T05:47:32",
"looked": 1,
"isLike": 0,
"isCollection": 0,
"topic": [
"hahaha"
],
"path": [],
"userVO": {
"id": "11",
"nickname": "asas",
"avatarUrl": "asa"
},
"comment": [ //评论
{
"id": 1, 评论id
"content": "11", 内容
"parentId": 0, 父评论
"lastActiveAt": "2019-08-20T10:16:58"
}
]
}
只能修改标题 内容
注:
board :
ARTICLE(1, "文章"),
QUESTION(2, "问答"),
PROJECT(3, "做项目"),
PRACTICE(4, "实习专栏");
classification:
全部文章(11, "全部文章"),
产品测试(12, "产品测试"),
产品运营(13, "产品运营"),
其他相关(21, "其他相关"),
Java后台(22, "Java后台"),
web前端(23, "web前端");
请求参数 (同文章点赞)
{
"myId": "string",
"postId": 0,
"summary": "string",
"type": 0,
"userId": "string"
}
eg: http://localhost:8080/notification?id=111&page=1&per_page=10
id为用户id
返回参数
{
"code": 0,
"msg": "SUCCESS",
"data": {
"content": [
{
"id": 3, //通知id
"type": 1, //类型
"summary": "asdasdas", //总结
"beRead": 0, //是否已读
"userVO": { //通知用户
"id": "3",
"nickname": "22",
"avatarUrl": "22"
},
"lastModified": "2019-08-18T09:00:12"
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageSize": 10,
"pageNumber": 0,
"unpaged": false,
"paged": true
},
"totalPages": 1,
"totalElements": 1,
"last": true,
"size": 10,
"number": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"numberOfElements": 1,
"first": true,
"empty": false
}
}
注:id为通知id
请求参数
{
"content": "string", //内容
"parentId": 0, //父评论id
"postId": 0, //文章id
"toUserId": "string", //评论用户id
"userId": "string" //被评论用户id
}
### 3 /comment/{id} 根据父评论查找子评论
eg:http://localhost:8080/comment/0 id为某个评论的id
返回参数
[
{
"id": 1,
"content": "11",
"parentId": 0,
"lastActiveAt": "2019-08-20T10:16:58",
"userVO": {
"id": "111",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg"
}
}
]
请求参数 (同文章点赞)
{
"answerId": 0,
"myId": "string",
"summary": "string",
"type": 0,
"userId": "string"
}
返回参数
{
"content": [
{
"id": 1, 回答id
"content": "123123", 回答内容
"likeCount": 0, 点赞总数
"commentCount": 0, 评论总数
"lastModified": "2019-08-15T06:12:56",
"isLike": 0, 未登录默认为0 未点赞为0 已点赞为1
"userVO": { 发表回答的用户信息
"id": "1",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg"
},
"commentVOS": [] //对该回答发表的评论
},
{
"id": 2,
"content": "123123ssssssssssssssssssss",
"likeCount": 0,
"commentCount": 1,
"lastModified": "2019-08-15T06:14:47",
"isLike": 0,
"userVO": {
"id": "2",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg"
},
"commentVOS": [
{
"id": 3,
"content": "123123",
"parentId": 0,
"lastModified": "2019-08-16T04:02:11",
"userVO": {
"id": "111",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg"
}
}
]
}
],
"pageable": {
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"offset": 0,
"pageSize": 10,
"pageNumber": 0,
"unpaged": false,
"paged": true
},
"totalPages": 1,
"totalElements": 2,
"last": true,
"size": 10,
"number": 0,
"sort": {
"sorted": false,
"unsorted": true,
"empty": true
},
"numberOfElements": 2,
"first": true,
"empty": false
}
请求参数
{
"content": "string", 文章内容
"questionId": 0, 问题id
"touserId": "string", 文章主人的用户id
"userId": "string" 我的用户id
}
### 3 /answer 删除回答
eg: http://localhost:8080/answer?id=8&userId=111
{
"answerId": 0, 回答的id
"content": "string", 内容
"parentId": 0, 父评论的id
"postId": 0, 文章的id
"toUserId": "string", 被评论的id
"userId": "string" 评论的人id
}
eg:http://localhost:8080/answercomment?answerId=1&id=1&userId=1
eg: http://localhost:8080/answercomment/0
[
{
"id": 3,
"content": "123123",
"parentId": 0,
"lastModified": "2019-08-16T04:02:11",
"userVO": {
"id": "111",
"nickname": "111",
"avatarUrl": "1a9e5e80-d1ba-49f9-b663-898b03e862cb.jpg"
}
}
]