@fenjuly
2015-07-24T12:33:10.000000Z
字数 4872
阅读 1317
SUCCESS = 0;//成功
ERROR = 1;//出错
EXISTS = 6;//已存在
NOT_EXISTS = 7;//不存在
INVALID_OPERATION = 13;//非法操作
添加一个大学生
{
"account": "fenjuly",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": 2,
"influence": null
}
account
,password
返回:
{
"status": 0,
"body": 6 //此字段为id字段
}
url:"/api/student"
{
"id": 1,
"account": "fenjuly",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": 2,
"influence": null
}
id
返回:
{
"status": 0,
"body": null
}
url:"/api/student/{id}"
返回:
{
"status": 0,
"body": null
}
url:"/api/student/{id}"
返回:
{
"status": 0,
"body": {
"id": 1,
"account": "fenjuly",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": 2,
"influence": null,
"picture": {
"id": 2,
"url": "ffsafdsfa",
"type": null,
"ownerId": null
}
}
}
url:"/api/students"
queryId
//要查询的大学生的idtype
//0 代查询一度人脉,1代表查询二度人脉返回:
{
"status": 0,
"body": [
{
"id": 2,
"account": "fenjuly",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": null,
"influence": null,
"picture": null
},
{
"id": 3,
"account": "fenjuly2",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": null,
"influence": null,
"picture": null
}
]
}
url:"/api/authentication"
{
"id": 1,
"account": "fenjuly",
"password": "woshixiaohai",
"name": "liurongchan",
"sex": null,
"birthday": null,
"admissionDate": null,
"school": null,
"profession": null,
"company": null,
"position": null,
"wechatId": null,
"qqNumber": null,
"phone": null,
"description": null,
"pictureId": 2,
"influence": null
}
account
,password
{
"status": 0,
"body": null
}
{
"student1": "3",
"student2": "5"
}
student1
,student2
{
"status": 0,
"body": null
}
添加一个毕业去向
{
"studentId": "3",
"destination": "考研"
}
studentId
,destination
返回:
{
"status": 0,
"body": null
}
{
"id": "1",
"studentId": "3",
"destination": "考研"
}
id
返回:
{
"status": 0,
"body": null
}
返回:
{
"status": 0,
"body": null
}
studentId
{
"status": 0,
"body": {
"id": "1",
"studentId": "3",
"destination": "考研"
}
}
添加一条微博
{
"detail": "有一种预感,爱就要离岸",
"click": "3",
"studentId": "1",
"pictureId": "1"
}
{
"status": 0,
"body": null
}
更新一条微博
{
"id": "1",
"detail": "有一种预感,爱就要离岸",
"click": "3",
"studentId": "1",
"pictureId": "1"
}
id
{
"status": 0,
"body": null
}
删除一条微博
{
"status": 0,
"body": null
}
查看某条微博具体内容
{
"status": 0,
"body": {
"id": 1,
"detail": "woshi fdsaf",
"click": null,
"studentId": 1,
"pictureId": null,
"picture": null
}
}
查看一度人脉微博或个人微博
studentId
//要查询的人的id type
0 代表自己的微博 1 代表一度人脉的微博{
"status": 0,
"body": [
{
"id": 8,
"detail": "woshi fdsafsafasfsdf",
"click": null,
"studentId": 4,
"pictureId": 1,
"picture": {
"id": 1,
"url": "ffsafdsfa",
"type": null,
"ownerId": null
}
},
{
"id": 5,
"detail": "woshi fdsafsafasfsdf",
"click": null,
"studentId": 5,
"pictureId": null,
"picture": null
},
{
"id": 6,
"detail": "woshi fdsafsafasfsdf",
"click": null,
"studentId": 5,
"pictureId": null,
"picture": null
},
{
"id": 7,
"detail": "woshi fdsafsafasfsdf",
"click": null,
"studentId": 5,
"pictureId": 1,
"picture": {
"id": 1,
"url": "ffsafdsfa",
"type": null,
"ownerId": null
}
}
]
}
添加一条评论
{
"detail": "有一种预感,爱就要离岸",
"microblogId": "3",
"studentId": "1"
}
studentId
, mircroblogId
{
"status": 0,
"body": null
}
更新一条评论
{
"id": "1"
"detail": "有一种预感,爱就要离岸",
"microblogId": "3",
"studentId": "1"
}
id
{
"status": 0,
"body": null
}
删除一条评论
{
"status": 0,
"body": null
}
查询某一条评论
{
"status": 0,
"body": {
"id": "1"
"detail": "有一种预感,爱就要离岸",
"microblogId": "3",
"studentId": "1"
}
}
查询某一个微博的所有评论
{
"status": 0,
"body": [{
"id": "1"
"detail": "有一种预感,爱就要离岸",
"microblogId": "3",
"studentId": "1"
},
{
"id": "2"
"detail": "有一种预感,爱就要离岸",
"microblogId": "3",
"studentId": "1"
}]
}