[关闭]
@JackieQu 2018-06-12T17:03:21.000000Z 字数 2580 阅读 291

学生管理

因相关表关系修改此部分目前无法使用

橙旭园


获取所有学生课程信息

Method and Url Structure

Method Resource URL
GET /student/manage/

cURL Example

  1. curl -X GET
  2. # 默认按上课时间倒序
  3. http://localhost:8000/server/student/manage/
  4. # 根据课程筛选
  5. # 注意:kind 需要 unicode 编码
  6. http://localhost:8000/server/student/manage/?kind=\u521b\u4f5c

JSON Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 1,
  8. "owner": "13263699826",
  9. "name": "我吃柠檬",
  10. "nickname": "柠檬",
  11. "teacher_info": {
  12. "owner": "17611237765"
  13. },
  14. "room_info": {
  15. "status": "unfinish",
  16. "endtime": "2018-01-31T21:00:00",
  17. "starttime": "2018-01-31T19:50:00"
  18. },
  19. "course_info": {
  20. "name": "橙旭园scratch创作(四)",
  21. "time": "2018-01-25T11:45:42.016166"
  22. }
  23. }
  24. ]
  25. }

根据电话搜索学生、老师

Method and Url Structure

Method Resource URL
GET /student/search/?owenr=

cURL Example

  1. curl -X GET
  2. http://localhost:8000/server/student/search?owner=2222222

JSON Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 2,
  8. "owner": "1111111",
  9. "name": "买了个包",
  10. "nickname": "密密麻麻",
  11. "teacher_info": {
  12. "owner": "17611237765"
  13. },
  14. "room_info": null,
  15. "course_info": {
  16. "name": "abced",
  17. "time": "2018-01-26T15:44:57.824667"
  18. }
  19. }
  20. ]
  21. }

获取学生教室列表、课程记录

Method and Url Structure

Method Resource URL
GET /student/room/
GET /student/record/

cURL Example

  1. curl -X GET
  2. http://localhost:8000/server/student/room/?owner=13263699826
  3. # 课程记录
  4. http://localhost:8000/server/student/record/?owner=13263699826

JSON Response

  1. {
  2. "count": 3,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 4,
  8. "name": "MMSD",
  9. "schedule_info": {
  10. "endtime": "2018-01-31T21:00:00",
  11. "starttime": "2018-01-31T19:50:00"
  12. },
  13. "status": "unfinish",
  14. "status_display": "未完成"
  15. },
  16. {
  17. "pk": 2,
  18. "name": "f sa",
  19. "schedule_info": {
  20. "endtime": "2018-01-10T00:00:00",
  21. "starttime": "2018-01-10T19:53:00"
  22. },
  23. "status": "finish",
  24. "status_display": "已完成"
  25. },
  26. {
  27. "pk": 1,
  28. "name": "发顺丰",
  29. "schedule_info": {
  30. "endtime": "2018-01-08T12:00:00",
  31. "starttime": "2018-01-08T06:00:00"
  32. },
  33. "status": "finish",
  34. "status_display": "已完成"
  35. }
  36. ]
  37. }
  38. # 课程记录
  39. {
  40. "count": 2,
  41. "next": null,
  42. "previous": null,
  43. "results": [
  44. {
  45. "course_name": "橙旭园scratch创作(四)",
  46. "create_time": "2018-01-25T11:45:42.016166"
  47. },
  48. {
  49. "course_name": "第一阶段:儿童编程-基础套餐8岁及以上",
  50. "create_time": "2018-01-25T11:43:30.467804"
  51. }
  52. ]
  53. }

根据条件筛选

Method and Url Structure

Method Resource URL
GET /student/sift/?kind=

cURL Example

  1. curl -X GET
  2. http://localhost:8000/server/student/sift/?kind=absent
  3. # 未续费(已购买课程的课时数和等于已结束的教室数)
  4. http://localhost:8000/server/student/sift/?kind=nopay

JSON Response

  1. {
  2. "count": 1,
  3. "next": null,
  4. "previous": null,
  5. "results": [
  6. {
  7. "pk": 1,
  8. "owner": "13263699826",
  9. "name": "我吃柠檬",
  10. "nickname": "柠檬",
  11. "teacher_info": {
  12. "owner": "17611237765"
  13. },
  14. "room_info": {
  15. "status": "unfinish",
  16. "endtime": "2018-01-31T21:00:00",
  17. "starttime": "2018-01-31T19:50:00"
  18. },
  19. "course_info": {
  20. "name": "橙旭园scratch创作(四)",
  21. "time": "2018-01-25T11:45
  22. -
  23. 列表项
  24. ---
  25. :42.016166"
  26. }
  27. }
  28. ]
  29. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注