前端-业务逻辑
/api/{version}/teacher
-
/lists
- parameters: null
- description: 获取所有教师信息
- method: GET
- response:
{ "status": "success", "data": [{ "teacherId": 100001, "teacherName": "王XX", "teacherAvatar": "http://img/dsadsa.jpg", "teacherCollege": "电子信息与人工智能学院", "commentNumber": 1000 }] }
-
/lists/{id}
- parameters: null
- description: 获取教师的详细信息
- method: GET
- response:
{ "status": "success", "data": { "teacherId": 100001, "teacherName": "王XX", "teacherAvatar": "http://img/dsadsa.jpg", "teacherCollege": "电子信息与人工智能学院", "teacherIntroduction": "优秀教师", "teacherDegree": "博士", "commentNumber": 1000, } }
-
/lists/{id}
- parameters: null
- description: 获取教师的评论信息
- method: PUT
- response:
{ "status": "success", "data": [{ "commentId": 10000001, "commentContent": "好老师", "commentDate": 12345656, "UserVO": { "userId": 1000001, "userName": "XXX", "userAvatar": "http://img/dsasdadsa.jpg", } "is_anonymous": 0 }] }
/api/{version}/comment
- /send
- parameters: content, user_id, is_anonymous
- description: 发送评论
- method: POST
- response:
{ "status": "success", "data": {"发送成功"} }
业务逻辑-数据库
/api/{version}/model
-
/user
- parameters: null
- description: 获取所有用户
- method: GET
- response: List
[{ "userId": 1000001, "username": "袁国宁", "userAvatar": "http://img/4156456.jpg" "yibanAccount": "123746586" }]
-
/user/{id}
- parameters: id
- description: 通过id获取用户
- method: GET
- response: UserModel
{ "userId": 1000001, "username": "袁国宁", "userAvatar": "http://img/4156456.jpg" "yibanAccount": "123746586" }
-
/teacher
- parameters: null
- description: 获取所有教师信息
- method: GET
- response:
[{ "teacherId": 100001, "teacherName": "王XX", "teacherAvatar": "http://img/dsadsa.jpg", "teacherCollege": "电子信息与人工智能学院", "teacherIntroduction": "优秀教师", "teacherDegree": "博士", "commentNumber": 1000 }]
-
/teacher/{id}
- parameters: id
- description: 通过id获取教师信息
- method: GET
- response:
{ "teacherId": 100001, "teacherName": "王XX", "teacherAvatar": "http://img/dsadsa.jpg", "teacherCollege": "电子信息与人工智能学院", "teacherIntroduction": "优秀教师", "teacherDegree": "博士", "commentNumber": 1000 }
-
/comment/{teacherId}
- parameters: teacherId
- description: 获取该教师的所有评论信息
- method: GET
- response: TeacherModel
[{ "commentId": 100001 "commentDate": 1231236 "commentContent": "好老师" "userId": 100001 "teacherId": 10001 "isAnonymous": 0 }]
-
/comment/{teacherId}
- parameters:
[{ "commentId": null "commentDate": 1231236 "commentContent": "好老师" "userId": 100001 "teacherId": 10001 "isAnonymous": 0 }]
- description: 提交该教师的评论信息
- method: POST
- response: null
- parameters:
dataobject
- UserDO
userId: int
username: String
userAvatar: String
yibanAccount: String
- TeacherDO
teacherId: int
teacherName: String
teacherCollege: String
teacherAvatar: String
teacherIntroduction: String
teacherDegree: String
- CommentDO
commentId: int
commentDate: Date
commentContent: String
isAnonymous: boolean
userId: int
teacherId: int
model
- UserModel
userId: int
username: String
userAvatar: String
yibanAccount: String
- TeacherModel
teacherId: int
teacherName: String
teacherAvatar: String
teacherIntroduction: String
teacherCollege: String
teacherDegree: String
commentNumber: int
- CommentModel
commentId: int
teacherId: int
userId: int
commentDate: Date
commentContent: String
isAnonymous: boolean
viewobject
- TeacherListsVO
teacherId: int
teacherName: String
teacherAvatar: String
teacherCollege: String
commentNumber: int
- TeacherDetailVO
teacherId: int
teacherName: String
teacherAvatar: String
teacherCollege: String
teacherDegree: String
commentNumber: int
- CommentDetailVO
commentId: int
CommentContent: String
CommentDate: Date
CommentUser: UserVO
IsAnonymous: boolean
- UserVO
userId: int
username: String
userAvatar: String