[关闭]
@fenjuly 2015-07-24T12:33:10.000000Z 字数 4872 阅读 1317

后台API

总体

大学生

  1. 添加一个大学生

    • url:"/api/student"
    • method: POST
    • body:
      {
      "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字段
      }

      1. 更新一个大学生
    • url:"/api/student"

    • method: PATCH
    • 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
      }
    • 必须字段: id
    • 返回:
      {
      "status": 0,
      "body": null
      }

      1. 删除一个大学生
    • url:"/api/student/{id}"

    • method: DELETE
    • 返回:
      {
      "status": 0,
      "body": null
      }

      1. 查询个人资料
    • url:"/api/student/{id}"

    • method: GET
    • 返回:
      {
      "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
      }
      }
      }

      1. 查询人脉
    • url:"/api/students"

    • method: GET
    • parameter:
      • queryId//要查询的大学生的id
      • type //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
      }
      ]
      }

      1. 检验账户(登录)
    • url:"/api/authentication"

    • method: POST
    • 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
      }
    • 必须字段: account,password
    • 返回:
      {
      "status": 0,
      "body": null
      }

好友

毕业去向

  1. 添加一个毕业去向

    • url:"/api/graduaedestination"
    • method: POST
    • body:
      {
      "studentId": "3",
      "destination": "考研"
      }
    • 必须字段: studentId,destination
    • 返回:
      {
      "status": 0,
      "body": null
      }

      1. 更新一个毕业去向
    • url:"/api/graduaedestination"
    • method: PATCH
    • body:
      {
      "id": "1",
      "studentId": "3",
      "destination": "考研"
      }
    • 必须字段: id
    • 返回:
      {
      "status": 0,
      "body": null
      }

      1. 删除一个毕业去向
    • url:"/api/graduaedestination/{id}"
    • method: DELETE
    • 返回:
      {
      "status": 0,
      "body": null
      }

      1. 查询某个人的毕业去向
    • url:"/api/graduaedestination"
    • method: GET
    • parameter: studentId
    • 返回:
      {
      "status": 0,
      "body": {
      "id": "1",
      "studentId": "3",
      "destination": "考研"
      }
      }

微博

  1. 添加一条微博

    • url:"/api/microblog"
    • method: POST
    • body:
      {
      "detail": "有一种预感,爱就要离岸",
      "click": "3",
      "studentId": "1",
      "pictureId": "1"
      }
    • 必须字段: `studentId``
    • 返回:
      {
      "status": 0,
      "body": null
      }
  2. 更新一条微博

    • url:"/api/microblog"
    • method: PATCH
    • body:
      {
      "id": "1",
      "detail": "有一种预感,爱就要离岸",
      "click": "3",
      "studentId": "1",
      "pictureId": "1"
      }
    • 必须字段: id
    • 返回:
      {
      "status": 0,
      "body": null
      }
  3. 删除一条微博

    • url:"/api/microblog/{id}"
    • method: DELETE
    • 返回:
      {
      "status": 0,
      "body": null
      }
  4. 查看某条微博具体内容

    • url:"/api/microblog/{id}"
    • method: GET
    • 返回:
      {
      "status": 0,
      "body": {
      "id": 1,
      "detail": "woshi fdsaf",
      "click": null,
      "studentId": 1,
      "pictureId": null,
      "picture": null
      }
      }
  5. 查看一度人脉微博或个人微博

    • url:"/api/microblogs"
    • method: GET
    • parameter:
      * studentId//要查询的人的id
      * type0 代表自己的微博 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
      }
      }
      ]
      }

评论

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注