diff --git a/珞珈岛-项目相关文件/luojia-island/API.json b/珞珈岛-项目相关文件/luojia-island/API.json new file mode 100644 index 0000000..c77291c --- /dev/null +++ b/珞珈岛-项目相关文件/luojia-island/API.json @@ -0,0 +1,1638 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "珞珈岛API文档", + "description": "API文档", + "version": "1.0" + }, + "servers": [ + { + "url": "http://localhost:8081", + "description": "Generated server url" + } + ], + "tags": [ + { + "name": "评论模块", + "description": "评论相关接口" + }, + { + "name": "关注模块", + "description": "用户之间互相关注模块" + }, + { + "name": "用户信息管理", + "description": "用户修改个人信息相关接口" + }, + { + "name": "聊天模块", + "description": "好友聊天模块相关接口" + }, + { + "name": "帖子模块", + "description": "帖子相关接口" + }, + { + "name": "用户管理", + "description": "用户登陆注册相关接口" + } + ], + "paths": { + "/post": { + "put": { + "tags": [ + "帖子模块" + ], + "summary": "更新帖子", + "operationId": "updatePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSaveDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "更新成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "更新失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + }, + "post": { + "tags": [ + "帖子模块" + ], + "summary": "创建帖子", + "operationId": "savePost", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PostSaveDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "创建失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + }, + "delete": { + "tags": [ + "帖子模块" + ], + "summary": "删除帖子", + "operationId": "deletePost", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "删除失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/post/like/{id}": { + "put": { + "tags": [ + "帖子模块" + ], + "summary": "点赞帖子", + "operationId": "likePost", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "点赞成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "点赞失败,帖子不存在或被删除", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/follow/{id}/{isFollow}": { + "put": { + "tags": [ + "关注模块" + ], + "summary": "关注用户", + "description": "关注用户,传入用户id和是否关注的状态", + "operationId": "follow", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "isFollow", + "in": "path", + "required": true, + "schema": { + "type": "boolean" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/comment": { + "put": { + "tags": [ + "评论模块" + ], + "summary": "更新评论", + "operationId": "updateComment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentSaveDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "更新成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "更新失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + }, + "post": { + "tags": [ + "评论模块" + ], + "summary": "创建评论", + "operationId": "saveComment", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CommentSaveDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "创建成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "创建失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + }, + "delete": { + "tags": [ + "评论模块" + ], + "summary": "删除评论", + "operationId": "deleteComment", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "删除失败,评论不存在或被删除", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/comment/like/{id}": { + "put": { + "tags": [ + "评论模块" + ], + "summary": "点赞评论", + "operationId": "likeComment", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "点赞成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "点赞失败,评论不存在或被删除", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/user/register": { + "post": { + "tags": [ + "用户管理" + ], + "summary": "用户注册", + "description": "支持用户名/手机号/邮箱注册", + "operationId": "register", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserRegisterDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "注册成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultUserDTO" + } + } + } + }, + "500": { + "description": "注册失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultUserDTO" + } + } + } + } + } + } + }, + "/user/logout": { + "post": { + "tags": [ + "用户管理" + ], + "summary": "用户登出", + "operationId": "logout", + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/user/login": { + "post": { + "tags": [ + "用户管理" + ], + "summary": "用户登录", + "description": "支持用户名/手机号/邮箱登录", + "operationId": "login", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserLoginDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "登录成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/UserDTO" + } + } + } + }, + "500": { + "description": "登录失败,用户名或密码错误", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultUserDTO" + } + } + } + } + } + } + }, + "/user/info/update": { + "post": { + "tags": [ + "用户信息管理" + ], + "summary": "修改用户信息", + "operationId": "updateInfo", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserChangeInfoDTO" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "修改成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "修改失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/user/info/password": { + "post": { + "tags": [ + "用户信息管理" + ], + "summary": "用户修改密码", + "operationId": "updatePassword", + "parameters": [ + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "修改成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + }, + "500": { + "description": "修改失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultVoid" + } + } + } + } + } + } + }, + "/user/info/avatar": { + "post": { + "tags": [ + "用户信息管理" + ], + "summary": "用户上传头像", + "operationId": "uploadAvatar", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "上传成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultString" + } + } + } + }, + "500": { + "description": "上传失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultString" + } + } + } + } + } + } + }, + "/sendPrivateMessage": { + "post": { + "tags": [ + "聊天模块" + ], + "summary": "发送私信", + "description": "发送私信给指定用户", + "operationId": "sendPrivateMessage", + "parameters": [ + { + "name": "senderId", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/post/cover": { + "post": { + "tags": [ + "帖子模块" + ], + "summary": "设置帖子封面", + "operationId": "setCover", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "file": { + "type": "string", + "format": "binary" + } + }, + "required": [ + "file" + ] + } + } + } + }, + "responses": { + "200": { + "description": "设置成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultString" + } + } + } + }, + "500": { + "description": "设置失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultString" + } + } + } + } + } + } + }, + "/post/of/me": { + "get": { + "tags": [ + "帖子模块" + ], + "summary": "查看自己的帖子", + "operationId": "pagePostOfMe", + "responses": { + "200": { + "description": "获取成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponsePostBasicInfoDTO" + } + } + } + }, + "500": { + "description": "获取失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponsePostBasicInfoDTO" + } + } + } + } + } + } + }, + "/post/list": { + "get": { + "tags": [ + "帖子模块" + ], + "summary": "分页查询帖子", + "operationId": "pagePost", + "responses": { + "200": { + "description": "获取成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponsePostBasicInfoDTO" + } + } + } + }, + "500": { + "description": "获取失败,请稍后重试", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponsePostBasicInfoDTO" + } + } + } + } + } + } + }, + "/post/detail": { + "get": { + "tags": [ + "帖子模块" + ], + "summary": "根据ID获取帖子详情", + "operationId": "getPostDetail", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "获取成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PostInfoDTO" + } + } + } + }, + "500": { + "description": "获取失败,帖子不存在或被删除", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/PostInfoDTO" + } + } + } + } + } + } + }, + "/follow/or/not/{id}": { + "get": { + "tags": [ + "关注模块" + ], + "summary": "是否关注用户", + "description": "传入用户id,返回是否关注该用户", + "operationId": "isFollow", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultBoolean" + } + } + } + } + } + } + }, + "/follow/common/{id}": { + "get": { + "tags": [ + "关注模块" + ], + "summary": "关注列表", + "description": "传入用户id,返回该用户的关注列表", + "operationId": "followCommons", + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "OK", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultListUserDTO" + } + } + } + } + } + } + }, + "/comment/list": { + "get": { + "tags": [ + "评论模块" + ], + "summary": "根据帖子ID分页获取根评论", + "operationId": "getCommentsByPostId", + "responses": { + "200": { + "description": "获取成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponseCommentInfoDTO" + } + } + } + }, + "500": { + "description": "获取失败,帖子ID不合法", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponseCommentInfoDTO" + } + } + } + } + } + } + }, + "/comment/list/reply": { + "get": { + "tags": [ + "评论模块" + ], + "summary": "根据评论ID获取回复", + "operationId": "getReplyById", + "responses": { + "200": { + "description": "获取成功", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponseCommentInfoDTO" + } + } + } + }, + "500": { + "description": "获取失败,评论ID不合法", + "content": { + "*/*": { + "schema": { + "$ref": "#/components/schemas/ResultPageResponseCommentInfoDTO" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "PostSaveDTO": { + "type": "object", + "description": "帖子保存DTO", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "帖子ID" + }, + "title": { + "type": "string", + "description": "帖子标题", + "example": "帖子标题三个字", + "maxLength": 16, + "minLength": 3 + }, + "image": { + "type": "string", + "description": "帖子封面图" + }, + "content": { + "type": "string", + "description": "帖子内容", + "example": "zsbd", + "maxLength": 10000, + "minLength": 4 + }, + "categoryId": { + "type": "integer", + "format": "int64", + "description": "帖子类型id" + }, + "status": { + "type": "integer", + "format": "int32", + "description": "是否匿名发布,1-匿名,0-不匿名", + "enum": [ + "0", + "1" + ], + "example": 0 + } + }, + "required": [ + "content", + "title" + ] + }, + "ResultVoid": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "description": "响应数据" + } + } + }, + "CommentSaveDTO": { + "type": "object", + "description": "评论保存DTO", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "评论id" + }, + "content": { + "type": "string", + "description": "评论内容", + "example": "+3", + "maxLength": 500, + "minLength": 1 + }, + "postId": { + "type": "integer", + "format": "int64", + "description": "评论的帖子id" + }, + "parentCommentId": { + "type": "integer", + "format": "int64", + "description": "该评论的父评论id" + }, + "topId": { + "type": "integer", + "format": "int64", + "description": "该评论的顶级评论id" + } + }, + "required": [ + "content" + ] + }, + "UserRegisterDTO": { + "type": "object", + "description": "用户注册DTO", + "properties": { + "username": { + "type": "string", + "description": "用户名", + "example": "ttt", + "maxLength": 15, + "minLength": 1 + }, + "password": { + "type": "string", + "format": "password", + "description": "密码", + "example": 123456, + "maxLength": 16, + "minLength": 6 + }, + "phone": { + "type": "string", + "description": "手机号", + "example": 12345678901, + "pattern": "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$" + }, + "email": { + "type": "string", + "description": "邮箱", + "example": "123456@qq.com", + "pattern": "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$" + }, + "studentId": { + "type": "string", + "description": "学生学号,暂不需要" + } + }, + "required": [ + "password", + "username" + ] + }, + "ResultUserDTO": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "$ref": "#/components/schemas/UserDTO", + "description": "响应数据" + } + } + }, + "UserDTO": { + "type": "object", + "properties": { + "userId": { + "type": "integer", + "format": "int64" + }, + "username": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "accessToken": { + "type": "string" + }, + "refreshToken": { + "type": "string" + } + } + }, + "UserLoginDTO": { + "type": "object", + "description": "用户登录DTO", + "properties": { + "userFlag": { + "type": "string", + "description": "用户登录用标志,支持用户名,手机号,邮箱" + }, + "password": { + "type": "string", + "description": "用户登陆用密码", + "maxLength": 16, + "minLength": 6 + } + }, + "required": [ + "password" + ] + }, + "UserChangeInfoDTO": { + "type": "object", + "description": "用户修改信息DTO", + "properties": { + "username": { + "type": "string", + "description": "用户名" + }, + "phone": { + "type": "string", + "description": "手机号,11位数字" + }, + "email": { + "type": "string", + "description": "邮箱" + }, + "studentId": { + "type": "string", + "description": "学生学号" + }, + "avatar": { + "type": "string", + "description": "头像url" + }, + "gender": { + "type": "integer", + "format": "int32", + "description": "性别,0-未知,1-男,2-女", + "enum": [ + "0", + "1", + "2" + ], + "example": 1 + }, + "college": { + "type": "string", + "description": "学院" + } + } + }, + "ResultString": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "type": "string", + "description": "响应数据" + } + } + }, + "MessageRequest": { + "type": "object", + "description": "消息请求对象", + "properties": { + "messageType": { + "type": "integer", + "format": "int32", + "description": "消息类型,0-私信,1-系统通知", + "enum": [ + "0", + "1" + ], + "example": 0 + }, + "content": { + "type": "string", + "description": "消息内容", + "maxLength": 500, + "minLength": 1 + }, + "receiverId": { + "type": "integer", + "format": "int64", + "description": "接收者ID" + }, + "senderName": { + "type": "string", + "description": "发送者用户名" + }, + "senderAvatar": { + "type": "string", + "description": "发送者头像" + } + }, + "required": [ + "content", + "senderAvatar", + "senderName" + ] + }, + "PostPageQueryDTO": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int64" + } + } + }, + "PageResponsePostBasicInfoDTO": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "total": { + "type": "integer", + "format": "int64" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PostBasicInfoDTO" + } + } + } + }, + "PostBasicInfoDTO": { + "type": "object", + "description": "帖子基本信息", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "帖子ID" + }, + "image": { + "type": "string", + "description": "帖子封面图" + }, + "title": { + "type": "string", + "description": "帖子标题", + "example": "帖子标题三个字", + "maxLength": 16, + "minLength": 3 + }, + "likeCount": { + "type": "integer", + "format": "int32", + "description": "点赞数" + }, + "commentCount": { + "type": "integer", + "format": "int32", + "description": "评论数" + }, + "favoriteCount": { + "type": "integer", + "format": "int32", + "description": "收藏数" + }, + "isLike": { + "type": "boolean", + "description": "是否点赞,1-已点赞,0-未点赞", + "enum": [ + "0", + "1" + ], + "example": 1 + }, + "userId": { + "type": "integer", + "format": "int64", + "description": "对应的用户ID" + }, + "userName": { + "type": "string", + "description": "匿名情况下用户名" + }, + "userAvatar": { + "type": "string", + "description": "匿名情况下用户头像" + } + }, + "required": [ + "title" + ] + }, + "ResultPageResponsePostBasicInfoDTO": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "$ref": "#/components/schemas/PageResponsePostBasicInfoDTO", + "description": "响应数据" + } + } + }, + "PostInfoDTO": { + "type": "object", + "description": "修改帖子信息", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "帖子ID" + }, + "image": { + "type": "string", + "description": "帖子封面图" + }, + "title": { + "type": "string", + "description": "帖子标题", + "example": "帖子标题三个字", + "maxLength": 16, + "minLength": 3 + }, + "content": { + "type": "string", + "description": "帖子内容", + "example": "zsbd", + "maxLength": 10000, + "minLength": 4 + }, + "likeCount": { + "type": "integer", + "format": "int32", + "description": "点赞数" + }, + "commentCount": { + "type": "integer", + "format": "int32", + "description": "评论数" + }, + "favoriteCount": { + "type": "integer", + "format": "int32", + "description": "收藏数" + }, + "isLike": { + "type": "boolean", + "description": "是否点赞,1-已点赞,0-未点赞", + "enum": [ + "0", + "1" + ], + "example": 1 + }, + "userId": { + "type": "integer", + "format": "int64", + "description": "对应用户ID" + }, + "userName": { + "type": "string", + "description": "匿名情况下用户名" + }, + "userAvatar": { + "type": "string", + "description": "匿名情况下用户头像" + } + }, + "required": [ + "content", + "title" + ] + }, + "ResultBoolean": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "type": "boolean", + "description": "响应数据" + } + } + }, + "ResultListUserDTO": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "type": "array", + "description": "响应数据", + "items": { + "$ref": "#/components/schemas/UserDTO" + } + } + } + }, + "CommentPageQueryDTO": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "postId": { + "type": "integer", + "format": "int64", + "title": "帖子ID" + }, + "commentId": { + "type": "integer", + "format": "int64", + "title": "评论ID" + } + }, + "title": "分页查询评论请求DTO" + }, + "CommentInfoDTO": { + "type": "object", + "description": "评论信息", + "properties": { + "id": { + "type": "integer", + "format": "int64", + "description": "评论id" + }, + "content": { + "type": "string", + "description": "评论内容", + "example": "+3", + "maxLength": 500, + "minLength": 1 + }, + "likeCount": { + "type": "integer", + "format": "int64", + "description": "评论点赞数" + }, + "replyCount": { + "type": "integer", + "format": "int64", + "description": "评论回复数" + }, + "userId": { + "type": "integer", + "format": "int64", + "description": "评论用户id" + }, + "postId": { + "type": "integer", + "format": "int64", + "description": "评论对应的帖子id" + }, + "parentCommentId": { + "type": "integer", + "format": "int64", + "description": "评论对应的父级评论id" + }, + "topId": { + "type": "integer", + "format": "int64", + "description": "评论对应的顶级评论id" + }, + "createTime": { + "type": "string", + "format": "date-time", + "description": "评论创建时间" + }, + "isLike": { + "type": "boolean", + "description": "当前用户是否对评论点过赞,1-已点赞,0-未点赞", + "enum": [ + "0", + "1" + ], + "example": 1 + }, + "userName": { + "type": "string" + }, + "userAvatar": { + "type": "string" + }, + "commentInfoDTOList": { + "description": "子评论列表" + } + } + }, + "PageResponseCommentInfoDTO": { + "type": "object", + "properties": { + "current": { + "type": "integer", + "format": "int64" + }, + "size": { + "type": "integer", + "format": "int64" + }, + "total": { + "type": "integer", + "format": "int64" + }, + "records": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CommentInfoDTO" + } + } + } + }, + "ResultPageResponseCommentInfoDTO": { + "type": "object", + "description": "统一返回前端的结果", + "properties": { + "code": { + "type": "integer", + "format": "int32", + "description": "状态码" + }, + "msg": { + "type": "string", + "description": "提示消息" + }, + "data": { + "$ref": "#/components/schemas/PageResponseCommentInfoDTO", + "description": "响应数据" + } + } + } + } + } +} \ No newline at end of file diff --git a/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/OpenApiConfig.java b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/OpenApiConfig.java new file mode 100644 index 0000000..896bf44 --- /dev/null +++ b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/OpenApiConfig.java @@ -0,0 +1,21 @@ +package com.luojia_channel.common.config; + +import io.swagger.v3.oas.models.info.Info; +import io.swagger.v3.oas.models.OpenAPI; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +@Configuration +public class OpenApiConfig { + @Bean + public OpenAPI customOpenAPI() { + return new OpenAPI() + .info(new Info() + .title("珞珈岛API文档") + .version("1.0") + .description("API文档") + ); + } +} diff --git a/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/WebMvcConfig.java b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/WebMvcConfig.java index 45f7801..ea9d94f 100644 --- a/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/WebMvcConfig.java +++ b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/config/WebMvcConfig.java @@ -19,7 +19,8 @@ public class WebMvcConfig implements WebMvcConfigurer { "/post/list", "/post/detail", "/comment/list", - "/comment/list/reply" + "/comment/list/reply", + "/openapi/luojia-channel" ); } diff --git a/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/domain/Result.java b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/domain/Result.java index 5c754b5..4942109 100644 --- a/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/domain/Result.java +++ b/珞珈岛-项目相关文件/luojia-island/common/src/main/java/com/luojia_channel/common/domain/Result.java @@ -1,12 +1,19 @@ package com.luojia_channel.common.domain; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; // 统一返回前端的结果 @Data +@Schema(description = "统一返回前端的结果") public class Result { + @Schema(description = "状态码") private int code; + + @Schema(description = "提示消息") private String msg; + + @Schema(description = "响应数据") private T data; public Result(int code, String msg, T data) { this.code = code; diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/OpenApiConfig.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/OpenApiConfig.class new file mode 100644 index 0000000..ccd2e33 Binary files /dev/null and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/OpenApiConfig.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/RedisConfig.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/RedisConfig.class index 10d6bc4..658a2e9 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/RedisConfig.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/RedisConfig.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/WebMvcConfig.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/WebMvcConfig.class index 3da92f5..5bd8b8c 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/WebMvcConfig.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/config/WebMvcConfig.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/Result.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/Result.class index ea2fa90..01b0a6a 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/Result.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/Result.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO$UserDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO$UserDTOBuilder.class index 6c5d7b1..c9d7c99 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO$UserDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO$UserDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO.class index de8ef17..17f4da3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/UserDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageRequest.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageRequest.class index 723de76..0f1b2e9 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageRequest.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageRequest.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse$PageResponseBuilder.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse$PageResponseBuilder.class index 72d3829..9fc0167 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse$PageResponseBuilder.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse$PageResponseBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse.class index b559dd5..3de0d3d 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/domain/page/PageResponse.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/interceptor/AuthInterceptor.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/interceptor/AuthInterceptor.class index 8ee05b1..0f5c82c 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/interceptor/AuthInterceptor.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/interceptor/AuthInterceptor.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/JWTUtil.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/JWTUtil.class index 2810290..96e8a6e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/JWTUtil.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/JWTUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/PageUtil.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/PageUtil.class index 49acd38..041869d 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/PageUtil.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/PageUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil$ZSetItem.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil$ZSetItem.class index caa76be..a2cec13 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil$ZSetItem.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil$ZSetItem.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil.class index a43c72b..792a00e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/RedisUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/UserContext.class b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/UserContext.class index c140c14..700abd7 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/UserContext.class and b/珞珈岛-项目相关文件/luojia-island/common/target/classes/com/luojia_channel/common/utils/UserContext.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/pom.xml b/珞珈岛-项目相关文件/luojia-island/pom.xml index c0249b9..ff51003 100644 --- a/珞珈岛-项目相关文件/luojia-island/pom.xml +++ b/珞珈岛-项目相关文件/luojia-island/pom.xml @@ -112,6 +112,14 @@ org.springframework.boot spring-boot-starter-websocket + + + + org.springdoc + springdoc-openapi-starter-webmvc-ui + 2.8.8 + + diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/file/dto/UploadFileDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/file/dto/UploadFileDTO.java index 70350f3..fe856ba 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/file/dto/UploadFileDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/file/dto/UploadFileDTO.java @@ -1,5 +1,6 @@ package com.luojia_channel.modules.file.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -8,10 +9,23 @@ import org.springframework.web.multipart.MultipartFile; @Data @AllArgsConstructor @Builder +@Schema(description = "上传文件DTO") public class UploadFileDTO { + @Schema( + description = "文件名", + required = true + ) private MultipartFile file; + // 文件类型,image or video + @Schema( + description = "文件类型" + ) private String fileType; + // 文件md5 + @Schema( + description = "文件md5" + ) private String fileMd5; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/ChatController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/ChatController.java index 16c4600..4a79a87 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/ChatController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/ChatController.java @@ -2,6 +2,8 @@ package com.luojia_channel.modules.interact.controller; import com.luojia_channel.modules.message.dto.MessageRequest; import com.luojia_channel.modules.message.server.WebSocketServer; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; @@ -10,11 +12,17 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequiredArgsConstructor +@Tag(name = "聊天模块", description = "好友聊天模块相关接口") public class ChatController { private WebSocketServer webSocketServer; @PostMapping("/sendPrivateMessage") + @Operation( + summary = "发送私信", + description = "发送私信给指定用户", + tags = {"聊天模块"} + ) public String sendPrivateMessage(@RequestParam Long senderId, @RequestBody MessageRequest request) { try { webSocketServer.sendPrivateMessage(senderId, request); diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/FollowController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/FollowController.java index c6a6860..0a96dbe 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/FollowController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/controller/FollowController.java @@ -3,6 +3,8 @@ package com.luojia_channel.modules.interact.controller; import com.luojia_channel.common.domain.Result; import com.luojia_channel.common.domain.UserDTO; import com.luojia_channel.modules.interact.service.FollowService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -12,19 +14,35 @@ import java.util.List; @RestController @RequestMapping("/follow") @RequiredArgsConstructor +@Tag(name = "关注模块", description = "用户之间互相关注模块") public class FollowController { private final FollowService followService; @PutMapping("/{id}/{isFollow}") + @Operation( + summary = "关注用户", + description = "关注用户,传入用户id和是否关注的状态", + tags = {"关注模块"} + ) public Result follow(@PathVariable("id") Long followUserId, @PathVariable("isFollow") Boolean isFollow){ followService.follow(followUserId, isFollow); return Result.success(); } @GetMapping("/or/not/{id}") + @Operation( + summary = "是否关注用户", + description = "传入用户id,返回是否关注该用户", + tags = {"关注模块"} + ) public Result isFollow(@PathVariable("id") Long followUserId){ return Result.success(followService.isFollow(followUserId)); } @GetMapping("/common/{id}") + @Operation( + summary = "关注列表", + description = "传入用户id,返回该用户的关注列表", + tags = {"关注模块"} + ) public Result> followCommons(@PathVariable("id") Long id){ return Result.success(followService.followCommons(id)); } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/entity/Follow.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/entity/Follow.java index e7fd08d..f8e7b1f 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/entity/Follow.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/interact/entity/Follow.java @@ -3,6 +3,7 @@ package com.luojia_channel.modules.interact.entity; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; @@ -10,6 +11,7 @@ import java.time.LocalDateTime; @Data @TableName("follow") +@Schema(description = "关注表") public class Follow implements Serializable { @@ -22,16 +24,25 @@ public class Follow implements Serializable { /** * 用户id */ + @Schema( + description = "用户id" + ) private Long userId; /** * 关联的用户id */ + @Schema( + description = "关联的用户id" + ) private Long followUserId; /** * 创建时间 */ + @Schema( + description = "创建时间" + ) private LocalDateTime createTime; diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageRequest.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageRequest.java index 697a737..d1b9047 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageRequest.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageRequest.java @@ -1,5 +1,6 @@ package com.luojia_channel.modules.message.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -9,10 +10,38 @@ import lombok.NoArgsConstructor; @Builder @NoArgsConstructor @AllArgsConstructor +@Schema(description = "消息请求对象") public class MessageRequest { + @Schema( + description = "消息类型,0-私信,1-系统通知", + allowableValues = {"0", "1"}, + example = "0", + implementation = Integer.class + ) private Integer messageType; // 私信0,系统通知1 + + @Schema( + description = "消息内容", + required = true, + minLength = 1, + maxLength = 500 + ) private String content; // 消息内容 + + @Schema( + description = "接收者ID" + ) private Long receiverId; // 接收者ID + + @Schema( + description = "发送者用户名", + required = true + ) private String senderName; // 用户名 + + @Schema( + description = "发送者头像", + required = true + ) private String senderAvatar; // 用户头像 } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageResponse.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageResponse.java index a899139..ccd0ded 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageResponse.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/message/dto/MessageResponse.java @@ -1,5 +1,6 @@ package com.luojia_channel.modules.message.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -11,12 +12,48 @@ import java.time.LocalDateTime; @Builder @NoArgsConstructor @AllArgsConstructor +@Schema(description = "消息返回对象") public class MessageResponse { + @Schema( + description = "消息类型,0-私信,1-系统通知", + allowableValues = {"0", "1"}, + example = "0", + implementation = Integer.class + ) private Integer messageType; // 私信0,系统通知1 + + @Schema( + description = "消息内容", + required = true, + minLength = 1, + maxLength = 500 + ) private String content; // 消息内容 + + @Schema( + description = "发送者ID" + ) private Long senderId; + + @Schema( + description = "接收者ID" + ) private Long receiverId; // 接收者ID + + @Schema( + description = "发送者用户名", + required = true + ) private String senderName; // 用户名 + + @Schema( + description = "发送者头像", + required = true + ) private String senderAvatar; // 用户头像 + + @Schema( + description = "消息创建时间" + ) private LocalDateTime createTime; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/CommentController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/CommentController.java index be21f3b..f8ef058 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/CommentController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/CommentController.java @@ -9,6 +9,10 @@ import com.luojia_channel.modules.post.dto.resp.CommentInfoDTO; import com.luojia_channel.modules.post.entity.Comment; import com.luojia_channel.modules.post.service.CommentService; import com.luojia_channel.modules.post.utils.ValidatePostUtil; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -18,12 +22,21 @@ import java.util.List; @RequiredArgsConstructor @RestController @RequestMapping("/comment") +@Tag(name = "评论模块", description = "评论相关接口") public class CommentController { private final CommentService commentService; // 创建评论 @PostMapping + @Operation( + summary = "创建评论", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "创建成功"), + @ApiResponse(responseCode = "500", description = "创建失败,请稍后重试") + }) public Result saveComment(@RequestBody CommentSaveDTO commentSaveDTO) { commentService.saveComment(commentSaveDTO); return Result.success(); @@ -31,6 +44,14 @@ public class CommentController { // 更新评论 @PutMapping + @Operation( + summary = "更新评论", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "更新成功"), + @ApiResponse(responseCode = "500", description = "更新失败,请稍后重试") + }) public Result updateComment(@RequestBody CommentSaveDTO commentSaveDTO) { commentService.updateComment(commentSaveDTO); return Result.success(); @@ -38,6 +59,14 @@ public class CommentController { // 删除评论 @DeleteMapping + @Operation( + summary = "删除评论", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "删除成功"), + @ApiResponse(responseCode = "500", description = "删除失败,评论不存在或被删除") + }) public Result deleteComment(@RequestParam("id") Long id) { commentService.deleteComment(id); return Result.success(); @@ -45,6 +74,14 @@ public class CommentController { // 根据帖子ID分页获取根评论 @GetMapping("/list") + @Operation( + summary = "根据帖子ID分页获取根评论", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "获取成功"), + @ApiResponse(responseCode = "500", description = "获取失败,帖子ID不合法") + }) public Result> getCommentsByPostId(@RequestBody CommentPageQueryDTO commentPageQueryDTO) { PageResponse commentList = commentService.getCommentsByPostId(commentPageQueryDTO); return Result.success(commentList); @@ -53,6 +90,14 @@ public class CommentController { // 根据评论ID获取回复 @GetMapping("/list/reply") + @Operation( + summary = "根据评论ID获取回复", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "获取成功"), + @ApiResponse(responseCode = "500", description = "获取失败,评论ID不合法") + }) public Result> getReplyById(@RequestBody CommentPageQueryDTO commentPageQueryDTO) { PageResponse commentInfoDTOList = commentService.getReplyById(commentPageQueryDTO); return Result.success(commentInfoDTOList); @@ -60,6 +105,14 @@ public class CommentController { // 点赞评论 @PutMapping("/like/{id}") + @Operation( + summary = "点赞评论", + tags = {"评论模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "点赞成功"), + @ApiResponse(responseCode = "500", description = "点赞失败,评论不存在或被删除") + }) public Result likeComment(@PathVariable("id") Long id) { commentService.likeComment(id); return Result.success(); diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/PostController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/PostController.java index e7fc622..8bd6860 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/PostController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/controller/PostController.java @@ -8,6 +8,10 @@ import com.luojia_channel.modules.post.dto.req.PostPageQueryDTO; import com.luojia_channel.modules.post.dto.resp.PostBasicInfoDTO; import com.luojia_channel.modules.post.dto.resp.PostInfoDTO; import com.luojia_channel.modules.post.service.PostService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -15,12 +19,21 @@ import org.springframework.web.multipart.MultipartFile; @RequiredArgsConstructor @RestController @RequestMapping("/post") +@Tag(name = "帖子模块", description = "帖子相关接口") public class PostController { private final PostService postService; // 创建帖子 @PostMapping + @Operation( + summary = "创建帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "创建成功"), + @ApiResponse(responseCode = "500", description = "创建失败,请稍后重试") + }) public Result savePost(@RequestBody PostSaveDTO postSaveDTO) { postService.savePost(postSaveDTO); return Result.success(); @@ -28,12 +41,28 @@ public class PostController { // 设置帖子封面 @PostMapping("/cover") + @Operation( + summary = "设置帖子封面", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "设置成功"), + @ApiResponse(responseCode = "500", description = "设置失败,请稍后重试") + }) public Result setCover(@RequestParam("file") MultipartFile file){ return Result.success(postService.setCover(file)); } // 更新帖子 @PutMapping + @Operation( + summary = "更新帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "更新成功"), + @ApiResponse(responseCode = "500", description = "更新失败,请稍后重试") + }) public Result updatePost(@RequestBody PostSaveDTO postSaveDTO) { postService.updatePost(postSaveDTO); return Result.success(); @@ -41,6 +70,14 @@ public class PostController { // 删除帖子 @DeleteMapping + @Operation( + summary = "删除帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "删除成功"), + @ApiResponse(responseCode = "500", description = "删除失败,请稍后重试") + }) public Result deletePost(@RequestParam("id") Long id) { postService.deletePost(id); return Result.success(); @@ -48,24 +85,56 @@ public class PostController { // 根据ID获取帖子详情 @GetMapping("/detail") + @Operation( + summary = "根据ID获取帖子详情", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "获取成功"), + @ApiResponse(responseCode = "500", description = "获取失败,帖子不存在或被删除") + }) public PostInfoDTO getPostDetail(@RequestParam("id") Long id) { return postService.getPostDetail(id); } // 分页查询帖子 @GetMapping("/list") + @Operation( + summary = "分页查询帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "获取成功"), + @ApiResponse(responseCode = "500", description = "获取失败,请稍后重试") + }) public Result> pagePost(@RequestBody PostPageQueryDTO postPageQueryDTO) { return Result.success(postService.pagePost(postPageQueryDTO)); } // 查看自己的帖子 @GetMapping("/of/me") + @Operation( + summary = "查看自己的帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "获取成功"), + @ApiResponse(responseCode = "500", description = "获取失败,请稍后重试") + }) public Result> pagePostOfMe(@RequestBody PostPageQueryDTO postPageQueryDTO) { return Result.success(postService.pagePostOfMe(postPageQueryDTO)); } // 点赞帖子 @PutMapping("/like/{id}") + @Operation( + summary = "点赞帖子", + tags = {"帖子模块"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "点赞成功"), + @ApiResponse(responseCode = "500", description = "点赞失败,帖子不存在或被删除") + }) public Result likePost(@PathVariable("id") Long id) { postService.likePost(id); return Result.success(); diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.java index 3af2096..6fe1058 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.java @@ -1,10 +1,15 @@ package com.luojia_channel.modules.post.dto.req; import com.luojia_channel.common.domain.page.PageRequest; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(title = "分页查询评论请求DTO") public class CommentPageQueryDTO extends PageRequest { + @Schema(title = "帖子ID") private Long postId; + + @Schema(title = "评论ID") private Long commentId; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.java index 7affcbd..4a67bc2 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.java @@ -1,5 +1,6 @@ package com.luojia_channel.modules.post.dto.req; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -11,10 +12,34 @@ import java.time.LocalDateTime; @NoArgsConstructor @AllArgsConstructor @Builder +@Schema(description = "评论保存DTO") public class CommentSaveDTO { + @Schema( + description = "评论id" + ) private Long id; + + @Schema( + description = "评论内容", + required = true, + minLength = 1, + maxLength = 500, + example = "+3" + ) private String content; + + @Schema( + description = "评论的帖子id" + ) private Long postId; + + @Schema( + description = "该评论的父评论id" + ) private Long parentCommentId; + + @Schema( + description = "该评论的顶级评论id" + ) private Long topId; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/PostSaveDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/PostSaveDTO.java index de2299a..9b428be 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/PostSaveDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/req/PostSaveDTO.java @@ -1,13 +1,49 @@ package com.luojia_channel.modules.post.dto.req; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "帖子保存DTO") public class PostSaveDTO { + @Schema( + description = "帖子ID" + ) private Long id; + + @Schema( + description = "帖子标题", + required = true, + minLength = 3, + maxLength = 16, + example = "帖子标题三个字" + ) private String title; + + @Schema( + description = "帖子封面图" + ) private String image; + + @Schema( + description = "帖子内容", + required = true, + minLength = 4, + maxLength = 10000, + example = "zsbd" + ) private String content; + + @Schema( + description = "帖子类型id" + ) private Long categoryId; + + @Schema( + description = "是否匿名发布,1-匿名,0-不匿名", + allowableValues = {"0", "1"}, + example = "0", + implementation = Integer.class + ) private Integer status; // 是否匿名 } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.java index 595f9be..e63aeb9 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.java @@ -1,5 +1,6 @@ package com.luojia_channel.modules.post.dto.resp; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -12,21 +13,69 @@ import java.util.List; @NoArgsConstructor @AllArgsConstructor @Builder +@Schema(description = "评论信息") public class CommentInfoDTO { + @Schema( + description = "评论id" + ) private Long id; + + @Schema( + description = "评论内容", + minLength = 1, + maxLength = 500, + example = "+3" + ) private String content; + + @Schema( + description = "评论点赞数" + ) private Long likeCount; + + @Schema( + description = "评论回复数" + ) private Long replyCount; + + @Schema( + description = "评论用户id" + ) private Long userId; + + @Schema( + description = "评论对应的帖子id" + ) private Long postId; + + @Schema( + description = "评论对应的父级评论id" + ) private Long parentCommentId; + + @Schema( + description = "评论对应的顶级评论id" + ) private Long topId; + + @Schema( + description = "评论创建时间" + ) private LocalDateTime createTime; + @Schema( + description = "当前用户是否对评论点过赞,1-已点赞,0-未点赞", + allowableValues = {"0", "1"}, + example = "1", + implementation = Boolean.class + ) private Boolean isLike; private String userName; private String userAvatar; + @Schema( + description = "子评论列表" + ) private List commentInfoDTOList; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.java index d8f7514..d5ab265 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.java @@ -1,20 +1,65 @@ package com.luojia_channel.modules.post.dto.resp; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "帖子基本信息") public class PostBasicInfoDTO { + @Schema( + description = "帖子ID" + ) private Long id; + + @Schema( + description = "帖子封面图" + ) private String image; + + @Schema( + description = "帖子标题", + required = true, + minLength = 3, + maxLength = 16, + example = "帖子标题三个字" + ) private String title; + + @Schema( + description = "点赞数" + ) private Integer likeCount; + + @Schema( + description = "评论数" + ) private Integer commentCount; + + @Schema( + description = "收藏数" + ) private Integer favoriteCount; + @Schema( + description = "是否点赞,1-已点赞,0-未点赞", + allowableValues = {"0", "1"}, + example = "1", + implementation = Boolean.class + ) private Boolean isLike; + + @Schema( + description = "对应的用户ID" + ) private Long userId; // 对于匿名的帖子,下述字段进行了处理,如匿名默认名称,头像 + @Schema( + description = "匿名情况下用户名" + ) private String userName; + @Schema( + description = "匿名情况下用户头像" + ) private String userAvatar; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.java index 7ed0806..4a7963a 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.java @@ -1,21 +1,75 @@ package com.luojia_channel.modules.post.dto.resp; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "修改帖子信息") public class PostInfoDTO { + @Schema( + description = "帖子ID" + ) private Long id; + + @Schema( + description = "帖子封面图" + ) private String image; + + @Schema( + description = "帖子标题", + required = true, + minLength = 3, + maxLength = 16, + example = "帖子标题三个字" + ) private String title; + + @Schema( + description = "帖子内容", + required = true, + minLength = 4, + maxLength = 10000, + example = "zsbd" + ) private String content; + + @Schema( + description = "点赞数" + ) private Integer likeCount; + + @Schema( + description = "评论数" + ) private Integer commentCount; + + @Schema( + description = "收藏数" + ) private Integer favoriteCount; + @Schema( + description = "是否点赞,1-已点赞,0-未点赞", + allowableValues = {"0", "1"}, + example = "1", + implementation = Boolean.class + ) private Boolean isLike; + + @Schema( + description = "对应用户ID" + ) private Long userId; // 对于匿名的帖子,下述字段进行了处理,如匿名默认名称,头像 + @Schema( + description = "匿名情况下用户名" + ) private String userName; + + @Schema( + description = "匿名情况下用户头像" + ) private String userAvatar; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserInfoController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserInfoController.java index 239e36c..7359c8c 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserInfoController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserInfoController.java @@ -4,6 +4,10 @@ import com.luojia_channel.common.domain.Result; import com.luojia_channel.modules.file.dto.UploadFileDTO; import com.luojia_channel.modules.user.dto.UserChangeInfoDTO; import com.luojia_channel.modules.user.service.UserInfoService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; @@ -11,21 +15,46 @@ import org.springframework.web.multipart.MultipartFile; @RestController @RequestMapping("/user/info") @RequiredArgsConstructor +@Tag(name = "用户信息管理", description = "用户修改个人信息相关接口") public class UserInfoController { private final UserInfoService userInfoService; @PostMapping("/update") + @Operation( + summary="修改用户信息", + tags = {"用户信息管理"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "修改成功"), + @ApiResponse(responseCode = "500", description = "修改失败,请稍后重试") + }) public Result updateInfo(@RequestBody UserChangeInfoDTO userChangeInfoDTO){ userInfoService.updateInfo(userChangeInfoDTO); return Result.success(); } @PostMapping("/password") + @Operation( + summary="用户修改密码", + tags = {"用户信息管理"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "修改成功"), + @ApiResponse(responseCode = "500", description = "修改失败,请稍后重试") + }) public Result updatePassword(@RequestParam String password){ userInfoService.updatePassword(password); return Result.success(); } @PostMapping("/avatar") + @Operation( + summary="用户上传头像", + tags = {"用户信息管理"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "上传成功"), + @ApiResponse(responseCode = "500", description = "上传失败,请稍后重试") + }) public Result uploadAvatar(@RequestParam("file") MultipartFile file) { return Result.success(userInfoService.uploadAvatar(file)); } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserLoginController.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserLoginController.java index 1a3347e..03ff900 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserLoginController.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/controller/UserLoginController.java @@ -5,6 +5,13 @@ import com.luojia_channel.common.domain.UserDTO; import com.luojia_channel.modules.user.dto.UserLoginDTO; import com.luojia_channel.modules.user.dto.UserRegisterDTO; import com.luojia_channel.modules.user.service.UserLoginService; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; +import io.swagger.v3.oas.annotations.tags.Tag; import jakarta.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -12,25 +19,50 @@ import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/user") @RequiredArgsConstructor +@Tag(name = "用户管理", description = "用户登陆注册相关接口") public class UserLoginController { private final UserLoginService userLoginService; @PostMapping("/login") + @Operation( + summary = "用户登录", + description = "支持用户名/手机号/邮箱登录", + tags = {"用户管理"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "登录成功",content = @Content(schema = @Schema(implementation = UserDTO.class))), + @ApiResponse(responseCode = "500", description = "登录失败,用户名或密码错误") + }) public Result login(@RequestBody UserLoginDTO userLoginDTO){ return Result.success(userLoginService.login(userLoginDTO)); } @PostMapping("/register") + @Operation( + summary = "用户注册", + description = "支持用户名/手机号/邮箱注册", + tags = {"用户管理"} + ) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", description = "注册成功"), + @ApiResponse(responseCode = "500", description = "注册失败,请稍后重试") + }) public Result register(@RequestBody UserRegisterDTO userRegisterDTO){ return Result.success(userLoginService.register(userRegisterDTO)); } @PostMapping("/logout") + @Operation( + summary = "用户登出", + tags = {"用户管理"} + ) public Result logout(HttpServletRequest request){ userLoginService.logout(request); return Result.success(); } + @Hidden @PostMapping("/hello") + @Operation(summary = "测试接口") public Result hello(){ return Result.success("hello"); } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.java index 210ff7b..0a286ea 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.java @@ -1,20 +1,46 @@ package com.luojia_channel.modules.user.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "用户修改信息DTO") public class UserChangeInfoDTO { + @Schema( + description = "用户名" + ) private String username; + @Schema( + description = "手机号,11位数字" + ) private String phone; + @Schema( + description = "邮箱" + ) private String email; + @Schema( + description = "学生学号" + ) private String studentId; + @Schema( + description = "头像url" + ) private String avatar; + @Schema( + description = "性别,0-未知,1-男,2-女", + allowableValues = {"0", "1", "2"}, + example = "1", + implementation = Integer.class + ) private Integer gender; + @Schema( + description = "学院" + ) private String college; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserLoginDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserLoginDTO.java index e544b75..fe391d6 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserLoginDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserLoginDTO.java @@ -1,11 +1,22 @@ package com.luojia_channel.modules.user.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "用户登录DTO") public class UserLoginDTO { // 用户标志,支持学号,手机号,邮箱 + @Schema( + description = "用户登录用标志,支持用户名,手机号,邮箱" + ) private String userFlag; + @Schema( + description = "用户登陆用密码", + required = true, + minLength = 6, + maxLength = 16 + ) private String password; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserRegisterDTO.java b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserRegisterDTO.java index fd149cc..b213d2d 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserRegisterDTO.java +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/java/com/luojia_channel/modules/user/dto/UserRegisterDTO.java @@ -1,16 +1,44 @@ package com.luojia_channel.modules.user.dto; +import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; @Data +@Schema(description = "用户注册DTO") public class UserRegisterDTO { + @Schema( + description = "用户名", + example = "ttt", + required = true, + minLength = 1, + maxLength = 15 + ) private String username; + @Schema( + description = "密码", + example = "123456", + required = true, + minLength = 6, + maxLength = 16, + format = "password" + ) private String password; + @Schema( + description = "手机号", + example = "12345678901", + pattern = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$" + ) private String phone; + @Schema( + description = "邮箱", + example = "123456@qq.com", + pattern = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$" + ) private String email; + @Schema(description = "学生学号,暂不需要") private String studentId; } diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml index 20fec36..4fbcddd 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application-local.yaml @@ -1,36 +1,36 @@ -# 本地开发环境 -# lj: -# db: -# host: localhost -# password: 123456 -# redis: -# host: localhost -# port: 6379 -# password: 123456 -# rabbitmq: -# host: localhost -# port: 15672 -# username: root -# password: 123456 -# minio: -# endpoint: http://localhost:9000 -# accessKey: minioadmin -# secretKey: minioadmin +#本地开发环境 + lj: + db: + host: localhost + password: 123456 + redis: + host: localhost + port: 6379 + password: 123456 + rabbitmq: + host: localhost + port: 15672 + username: root + password: 123456 + minio: + endpoint: http://localhost:9000 + accessKey: minioadmin + secretKey: minioadmin -lj: - db: - host: 192.168.59.129 - password: Forely123! - redis: - host: 192.168.59.129 - port: 6379 - password: Forely123! - rabbitmq: - host: 192.168.59.129 - port: 5672 - username: admin - password: Forely123! - minio: - endpoint: http://192.168.59.129:9000 - accessKey: forely - secretKey: Forely123! +#lj: +# db: +# host: 192.168.59.129 +# password: Forely123! +# redis: +# host: 192.168.59.129 +# port: 6379 +# password: Forely123! +# rabbitmq: +# host: 192.168.59.129 +# port: 5672 +# username: admin +# password: Forely123! +# minio: +# endpoint: http://192.168.59.129:9000 +# accessKey: forely +# secretKey: Forely123! diff --git a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application.yaml b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application.yaml index 2baa5e6..a4a4521 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/src/main/resources/application.yaml @@ -1,5 +1,8 @@ server: port: 8081 +springdoc: + api-docs: + path: /openapi/luojia-channel spring: application: name: service diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/application-local.yaml b/珞珈岛-项目相关文件/luojia-island/service/target/classes/application-local.yaml index 20fec36..4fbcddd 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/target/classes/application-local.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/target/classes/application-local.yaml @@ -1,36 +1,36 @@ -# 本地开发环境 -# lj: -# db: -# host: localhost -# password: 123456 -# redis: -# host: localhost -# port: 6379 -# password: 123456 -# rabbitmq: -# host: localhost -# port: 15672 -# username: root -# password: 123456 -# minio: -# endpoint: http://localhost:9000 -# accessKey: minioadmin -# secretKey: minioadmin +#本地开发环境 + lj: + db: + host: localhost + password: 123456 + redis: + host: localhost + port: 6379 + password: 123456 + rabbitmq: + host: localhost + port: 15672 + username: root + password: 123456 + minio: + endpoint: http://localhost:9000 + accessKey: minioadmin + secretKey: minioadmin -lj: - db: - host: 192.168.59.129 - password: Forely123! - redis: - host: 192.168.59.129 - port: 6379 - password: Forely123! - rabbitmq: - host: 192.168.59.129 - port: 5672 - username: admin - password: Forely123! - minio: - endpoint: http://192.168.59.129:9000 - accessKey: forely - secretKey: Forely123! +#lj: +# db: +# host: 192.168.59.129 +# password: Forely123! +# redis: +# host: 192.168.59.129 +# port: 6379 +# password: Forely123! +# rabbitmq: +# host: 192.168.59.129 +# port: 5672 +# username: admin +# password: Forely123! +# minio: +# endpoint: http://192.168.59.129:9000 +# accessKey: forely +# secretKey: Forely123! diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/application.yaml b/珞珈岛-项目相关文件/luojia-island/service/target/classes/application.yaml index 2baa5e6..a4a4521 100644 --- a/珞珈岛-项目相关文件/luojia-island/service/target/classes/application.yaml +++ b/珞珈岛-项目相关文件/luojia-island/service/target/classes/application.yaml @@ -1,5 +1,8 @@ server: port: 8081 +springdoc: + api-docs: + path: /openapi/luojia-channel spring: application: name: service diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO$CompleteUploadDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO$CompleteUploadDTOBuilder.class index 08e5e9d..5fdce66 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO$CompleteUploadDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO$CompleteUploadDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO.class index e12c4ea..e7e5572 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/CompleteUploadDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO$UploadChunkDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO$UploadChunkDTOBuilder.class index 6fb9feb..2190746 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO$UploadChunkDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO$UploadChunkDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO.class index 7c6b1d8..7158ade 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadChunkDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO$UploadFileDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO$UploadFileDTOBuilder.class index 7a93c3a..0b1c7bf 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO$UploadFileDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO$UploadFileDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO.class index 03c6774..55b8640 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/dto/UploadFileDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile$LjFileBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile$LjFileBuilder.class index d2d69f7..b7bf51f 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile$LjFileBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile$LjFileBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile.class index 016ed9f..f5d7a2e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/entity/LjFile.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/service/impl/FileServiceImpl.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/service/impl/FileServiceImpl.class index 1f614e4..0543b86 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/service/impl/FileServiceImpl.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/service/impl/FileServiceImpl.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/utils/ValidateFileUtil.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/utils/ValidateFileUtil.class index 173e9f7..0c6409e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/utils/ValidateFileUtil.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/file/utils/ValidateFileUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/ChatController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/ChatController.class index 72df823..935aabf 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/ChatController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/ChatController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/FollowController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/FollowController.class index 7c94e6c..1179ab3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/FollowController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/controller/FollowController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/entity/Follow.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/entity/Follow.class index 6582d08..9f48183 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/entity/Follow.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/entity/Follow.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/service/impl/FollowServiceImpl.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/service/impl/FollowServiceImpl.class index 4fd57cc..274f92a 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/service/impl/FollowServiceImpl.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/interact/service/impl/FollowServiceImpl.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest$MessageRequestBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest$MessageRequestBuilder.class index 60a681d..8fb836b 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest$MessageRequestBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest$MessageRequestBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest.class index 95b232e..9d5b67e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageRequest.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse$MessageResponseBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse$MessageResponseBuilder.class index 12d5eab..87e59f3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse$MessageResponseBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse$MessageResponseBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse.class index c723f83..e373231 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/dto/MessageResponse.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/entity/MessageDO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/entity/MessageDO.class index 84847ae..1347a1d 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/entity/MessageDO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/entity/MessageDO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/AbstractSendProduceTemplate.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/AbstractSendProduceTemplate.class index cb56f9d..9d10011 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/AbstractSendProduceTemplate.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/AbstractSendProduceTemplate.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO$BaseSendExtendDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO$BaseSendExtendDTOBuilder.class index e01512b..acad21c 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO$BaseSendExtendDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO$BaseSendExtendDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO.class index 4a1f3d2..c1f317a 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/BaseSendExtendDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper$MessageWrapperBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper$MessageWrapperBuilder.class index a62f142..19d371c 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper$MessageWrapperBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper$MessageWrapperBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper.class index 17c6378..68ade87 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/MessageWrapper.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage$NotificationMessageBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage$NotificationMessageBuilder.class index 4b2e805..87221b3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage$NotificationMessageBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage$NotificationMessageBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage.class index d535fb2..69fa888 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/message/mq/domain/NotificationMessage.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/CommentController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/CommentController.class index 2d192a7..ef7c8ec 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/CommentController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/CommentController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/PostController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/PostController.class index f11bd91..c7ee98b 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/PostController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/controller/PostController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.class index 1fa052e..7e59974 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentPageQueryDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO$CommentSaveDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO$CommentSaveDTOBuilder.class index f72b0e2..e85115d 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO$CommentSaveDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO$CommentSaveDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.class index df00a6f..f0bb006 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/CommentSaveDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/PostSaveDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/PostSaveDTO.class index 4c53328..b265d63 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/PostSaveDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/req/PostSaveDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO$CommentInfoDTOBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO$CommentInfoDTOBuilder.class index a6f43a0..8e887e3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO$CommentInfoDTOBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO$CommentInfoDTOBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.class index aeb04b2..2166613 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/CommentInfoDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.class index d6efdf6..4e76f42 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostBasicInfoDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.class index 710aca9..1d14de0 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/dto/resp/PostInfoDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment$CommentBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment$CommentBuilder.class index 6f7d7fa..38040fc 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment$CommentBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment$CommentBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment.class index 31431b9..ebe5d44 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Comment.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post$PostBuilder.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post$PostBuilder.class index 045d2f8..6a40318 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post$PostBuilder.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post$PostBuilder.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post.class index 3d64655..e659d75 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/entity/Post.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/CommentServiceImpl.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/CommentServiceImpl.class index b9783a1..84bea48 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/CommentServiceImpl.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/CommentServiceImpl.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/PostServiceImpl.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/PostServiceImpl.class index 0fa5568..69b44e2 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/PostServiceImpl.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/post/service/impl/PostServiceImpl.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserInfoController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserInfoController.class index 74c5f87..e1f4af3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserInfoController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserInfoController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserLoginController.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserLoginController.class index 87c8815..32e1a26 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserLoginController.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/controller/UserLoginController.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.class index ef8130d..b267107 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserChangeInfoDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserLoginDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserLoginDTO.class index ea99ddc..a446c9e 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserLoginDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserLoginDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserRegisterDTO.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserRegisterDTO.class index 32f9074..fa0acf3 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserRegisterDTO.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/dto/UserRegisterDTO.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/entity/User.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/entity/User.class index 0dac3fc..2a6f89d 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/entity/User.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/entity/User.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/service/impl/UserLoginServiceImpl.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/service/impl/UserLoginServiceImpl.class index c303f83..59625b9 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/service/impl/UserLoginServiceImpl.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/service/impl/UserLoginServiceImpl.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/AnonymousUserUtil.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/AnonymousUserUtil.class index e5ccb7d..99b7971 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/AnonymousUserUtil.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/AnonymousUserUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/ValidateUserUtil.class b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/ValidateUserUtil.class index 3414faa..0a61216 100644 Binary files a/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/ValidateUserUtil.class and b/珞珈岛-项目相关文件/luojia-island/service/target/classes/com/luojia_channel/modules/user/utils/ValidateUserUtil.class differ diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue index 5d79cd1..8dbabbd 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Login.vue @@ -222,7 +222,7 @@ export default { }else{ //登录失败 ElMessage({ - message: '登陆失败,请检查用户名或密码', + message: '登陆失败,用户名或密码错误', type: 'error', duration: 500 }); diff --git a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Register.vue b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Register.vue index 54ac995..8a979a0 100644 --- a/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Register.vue +++ b/珞珈岛-项目相关文件/luojia-island/vue-frontend/src/components/Register.vue @@ -241,7 +241,7 @@ export default { emit('toggleForm'); } else { ElMessage({ - message: '注册失败', + message: '注册失败,请稍后重试', type: 'error', duration: 500 });