[关闭]
@big-bear 2017-04-26T06:15:44.000000Z 字数 2915 阅读 1090

康颐手机端接口修改0426

云宝 api


model修改

PhysicalReport extends BaseEntity (体检报告)

  1. String title; //标题
  2. String contents; //内容
  3. String picPath; //图片地址
  4. Integer createTime;//开始时间
  5. //新增字段
  6. Customer customer;

ExecutionReport (执行报告)

  1. Integer createTime; //创建时间
  2. String title; //名称
  3. String content; //内容
  4. Integer checkScore; //签到分数
  5. Integer mealScore; //膳食分数
  6. Integer sportScore; //运动分数
  7. Integer medicationScore; //用药分数
  8. Integer recoveryScore; //康复分数
  9. //新增字段
  10. Customer customer

新增model

RelCustomerScheme extends BaseEntity(用户-方案关联)

  1. Customer customer;
  2. Scheme scheme;

档案

体检报告

  1. {
  2. filter[customer][id]:74
  3. sort[createTime]:desc
  4. }
  1. {
  2. "data": [
  3. {
  4. "type": "physicalReport",
  5. "id": "4",
  6. "attributes": {
  7. "contents": "123131",
  8. "createTime": 1493049600,
  9. "delStatus": 0,
  10. "title": "111"
  11. },
  12. "relationships": {
  13. ...
  14. },
  15. "links": {
  16. "self": "http://localhost:9080/api/physicalReport/4"
  17. }
  18. },
  19. ...
  20. ],
  21. "included": []
  22. }

评估报告

  1. {
  2. filter[customer][id]:74
  3. sort[createDateTime]:desc
  4. }
  1. {
  2. "data": [
  3. {
  4. "type": "evaluateresult",
  5. "id": "41",
  6. "attributes": {
  7. "lastUpdateDateTime": 1491903947,
  8. "score": "15",
  9. "contents": "永恒岛开香炉的小盗贼",
  10. "delStatus": 0,
  11. "batch": 0,
  12. "createDateTime": 1491903947
  13. },
  14. "relationships": {
  15. ...
  16. },
  17. "links": {
  18. "self": "http://localhost:9080/api/evaluateresult/41"
  19. }
  20. },
  21. ...
  22. ],
  23. "included": [
  24. ...
  25. ]
  26. }

执行报告

  1. {
  2. filter[customer][id]:74
  3. sort[createTime]:desc
  4. }
  1. {
  2. "data": [
  3. {
  4. "type": "executionReport",
  5. "id": "1",
  6. "attributes": {
  7. "checkScore": 1,
  8. "medicationScore": 4,
  9. "recoveryScore": 5,
  10. "sportScore": 3,
  11. "delStatus": 0,
  12. "title": "asdf",
  13. "mealScore": 2,
  14. "content": "5456"
  15. },
  16. "relationships": {
  17. ...
  18. },
  19. "links": {
  20. "self": "http://localhost:9080/api/executionReport/1"
  21. }
  22. },
  23. ...
  24. ],
  25. "included": []
  26. }

方案

膳食

当前膳食方案
  1. {
  2. filter[customer][id]:74
  3. sort[scheme][createTime]:desc
  4. filter[scheme][isChose]:1
  5. filter[scheme][type][typecode]:schemeType1
  6. }

获取当前膳食方案时候有带上参数 filter[scheme][isChose]:1
如果获取列表,把这个参数去掉
- 返回值

  1. {
  2. "data": [
  3. {
  4. "type": "relCustomerScheme",
  5. "id": "1",
  6. "attributes": {
  7. "delStatus": 0
  8. },
  9. "relationships": {
  10. ...
  11. },
  12. "links": {
  13. "self": "http://localhost:9080/api/relCustomerScheme/1"
  14. }
  15. },
  16. ...
  17. ],
  18. "included": [
  19. {
  20. "type": "scheme",
  21. "id": "3",
  22. "attributes": {
  23. "picPath": "2017-04-16/1491469072_3c109932ea9d1fce5e339f077b8bfc21.jpg",
  24. "contents": "333",
  25. "delStatus": 0,
  26. "title": "333",
  27. "url": "333",
  28. "isChose": 0
  29. },
  30. "relationships": {
  31. ...
  32. },
  33. "links": {
  34. "self": "http://localhost:9080/api/scheme/3"
  35. }
  36. },
  37. ...
  38. ]
  39. }

运动

当前运动方案
  1. {
  2. filter[customer][id]:74
  3. sort[scheme][createTime]:desc
  4. filter[scheme][isChose]:1
  5. filter[scheme][type][typecode]:schemeType2
  6. }

获取当前运动方案时候有带上参数 filter[scheme][isChose]:1
如果获取列表,把这个参数去掉
- 返回值

  1. {
  2. "data": [
  3. {
  4. "type": "relCustomerScheme",
  5. "id": "1",
  6. "attributes": {
  7. "delStatus": 0
  8. },
  9. "relationships": {
  10. ...
  11. },
  12. "links": {
  13. "self": "http://localhost:9080/api/relCustomerScheme/1"
  14. }
  15. },
  16. ...
  17. ],
  18. "included": [
  19. {
  20. "type": "scheme",
  21. "id": "3",
  22. "attributes": {
  23. "picPath": "2017-04-16/1491469072_3c109932ea9d1fce5e339f077b8bfc21.jpg",
  24. "contents": "333",
  25. "delStatus": 0,
  26. "title": "333",
  27. "url": "333",
  28. "isChose": 0
  29. },
  30. "relationships": {
  31. ...
  32. },
  33. "links": {
  34. "self": "http://localhost:9080/api/scheme/3"
  35. }
  36. },
  37. ...
  38. ]
  39. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注