[关闭]
@15311494814 2017-11-21T07:08:20.000000Z 字数 37159 阅读 581

康保健康后台

java


一、用户登陆相关

1,注册

  1. [POST] rest/hUserController
  2. body:
  3. {
  4. "mobile":"17718577726",
  5. "passwordNew":"passwordNew",
  6. "passwordNew2":"passwordNew2",
  7. "source":"数据来源 ad ios"
  8. }
  9. result:
  10. {"result":"注册成功","statusCode":"000000","error":""}
  11. note:正确的返回形式,result返回数据,statusCode返回状态码(正确返回60,错误返回不一定,暂定66)
  12. result(error):
  13. {"result":"","statusCode":"666666","error":"数据异常"}
  14. {"result":"","statusCode":"666666","error":"请填写手机号!"}
  15. {"result":"","statusCode":"666666","error":"请输入密码!"}
  16. {"result":"","statusCode":"666666","error":"请重复输入密码!"}
  17. {"result":"","statusCode":"666666","error":"两次密码输入不一致,请重新输入!"}
  18. {"result":"","statusCode":"666666","error":"注册异常,注册涞源为空!"}
  19. {"result":"","statusCode":"666666","error":"手机号已被注册!"}
  20. note:处理失败的返回形式,resut为“”,statusCode返回错误码,error显示错误信息(一般是异常信息)
  21. 以上都是返回200的情况下,非正常请求不包括在内(连接超时、断链等)

2,App登陆

  1. [POST] rest/hUserController/login
  2. body:
  3. {
  4. "mobile":"17718577726",
  5. "password":"password"
  6. }
  7. result:
  8. {
  9. "result": {
  10. "id": "ff8080815f291a71015f291aeb400000",
  11. "token": "8b7761ab7af94092b10c51d87ae182ab"
  12. },
  13. "error": "",
  14. "statusCode": "000000"
  15. }
  16. result(error):
  17. {"result":"","statusCode":"666666","error":"数据异常"}
  18. {"result":"","statusCode":"666666","error":"请输入手机号"}
  19. {"result":"","statusCode":"666666","error":"请输入密码"}
  20. {"result":"","statusCode":"666666","error":"账号或密码有误!"}

3,修改密码

  1. [PUT] rest/hUserController/updateAppPassword/{id}
  2. body:
  3. {
  4. "token":"token",
  5. "password":"password",
  6. "passwordNew":"passwordNew",
  7. "passwordNew2":"passwordNew2",
  8. }
  9. result:
  10. {"result":"OK","statusCode":"000000","error":""}
  11. result(error):
  12. {"result":"","statusCode":"666666","error":"token丢失"}
  13. {"result":"","statusCode":"666666","error":"旧密码不能为空"}
  14. {"result":"","statusCode":"666666","error":"新密码不能为空"}
  15. {"result":"","statusCode":"666666","error":"重复新密码不能为空"}
  16. {"result":"","statusCode":"666666","error":"新密码和重复新密码不一致"}
  17. {"result":"","statusCode":"666666","error":"token不存在"}
  18. {"result":"","statusCode":"666666","error":"旧密码错误"}

4,发送短信验证码

  1. [post] rest/hSmsController/sendSms
  2. body:{
  3. "tel":"2134"
  4. }
  5. result:{
  6. "result": "283293", //验证码
  7. "error": "",
  8. "statusCode": "000000"
  9. }
  10. }

5,修改手机号

  1. [put] rest/hUserController/updateTel/{id}
  2. body:{
  3. "token":"token",
  4. "mobile":"mobile"
  5. },
  6. result:{"result": "ok", "error": "","statusCode": "000000"}
  7. }

6,忘记密码

  1. [POST] rest/hUserController/forgot/{id}
  2. body:
  3. {
  4. "tel":"tel",
  5. "code":"code",
  6. "password":"passwordNew"
  7. }
  8. result:
  9. {"result":"OK","statusCode":"000000","error":""}

7,注销

  1. [post] rest/hUserController/logout
  2. body:{
  3. "id":"1234"
  4. }
  5. result:{
  6. "result":"ok",
  7. "statusCode":"000000",
  8. "error":""
  9. }

8,token获取用户id

  1. [GET] rest/hUserController/getUserId/{token}
  2. body:
  3. result:
  4. {"result":"32到36位userId","statusCode":"000000","error":""}
  5. result(error):
  6. {"result":"","statusCode":"666666","error":"token丢失"}
  7. {"result":"","statusCode":"666666","error":"token不存在"}

9,微信注册

  1. [post]rest/hUserController/wxCreate
  2. body:{"wxopenid":"123"}
  3. result:{"result":"注册成功!","statusCode":"000000","error":""}
  4. error:{"result":"","statusCode":"666666","error":"该微信号已绑定"}

10,微信绑定app账号

  1. [post] rest/hUserController/linkAppByWeixin/{wxopenid}
  2. body:{
  3. "mobile":"17718577726"
  4. }
  5. result:{"result":"OK","statusCode":"000000","error":""}
  6. error:{"result":"","statusCode":"666666","error":"此微信号已绑定手机号,请解除绑定后重试!"}
  7. error:{"result":"该手机号已绑定微信,请解绑或者换一个手机号","error":"","statusCode":"000000"}

11,手机号解绑微信

  1. [delete] removeWeixin/{userid}/{token}
  2. result:{"result":"OK","statusCode":"000000","error":""}

12,微信解绑手机号

  1. [delete] removeMobile/{wxopenid}
  2. result:{"result":"OK","statusCode":"000000","error":""}

13,微信号登陆用户

  1. [get] rest/hUserController/weixin/{wxopenid}
  2. result:{"result":{},"error":"","statusCode":"000000"}

二、用户信息

1,编辑用户信息

  1. [PUT] rest/hUserController/update/{id}
  2. body:
  3. {
  4. "wxopenid":"",//微信端使用,app端不要传
  5. "token":"token",//app端使用
  6. "realname":"真实姓名",
  7. "nickname":"昵称",
  8. "documentType":"证件类型", 参考后端数据字典
  9. "idNo":"证件号码",
  10. "registered":"证件地址",
  11. "issuingAuthority":"发证机关",
  12. "term":"证件有效期限",
  13. "pictureAddress":"证件照片地址",
  14. "icCardNumber":"IC卡号",
  15. "icCardIdentifier":"IC卡识别符",
  16. "socialSeurityNumber":"社保号码",
  17. "dateOfBirth":"出生日期",
  18. "educationalLevel":"文化程度",
  19. "occupation":"职业",
  20. "sex":"性别",
  21. "nation":"民族",
  22. "bloodType":"血型",
  23. "rhBloodType":"RH阴性",
  24. "unitOfWork":"工作单位",
  25. "province":"所在省",
  26. "city":"所在市",
  27. "area":"所在区",
  28. "residence":"居住地址",
  29. "residence1":"投递地址1",
  30. "residence2":"投递地址2",
  31. "memberTag":"会员标签",
  32. "neighborhood":"村居委会",
  33. "neighborhoodTel":"村居委会电话",
  34. "emergencyContact":"紧急联系人",
  35. "emergencyContactTel":"紧急联系人电话",
  36. "cardNumber":"会员卡号",
  37. "medicalReport":"体检报告",
  38. "healthReport":"健康报告",
  39. "patientRecord":"就医记录",
  40. "prescription":"用药记录"
  41. }
  42. result:
  43. {"result":"OK","statusCode":"000000","error":""}
  44. result(error):
  45. {"result":"","statusCode":"666666","error":"token丢失"}
  46. {"result":"","statusCode":"666666","error":"数据异常"}

2,查询用户信息

  1. [GET] rest/hUserController/{id}
  2. result: {"result":"JSON对象","statusCode":"000000","error":""}
  3. error: {"result":"","statusCode":"666666","error":"token丢失"}

3,上传用户头像

  1. [post] servlet/upload
  2. result:{
  3. "statusCode": "000000",
  4. "result": [
  5. {
  6. "name": "avatar (1).jpeg",
  7. "url": "/upload/headshot/4/0/3e678163-ccc1-4ca8-be83-70fc0299b294_avatar (1).jpeg"
  8. }
  9. ]
  10. }

三、我的家人

1,查看我的家人

  1. [GET] rest/hUserController/familyList/{userId}
  2. result:
  3. {
  4. "result": [
  5. {
  6. "id": "12312312312312321",
  7. "user_id": "ff8080815f291a71015f291aeb400000",
  8. "name": "李四",
  9. "tel": "1727272727",
  10. "releationship": "4",
  11. "shipcontent": "兄弟姐妹"
  12. }
  13. ],
  14. "statusCode": "000000",
  15. "error": ""
  16. }

2,编辑我的家人

  1. [PUT] rest/hUserController/updateFamilyInfo/{familyidid}
  2. body:
  3. {
  4. "wxopenid":"",//微信端使用app不要传
  5. "token":"token",//app端使用
  6. "name":"家人姓名",
  7. "tel":"家人电话",
  8. "releationship":"关系"
  9. }
  10. result:
  11. {"result":"OK","statusCode":"000000","error":""}

3,添加我的家人

  1. [post] rest/hUserController/addFamilyInfo
  2. body:
  3. {
  4. "wxopenid":"",//微信id,微信端使用
  5. "token":"",//app端使用
  6. "userId":"会员id",
  7. "name":"家人姓名",
  8. "tel":"家人电话",
  9. "releationship":"关系"
  10. }
  11. result:
  12. {"result":"OK","statusCode":"000000","error":""}

4,删除我的家人(app)

  1. [delete] rest/hUserController/deleteFamily/{familyid}/{token}
  2. result: {"result":"OK","statusCode":"000000","error":""}

5,删除我的家人(wx)

  1. [delete] rest/hUserController/deleteFamilywx/{familyid}/{wxopenid}
  2. result: {"result":"OK","statusCode":"000000","error":""}

四、我的地址

1,添加我的地址

  1. [post] rest/hUserAddressController
  2. body:{
  3. "token":"",//app使用
  4. "wxopenid":"",//微信端使用
  5. "userid":"",//管联的用户id
  6. "name":"",//收货人
  7. "tel":"",//电话
  8. "code":"",//邮编
  9. "province":"",//所在省
  10. "city":"",//所在市
  11. "area":"",//所在区
  12. "address":"",//详细地址
  13. "isdefault":"" //是否默认地址,是:1,否:0,默认为0
  14. }
  15. result:{"result":"ok","statusCode":"000000","error":""}

2,编辑我的地址

  1. [put] rest/hUserAddressController/{addressid}
  2. body:{
  3. "token":"",
  4. "wxopenid":"",
  5. "name":"",//收货人
  6. "tel":"",//电话
  7. "code":"",//邮编
  8. "province":"",//所在省
  9. "city":"",//所在市
  10. "area":"",//所在区
  11. "address":"",//详细地址
  12. "isdefault":"" //是否默认地址,是:1,否:0,默认为0
  13. }

3,查看我的地址

  1. [get] rest/hUserAddressController/{addressid}
  2. result:{
  3. "address": "啊啊啊",
  4. "name": "张1三",
  5. "id": "ff8080815f32bc5a015f32bf77b00000",
  6. "code": "2132323",
  7. "createName": null,
  8. "createBy": null,
  9. "area": "朝阳",
  10. "city": "北京",
  11. "tel": "15411343242",
  12. "province": "北京",
  13. "userid": "ff8080815f291a71015f291aeb400000",
  14. "isdefault": "1"
  15. }

4,删除地址(app)

  1. [delete] rest/hUserAddressController/{addressid}/{token}
  2. result:{"result":"ok","statusCode":"000000","error":""}
  3. error:{"result":"","statusCode":"666666","error":"该地址不存在BY THIS ADDRESSID"}

5,删除地址(wx)

  1. [delete] rest/hUserAddressController/removeWx/{addressid}/{wxopenid}
  2. result:{"result":"ok","statusCode":"000000","error":""}
  3. error:{"result":"","statusCode":"666666","error":"该地址不存在BY THIS WXOPENID"}

6,通过用户id查看地址列表

  1. [get] rest/hUserAddressController/list/{userid}
  2. result:{
  3. "result": [
  4. {
  5. "address": "啊啊啊",
  6. "name": "张三",
  7. "id": "ff8080815f32bc5a015f32c1e4420001",
  8. "area": "朝阳",
  9. "code": "2132323",
  10. "userid": "ff8080815f291a71015f291aeb400000",
  11. "createName": null,
  12. "createBy": null,
  13. "isdefault": "1",
  14. "province": "北京",
  15. "city": "北京",
  16. "tel": "15411343242"
  17. }
  18. ],
  19. "error": "",
  20. "statusCode": "000000"
  21. }

五、资讯信息

1,查看资讯信息

  1. [get] rest/hInformationController/{informationid}
  2. result:{
  3. "result": {
  4. "id": "ff8080815f33f4b4015f33f5b7740002",
  5. "content": "1232",
  6. "status": "1",
  7. "imageUrl": null,
  8. "title": "今天天气不错",
  9. "createtime": 1508491654000
  10. },
  11. "error": "",
  12. "statusCode": "000000"
  13. }
  14. error:{"result":"","error":"数据不存在BY THIS ID","statusCode":"666666"}

2,查看资讯列表(带分页)

  1. [post] rest/hInformationController/get
  2. body:{
  3. "title":"",
  4. "status":"",
  5. "startindex":0,
  6. "pagesize":10,
  7. "begincreatetime":"2017-01-01 12:01:21" ,
  8. "endcreatetime":"2017-01-01 12:01:21"
  9. }
  10. result:{
  11. "result": [
  12. {
  13. "id": "ff8080815f3398b8015f33a04c430001",
  14. "content": "mml;ml;mlml",
  15. "status": "1",
  16. "title": "aaa",
  17. "imageUrl": "upload/files/20171019155424iOpgz8HB.jpg",
  18. "createtime": 1510127260000
  19. }
  20. ],
  21. "error": "",
  22. "statusCode": "000000"
  23. }

六、硬件设备

1,绑定设备

  1. [post] rest/appHardwareController
  2. body:{
  3. "token":"",
  4. "name":"",//设备名称
  5. "uniquecode":"123",//设备码(唯一标识)
  6. "boundtype":"bluetooth", //绑定类型:蓝牙(bluetooth) ,暂时只有蓝牙,待添加
  7. "source":"",//来源(android,ios,wx)
  8. "userid":"12q13",//绑定的用户id
  9. }
  10. result:{
  11. "result": {
  12. "name": "apple watch 38mm",
  13. "id": "ff8080815f398765015f3987ff040000",
  14. "source": "ios",
  15. "createDate": 1508498734844,
  16. "uniquecode": "abcdefghijklmn1",
  17. "userid": "ff8080815f291a71015f291aeb400000",
  18. "boundtype": "bluetooth"
  19. },
  20. "statusCode": "000000",
  21. "error": ""
  22. }
  23. error:{"result":"","statusCode":"666666","error":"该设备以绑定,绑定用户ID为:ff8080815f291a71015f291aeb400000"}

2,通过绑定的id解绑设备

  1. [delete] rest/appHardwareController/{id}/{token}
  2. result:{"result":"ok","statusCode":"000000","error":""}

3,通过设备码和用户id解绑设备

  1. [post] rest/appHardwareController/unbound
  2. body:{
  3. "userid":"123",
  4. "uniquecode":"qq123" ,
  5. "token":""
  6. }
  7. result:{"result":"ok","statusCode":"000000","error":""}

3,查看设备

  1. [get] rest/appHardwareController/{id}
  2. result:{
  3. "result": {
  4. "name": "apple watch 38mm",
  5. "id": "ff8080815f398765015f3987ff040000",
  6. "source": "ios",
  7. "createDate": 1508498734844,
  8. "uniquecode": "abcdefghijklmn1",
  9. "userid": "ff8080815f291a71015f291aeb400000",
  10. "boundtype": "bluetooth"
  11. },
  12. "statusCode": "000000",
  13. "error": ""
  14. }

4,通过用户id查看设备列表

  1. [get] rest/appHardwareController/query/{userid}
  2. result:{"result":[],"error":"","statusCode":"000000"}

七、血压测量

### 1,录入数据

  1. [post] rest/hBloodpressureController
  2. body:{
  3. "userid":"",//用户id
  4. "token":"",
  5. "bp_sys":"",//收缩压
  6. "bp_dia":"",//舒张压
  7. "bp_pulse":"",//脉搏
  8. "source":"",//数据来源(ios,android,wx)
  9. "boundtype":"",//绑定类型,暂时只有bluetooth
  10. "name":"",//设备名称
  11. }
  12. result:{
  13. "result": {
  14. "name": "apple watch 38mm",
  15. "id": "ff8080815f39b9ca015f39bfa8100000",
  16. "source": "ios",
  17. "createDate": null,
  18. "userid": "ff8080815f291a71015f291aeb400000",
  19. "boundtype": "bluetooth",
  20. "bpSys": "1",
  21. "bpDia": "2",
  22. "bpPulse": "3"
  23. },
  24. "statusCode": "000000",
  25. "error": ""
  26. }

2,查看一条数据

  1. [get] rest/hBloodpressureController/{id}
  2. result:{"result":{},"error":"","statusCode":"000000"}

3,通过用户ID查看测量数据

  1. [post] rest/hBloodpressureController/get
  2. body:{
  3. "userid":"",//用户id
  4. "startindex":"",//起始下标,分页用
  5. "pagesize":"",//每页条数
  6. "begincreatetime":"2017-01-01 12:01:21" ,
  7. "endcreatetime":"2017-01-01 12:01:21"
  8. }
  9. result:{"result":[{}],"statusCode":"000000","error":""}

4,通过数据ID删除数据

  1. [delete] rest/hBloodpressureController/{id}
  2. result:{"result":"ok","error":"","statusCode":"000000"}

5,统计信息

  1. [get] rest/hBloodpressureController/count/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. field:{bp_sys|bp_dia|bp_pulse}
  4. result:{
  5. "result": [
  6. {
  7. "date": "2017-10-20",
  8. "field": "bp_sys",
  9. "max": "5",
  10. "min": "1",
  11. "avg": 3
  12. },
  13. {
  14. "date": "2017-10-31",
  15. "field": "bp_sys",
  16. "max": "1",
  17. "min": "1",
  18. "avg": 1
  19. }
  20. ],
  21. "error": "",
  22. "statusCode": "000000"
  23. }

6,查看时间范围内指定指标最大的血压数据

  1. [post] rest/hBloodpressureController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{bp_sys , bp_dia , bp_pulse}
  5. "userid":""
  6. }
  7. result:{
  8. "result": [
  9. {
  10. "name": "apple watch 38mm",
  11. "id": "ff8080815f39b9ca015f39bfa8100000",
  12. "bpSys": "1",
  13. "bpDia": "2",
  14. "bpPulse": "3",
  15. "source": "ios",
  16. "createDate": 1508503056000,
  17. "userid": "ff8080815f291a71015f291aeb400000",
  18. "boundtype": "bluetooth"
  19. }
  20. ],
  21. "error": "",
  22. "statusCode": "000000"
  23. }

7,查看时间范围内指定指标最小的血压数据

  1. [post] rest/hBloodpressureController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{bp_sys , bp_dia , bp_pulse}
  5. "userid":""
  6. }
  7. result:{"result":[],"error":"","statusCode":"000000"}

八、血氧

1,添加测量数据'

  1. [post] rest/hBloodoxygenController
  2. body:{
  3. "userid":"ff8080815f291a71015f291aeb400000",
  4. "token":"8b7761ab7af94092b10c51d87ae182ab",
  5. "bo_xy":"1",
  6. "bo_mb":"2",
  7. "source":"ios",
  8. "boundtype":"bluetooth",
  9. "name":"apple watch 38mm"
  10. }
  11. result:{
  12. "result": {
  13. "name": "apple watch 38mm",
  14. "id": "ff8080815f3d9dab015f3d9e5ab00000",
  15. "source": "ios",
  16. "createDate": 1508567308967,
  17. "userid": "ff8080815f291a71015f291aeb400000",
  18. "boundtype": "bluetooth",
  19. "boXy": "1",
  20. "boMb": "2"
  21. },
  22. "error": "",
  23. "statusCode": "000000"
  24. }

2,通过数据ID查看数据

  1. [get] rest/ hBloodoxygenController/{id}
  2. result:{
  3. "result": {
  4. "name": "apple watch 38mm",
  5. "id": "ff8080815f3d9dab015f3d9e5ab00000",
  6. "source": "ios",
  7. "createDate": 1508567308967,
  8. "userid": "ff8080815f291a71015f291aeb400000",
  9. "boundtype": "bluetooth",
  10. "boXy": "1",
  11. "boMb": "2"
  12. },
  13. "error": "",
  14. "statusCode": "000000"
  15. }

3,通过用户ID查看数据

  1. [post] rest/hBloodoxygenController/get
  2. body:{
  3. "userid":"" ,
  4. "startindex":"10",
  5. "pagesize":"3",
  6. "begincreatetime":"2016-12-12 00:00:00",
  7. "endcreatetime":"2018-12-13 00:00:00"
  8. }
  9. result:{"result":[],"error":"","statusCode":"000000"}

4,统计信息

  1. [get] rest/hBloodoxygenController/count/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. field:{bo_xy|bo_mb}
  4. result:{
  5. "result": [
  6. {
  7. "date": "2017-10-21",
  8. "field": "bo_xy",
  9. "max": "1",
  10. "min": "1",
  11. "avg": 1
  12. },
  13. {
  14. "date": "2017-10-26",
  15. "field": "bo_xy",
  16. "max": "10",
  17. "min": "10",
  18. "avg": 10
  19. }
  20. ],
  21. "statusCode": "000000",
  22. "error": ""
  23. }

5,查看时间范围内指定指标最大的血氧数据

  1. [post] rest/hBloodoxygenController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{bo_xy , bo_mb}
  5. "userid":""
  6. }
  7. result:{
  8. "result": [
  9. {
  10. "name": "apple watch 38mm",
  11. "id": "ff8080815f3d9dab015f3d9e5ab00000",
  12. "createDate": 1508567309000,
  13. "userid": "ff8080815f291a71015f291aeb400000",
  14. "boundtype": "bluetooth",
  15. "source": "ios",
  16. "boXy": "1",
  17. "boMb": "2"
  18. }
  19. ],
  20. "statusCode": "000000",
  21. "error": ""
  22. }

6,查看时间范围内指定指标最小的血氧数据

  1. [post] rest/hBloodoxygenController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{bo_xy , bo_mb}
  5. "userid":""
  6. }
  7. result:{"result":[],"error":"","statusCode":"000000"}

九、耳温

1,添加测量数据

  1. [post] rest/hEartemperatureController
  2. body:{
  3. "userid":"applewatch 38mm",
  4. "token":"45",
  5. "eartemp_temp":"12",
  6. "source":"ios",
  7. "boundtype":"bluetooth",
  8. "name":"apple watch 38mm"
  9. }
  10. result:{
  11. "result": {
  12. "name": "apple watch 38mm",
  13. "id": "ff8080815f3dad23015f3daf4ea80003",
  14. "source": "ios",
  15. "createDate": 1508568420000,
  16. "userid": "ff8080815f291a71015f291aeb400000",
  17. "boundtype": "bluetooth",
  18. "eartempTemp": "1"
  19. },
  20. "error": "",
  21. "statusCode": "000000"
  22. }

2,通过数据ID查看数据

  1. [get] rest/hEartemperatureController/{id}
  2. result:{
  3. "result": {
  4. "name": "apple watch 38mm",
  5. "id": "ff8080815f3dad23015f3daf4ea80003",
  6. "source": "ios",
  7. "createDate": 1508568420000,
  8. "userid": "ff8080815f291a71015f291aeb400000",
  9. "boundtype": "bluetooth",
  10. "eartempTemp": "1"
  11. },
  12. "error": "",
  13. "statusCode": "000000"
  14. }

3,通过用户ID查看数据

  1. [post] rest/hEartemperatureController/get
  2. body:{
  3. "userid":"" ,
  4. "startindex":"10",
  5. "pagesize":"3",
  6. "begincreatetime":"2016-12-12 00:00:00",
  7. "endcreatetime":"2018-12-13 00:00:00"
  8. }
  9. result:{"result":[],"error":"","statusCode":"000000"}

4,统计信息

  1. [get] rest/hEartemperatureController/count/{userid}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. result:{
  4. "result": [
  5. {
  6. "date": "2017-10-21",
  7. "field": "eartemp_temp",
  8. "max": "3",
  9. "min": "1",
  10. "avg": "1.67"
  11. }
  12. ],
  13. "error": "",
  14. "statusCode": "000000"
  15. }

5,查看时间范围内指定指标最大的耳温数据

  1. [post] rest/hEartemperatureController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "userid":""
  5. }
  6. result:{
  7. "result": [
  8. {
  9. "name": "apple watch 38mm",
  10. "id": "ff8080815f3dad23015f3daf40c10002",
  11. "source": "ios",
  12. "eartempTemp": "3",
  13. "createDate": 1508568416000,
  14. "userid": "ff8080815f291a71015f291aeb400000",
  15. "boundtype": "bluetooth"
  16. }
  17. ],
  18. "error": "",
  19. "statusCode": "000000"
  20. }

6,查看时间范围内指定指标最小的耳温数据

  1. [post] rest/hEartemperatureController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "userid":""
  5. }
  6. result:{"result":[],"error":"","statusCode":"000000"}

十、体重体脂

1,添加测量数据

  1. [post] rest/hWeightBodyfatController
  2. body:{
  3. "userid":"ff8080815f291a71015f291aeb400000",
  4. "token":"8b7761ab7af94092b10c51d87ae182ab",
  5. "body_weight":"1",//体重
  6. "body_fat_ratio":"2",//脂肪率
  7. "body_muscle_mass":"3",//肌肉含量
  8. "body_moisture":"1",//身体水分
  9. "body_bmi":"2",//身体质量指数
  10. "body_bmr":"3",//基础代谢率
  11. "body_bone_mass":"4",//骨量
  12. "body_visceral_fat":"5",//内脏脂肪
  13. "source":"ios",
  14. "boundtype":"bluetooth",
  15. "name":"apple watch 38mm"
  16. }
  17. result:{
  18. "result": {
  19. "name": "apple watch 38mm",
  20. "id": "ff8080815f3dbda4015f3dc0cc620000",
  21. "createDate": 1508569566295,
  22. "userid": "ff8080815f291a71015f291aeb400000",
  23. "boundtype": "bluetooth",
  24. "bodyWeight": "1",
  25. "bodyFatRatio": "2",
  26. "bodyMuscleMass": "3",
  27. "bodyMoisture": "1",
  28. "bodyBmi": "2",
  29. "bodyBmr": "3",
  30. "bodyBoneMass": "4",
  31. "bodyVisceralFat": "5",
  32. "source": "ios"
  33. },
  34. "error": "",
  35. "statusCode": "000000"
  36. }

2,通过数据ID查看数据

  1. [get] rest/hWeightBodyfatController/{id}
  2. result:{"result":{},"error":"","statusCode":"000000"}

3,通过用户ID查看数据

  1. [post] rest/hWeightBodyfatController/get
  2. body:{
  3. "userid":"" ,
  4. "startindex":"10",
  5. "pagesize":"3",
  6. "begincreatetime":"2016-12-12 00:00:00",
  7. "endcreatetime":"2018-12-13 00:00:00"
  8. }
  9. result:{"result":[],"error":"","statusCode":"000000"}

4,统计信息

  1. [get] rest/hWeightBodyfatController/count/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. *field:{"body_weight|body_fat_ratio|body_muscle_mass|body_moisture|body_bmi|
  4. body_bmr|body_bone_mass|body_visceral_fat"};
  5. result:{
  6. "result": [
  7. {
  8. "date": "2017-10-21",
  9. "field": "body_fat_ratio",
  10. "max": "2",
  11. "min": "2",
  12. "avg": "2.00"
  13. }
  14. ],
  15. "error": "",
  16. "statusCode": "000000"
  17. }

5,查看时间范围内指定指标最大的体重体脂数据

  1. [post] rest/hWeightBodyfatController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":""
  5. //{body_weight|body_fat_ratio|body_muscle_mass|body_moisture|
  6. //body_bmi|body_bmr|body_bone_mass|body_visceral_fat}
  7. "userid":""
  8. }
  9. result:{
  10. "result": [],
  11. "error": "",
  12. "statusCode": "000000"
  13. }

6,查看时间范围内指定指标最小的体重体脂数据

  1. [post] rest/hWeightBodyfatController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":""
  5. //{body_weight|body_fat_ratio|body_muscle_mass|body_moisture|
  6. //body_bmi|body_bmr|body_bone_mass|body_visceral_fat}
  7. "userid":""
  8. }
  9. result:{
  10. "result": [],
  11. "error": "",
  12. "statusCode": "000000"
  13. }

十一、直播相关

1,直播号注册

  1. [post] rest/WebCast/register
  2. body:{
  3. "token": "",
  4. "name": "张宁",
  5. "icon": "这是头像路径地址",
  6. "sign": "这是一条签名",
  7. "email": "邮箱",
  8. "birth": "2017-01-01",
  9. "mobile": "15311494814",
  10. "gender": "0",
  11. "userid": ""
  12. }
  13. result:{
  14. "result": {
  15. "code": 200,
  16. "info": {
  17. "name": "张宁",
  18. "accid": "cdb343ad3c724d3889169d211a16fe55",
  19. "token": "e9fe9bd1d1b378e66efd1d8c576b19f6"
  20. }
  21. },
  22. "error": "",
  23. "statusCode": "000000"
  24. }
  25. error:{
  26. "result": "",
  27. "error": "{\"code\":414,\"desc\":\"already register\"}",
  28. "statusCode": "666666"
  29. }

2,更新用户直播云信息

  1. [post] rest/WebCast/update
  2. body:{
  3. "token": "",
  4. "name": "张宁",
  5. "icon": "这是头像路径地址",
  6. "sign": "这是一条签名",
  7. "email": "邮箱",
  8. "birth": "2017-01-01",
  9. "mobile": "15311494814",
  10. "gender": "0",
  11. "accid": ""
  12. }
  13. result:{
  14. "result": {
  15. "code": 200
  16. },
  17. "error": "",
  18. "statusCode": "000000"
  19. }

3,通过userid或者accid查看直播个人信息

  1. [post] rest/WebCast/getInfo
  2. body: {
  3. "userid":"",
  4. "accid":""//注:userid和accid可以同时搜索,也可以单独搜索
  5. }
  6. result:{
  7. "result": {},
  8. "error": "",
  9. "statusCode": "000000"
  10. }

4,通过accid创建聊天室

  1. [post] rest/WebCast/createChartRoom
  2. body:{
  3. "accid":"",//必填
  4. "name":"",//直播间地址,必填
  5. "announcement":""//公告,
  6. "broadcasturl":""//直播地址,非必填
  7. }
  8. result:{
  9. "result": {
  10. "code": 200,
  11. "chatroom": {
  12. "valid": true,
  13. "broadcasturl": " ",
  14. "ext": "",
  15. "creator": "cdb343ad3c724d3889169d211a16fe55",
  16. "name": "张宁的聊天室2",
  17. "muted": false,
  18. "roomid": 18157129,
  19. "announcement": "1231231231"
  20. }
  21. },
  22. "statusCode": "000000",
  23. "error": ""
  24. }

3,通过accid创建直播频道

  1. [post] rest/WebCast/createLiveChannel
  2. body:{
  3. "name":"",//直播频道名称
  4. "type":0,//频道类型默认为0(rtmp)
  5. }
  6. result:{
  7. "result": {
  8. "ret": {
  9. "httpPullUrl": "http://flvb7a6bebe.live.126.net/live/fc289c13a4b545bd9654d6c729a158c4.flv?netease=flvb7a6bebe.live.126.net",
  10. "hlsPullUrl": "http://pullhlsb7a6bebe.live.126.net/live/fc289c13a4b545bd9654d6c729a158c4/playlist.m3u8",
  11. "pushUrl": "rtmp://pb7a6bebe.live.126.net/live/fc289c13a4b545bd9654d6c729a158c4?wsSecret=09a18e1cb66fac4afb5d3392951c0c39&wsTime=1508680138",
  12. "rtmpPullUrl": "rtmp://vb7a6bebe.live.126.net/live/fc289c13a4b545bd9654d6c729a158c4",
  13. "name": "张宁直播间1",
  14. "ctime": 1508680138831,
  15. "cid": "fc289c13a4b545bd9654d6c729a158c4"
  16. },
  17. "code": 200,
  18. "requestId": "live1a51464ff7334d90b92b52b517164ade"
  19. },
  20. "statusCode": "000000",
  21. "error": ""
  22. }
  23. error:{
  24. "result": {
  25. "msg": "频道名称已经存在",
  26. "code": 611,
  27. "requestId": "live1a3d4def0e47424fa9417940f5b78262"
  28. },
  29. "statusCode": "000000",
  30. "error": ""
  31. }

4,获取直播频道列表

  1. [post] rest/getLiveChannels
  2. body:{
  3. "startindex":"0",
  4. "pagesize":"10",
  5. "order":"asc"//升序asc降序desc
  6. }
  7. result:{"result":"{\"ret\":{\"pnum\":1,\"totalRecords\":4,\"records\":1,\"list\":[{\"duration\":120,\"uid\":77188,\"filename\":\"张宁直播间1\",\"recordStatus\":null,\"needRecord\":0,\"name\":\"张宁直播间1\",\"format\":1,\"ctime\":1508680138831,\"type\":0,\"status\":0,\"cid\":\"fc289c13a4b545bd9654d6c729a158c4\"}],\"totalPnum\":4},\"code\":200,\"requestId\":\"live5f9452b71a944fac95b0a63e7e029a2d\"}","error":"","statusCode":"000000"}

5,关联直播频道和聊天室

  1. [post] rest/WebCast/linkChatAndLive
  2. body:{
  3. "cid": "0",
  4. "roomid": "1",
  5. "name": "zn",
  6. "pushUrl": "",
  7. "httpPullUrl": "",
  8. "hlsPullUrl": "",
  9. "rtmpPullUrl": ""
  10. }
  11. result:{
  12. "result": {
  13. "name": "zn",
  14. "id": "ff8080815f4c59bb015f4c5badb70000",
  15. "createDate": 1508814597551,
  16. "cid": "0",
  17. "pushUrl": null,
  18. "httpPullUrll": null,
  19. "hlsPullUrl": null,
  20. "rtmpPullUrl": null,
  21. "roomid": "1"
  22. },
  23. "statusCode": "000000",
  24. "error": ""
  25. }
  26. error:{
  27. "result": "",
  28. "statusCode": "666666",
  29. "error": "数据已存在BY THIS CID"
  30. }

6,修改直播频道和聊天室关联

  1. [put] rest/WebCase/updateChatAndLive/{cid}
  2. body:{
  3. "roomid":"1",
  4. "name":"zn",
  5. "pushUrl":"123",
  6. "httpPullUrl":"",
  7. "hlsPullUrl":"",
  8. "rtmpPullUrl":""
  9. }
  10. result:{
  11. "result": "ok",
  12. "statusCode": "000000",
  13. "error": ""
  14. }
  15. error:{
  16. "result": "",
  17. "statusCode": "666666",
  18. "error": "数据不存在BY THIS CID"
  19. }

7,删除聊天室和直播频道关系

  1. [delete] rest/WebCast/deleteChatAndLive/{cid}
  2. result:{
  3. "result": "ok",
  4. "statusCode": "000000",
  5. "error": ""
  6. }

8,查询聊天室和直播频道关系

  1. [get] rest/WebCast/getChatAndLive/{cid}
  2. result:{
  3. "result": {
  4. "name": "zn",
  5. "id": "ff8080815f4c59bb015f4c5badb70000",
  6. "createDate": 1508814598000,
  7. "cid": "0",
  8. "pushUrl": "123",
  9. "httpPullUrll": "1213a",
  10. "hlsPullUrl": "123b",
  11. "rtmpPullUrl": "123c",
  12. "roomid": "12"
  13. },
  14. "statusCode": "000000",
  15. "error": ""
  16. }

9,获取文件视频信息

  1. [get] rest/WebCast/videoGet/{videoid}
  2. result:{
  3. "result": "{}",
  4. "error": "",
  5. "statusCode": "000000"
  6. }

10,获取文件视频信息列表

  1. [post] rest/WebCast/videoGets
  2. body:{
  3. "startindex":"0",
  4. "pagesize":"1",
  5. "type":"0",
  6. "status":"10"
  7. }
  8. result:{"result":"{\"ret\":{\"totalRecords\":4,\"pageSize\":1,
  9. \"list\":[{\"downloadOrigUrl\":\"http://vodiwsmcsoe.nosdn.127.net/432a71c2-7a81-4caa-85f9-16137d3c409d.mp4?download=1111111111111111111111111111111.mp4\",
  10. \"initialSize\":354953,\"typeName\":\"默认分类\",
  11. \"description\":\"\",\"completeTime\":null,
  12. \"updateTime\":1508815201299,\"duration\":2,\"vid\":29959806,
  13. \"createTime\":1508814977576,\"videoName\":\"1111111111111111111111111111111\",
  14. \"snapshotUrl\":\"http://vodiwsmcsoe.nosdn.127.net/432a71c2-7a81-4caa-85f9-16137d3c409d/ea1d4dba-bb58-41ae-9a60-569a68aceef8\",
  15. \"durationMsec\":2338,\"typeId\":126513,
  16. \"origUrl\":\"http://vodiwsmcsoe.vod.126.net/vodiwsmcsoe/432a71c2-7a81-4caa-85f9-16137d3c409d.mp4\",
  17. \"status\":40}],
  18. \"currentPage\":1,\"pageNum\":4},\"code\":200,\"requestId\":\"4f39d249-5489-478b-a241-00441309d2ba\"}","error":"","statusCode":"000000"}

11,根据roomid删除im聊天室

  1. [delete] rest/WebCast/removeChatRoom/{roomid}
  2. result:{"result":"{\"code\":200,\"desc\":{}}","error":"","statusCode":"000000"}
  3. error:{"result":"{\"code\":414,\"desc\":\"parameter roomid no exist or invalid, roomid=123\"}","error":"","statusCode":"000000"}

12,设置频道的录制状态

  1. [post] rest/WebCast/statusChannelTranscript
  2. body:{
  3. "cid":"0",//频道ID,32位字符串
  4. "needRecord":1,//1-开启录制; 0-关闭录制
  5. "format":"0",//1-flv; 0-mp4
  6. "duration":"5",//录制切片时长(分钟),5~120分钟
  7. "filename":""//非必填,录制后文件名(只支持中文、字母和数字),格式为filename_YYYYMMDD-HHmmssYYYYMMDD-HHmmss, 文件名录制起始时间(年月日时分秒) -录制结束时间(年月日时分秒)
  8. }
  9. result:{"result":"{\"code\":200,\"requestId\":\"livef28dfa7c3efc4391a87b89da30ac94dc\"}","error":"","statusCode":"000000"}

13,通过频道id获取录制的视频文件

  1. [post] rest/WebCast/getVideoRecordsList
  2. body:{
  3. "cid":"b09839e9907e4b84a53c953ca4b7486d",//频道id,必填
  4. "startindex":"",//.非必填默认为0
  5. "pagesize":"10"//非必填默认为10
  6. }
  7. result:{"result":
  8. "{\"ret\":{\"pnum\":1,\"totalRecords\":0,\"records\":10,\"videoList\":[],
  9. \"totalPnum\":0},\"code\":200,\"requestId\":\"live501d24c1ea1b47409ac28d261fc6ea22\"}",
  10. "error":"","statusCode":"000000"}

14,关联userid和cid

  1. [post] rest/WebCast/linkUC
  2. body:{
  3. "cid":"abc", //频道id,必填
  4. "userid":"123", //userid,必填
  5. "ctime":"", //创建频道的时间戳
  6. "name":"",//频道名称
  7. "status":"",//频道状态(0:空闲; 1:直播; 2:禁用; 3:直播录制)
  8. "type":"",//频道类型 ( 0 : rtmp, 1 : hls, 2 : http)
  9. "needRecord":"",//1-开启录制; 0-关闭录制
  10. "format":"",//1-flv; 0-mp4
  11. "duration":"",//录制切片时长(分钟)
  12. "filename":"",//录制后文件名
  13. "msg":""//错误信息
  14. }
  15. result:{
  16. "result": {
  17. "name": "",
  18. "id": "ff8080815f9f4e04015f9f4e7de20000",
  19. "type": "",
  20. "filename": "",
  21. "status": "",
  22. "duration": "",
  23. "format": "",
  24. "cid": "abc",
  25. "createDate": 1510206242252,
  26. "userid": "123",
  27. "ctime": "",
  28. "needRecord": "",
  29. "msg": ""
  30. },
  31. "statusCode": "000000",
  32. "error": ""
  33. }
  34. error:{"result":"","statusCode":"666666","error":"该cid已绑定用户"}

15,查看userid和cid(通过userid获取cid(频道号)的接口)

  1. [post] rest/WebCast/getUC
  2. body:{
  3. "cid":"abc",//注:两者可以传一个,也可以都传
  4. "userid":"123"
  5. }
  6. result:{ //注:虽然按cid查询或者cid和userid查询只会查询到一条,但是返回结果永远是[]
  7. "result": [
  8. {
  9. "id": "ff8080815f9f5848015f9f61011f0000",
  10. "create_date": 1510207455000,
  11. "cid": "abc",
  12. "userid": "123",
  13. "ctime": "",
  14. "name": "haha",
  15. "status": "1",
  16. "type": "2",
  17. "need_record": "3",
  18. "format": "4",
  19. "duration": "5",
  20. "filename": "6",
  21. "msg": "error"
  22. }
  23. ],
  24. "statusCode": "000000",
  25. "error": ""
  26. }

16,修改关联信息

  1. [put] rest/WebCast/modifyUC/{userid}/{cid}
  2. body:{ //至少修改一个参数
  3. "name":"haha",
  4. "status":"1",
  5. "type":"2",
  6. "needRecord":"3",
  7. "format":"4",
  8. "duration":"5",
  9. "filename":"6",
  10. "msg":"error"
  11. }
  12. result:{"result":"ok","statusCode":"000000","error":""}

16,通过cid删除关联(该接口会清除指定频道)

  1. [delete] rest/WebCast/removeUC/{cid}
  2. result:{"result":"ok","statusCode":"000000","error":""}
  3. error:{"result":"","statusCode":"666666","error":"该关联数据不存在 by this cid"}

17,清除用户所有频道(该接口会清除用户下所有频道)

  1. [delete] rest/WebCast/removeUCAll/{userid}
  2. result:{"result":"ok","statusCode":"000000","error":""}

十二、省市区联动

  1. 参数:pid
  2. 参数值为:1,返回的为所有的省
  3. 参数值为:其他pid值,返回的为:市或者县的数据
  4. [get] jeecgFormDemoController.do?regionSelect&pid=1
  5. 返回结果:
  6. [
  7. {
  8. "id": "13",
  9. "name": "安徽省",
  10. "pid": "1"
  11. },
  12. {
  13. "id": "2",
  14. "name": "北京市",
  15. "pid": "1"
  16. },
  17. {
  18. "id": "23",
  19. "name": "重庆市",
  20. "pid": "1"
  21. },
  22. {
  23. "id": "14",
  24. "name": "福建省",
  25. "pid": "1"
  26. }
  27. ]

十三、血糖仪接口

1,查询血糖仪数据列表(分页)

  1. [POST] http://127.0.0.1/healthCare/rest/hBloodSugarController/list
  2. body :{
  3. "status":"100",//100:正常,99:推送成功,0:推送失败",
  4. "devicesn":"设备SN码",
  5. "foodstatus":"1",//测量状态, 1:空腹 2:早餐后 3:午餐前 4:午餐后 5:晚餐前 6:晚餐后 7:睡前 8:凌晨
  6. "result":"检测结果值", // 血糖检测结果值 60
  7. "userId":"会员id",
  8. "page":2, //当前页
  9. "rows":20//每页条数
  10. }
  11. 返回结果: {
  12. "result": [
  13. {
  14. "id": "40289ff25f435b5e015f435beb3a0000",
  15. "result": "",
  16. "page": 1,
  17. "status": null,
  18. "code": "",
  19. "createdateBegin": null,
  20. "rows": 10,
  21. "createdateEnd": null,
  22. "sysCompanyCode": null,
  23. "createName": null,
  24. "userId": null,
  25. "sysOrgCode": null,
  26. "createBy": null,
  27. "updateName": null,
  28. "updateDate": null,
  29. "updateBy": null,
  30. "aimstatus": "",
  31. "devicesn": "",
  32. "foodstatus": "",
  33. "testtime": "",
  34. "unit": "",
  35. "usercode": "",
  36. "createtime": "",
  37. "openid": ""
  38. },
  39. {
  40. ..........................
  41. },
  42. ],
  43. "error": "",
  44. "statusCode": "000000"
  45. }

2,查询血糖仪数据(获取最新一条数据)

  1. [POST] http://127.0.0.1/healthCare/rest/hBloodSugarController/getEntityByDevicesn
  2. body :{ "userId":"用户id" }
  3. 返回结果:{
  4. "result": {
  5. "id": "402881475f47fe24015f47fed75a0000",
  6. "result": "7",
  7. "time": null,
  8. "status": "100",
  9. "code": "31215087291631",
  10. "page": 1,
  11. "updateBy": null,
  12. "sysOrgCode": null,
  13. "createBy": null,
  14. "updateName": null,
  15. "createName": null,
  16. "updateDate": null,
  17. "userId": "402881035ebd51e0015ebd5353590001",
  18. "sysCompanyCode": null,
  19. "openid": "",
  20. "aimstatus": "5",
  21. "devicesn": "2AH4MHR0886",
  22. "usercode": "100114",
  23. "testtime": "2017-10-25 11:25:25",
  24. "unit": "0",
  25. "createtime": "2017-10-25 11:26:03",
  26. "foodstatus": "8",
  27. "realname": null,
  28. "rows": 10,
  29. "createdateBegin": null,
  30. "createdateEnd": null
  31. },
  32. "statusCode": "000000",
  33. "error": ""
  34. }

3,血糖仪统计接口

  1. [POST] http://127.0.0.1/healthCare/rest/hBloodSugarController/getStatisticsBloodSugarData
  2. body :{
  3. "userId": "402881035ebd51e0015ebd5353590001",
  4. "createdateBegin": "2017-10-01",
  5. "createdateEnd": "2017-10-07"
  6. }
  7. 返回结果: {
  8. "result": [
  9. {
  10. "result_sum": "156.61",
  11. "result_avg": "6.53",
  12. "result_amax": "9.29",
  13. "result_min": "5.29",
  14. "testtime": "2017-10-23"
  15. },
  16. {
  17. "result_sum": "7.00",
  18. "result_avg": "7.00",
  19. "result_amax": "7",
  20. "result_min": "7",
  21. "testtime": "2017-10-25"
  22. }
  23. ],
  24. "statusCode": "000000",
  25. "error": ""
  26. }

4,血糖-添加

  1. [POST] rest/hBloodSugarController
  2. body :
  3. {
  4. "userId":"123",
  5. "devicesn":"设备id",
  6. "foodstatus":"饭前饭后状态"
  7. "result":"测试结果值",
  8. "testtime":"测试时间",
  9. "token":"token"
  10. }
  11. 返回结果:
  12. {"result":"OK","error":"","statusCode":"000000"}
  13. 返回异常:
  14. {"result":"","statusCode":"666666","error":"token 丢失"}
  15. {"result":"","statusCode":"666666","error":"token 不存在"}
  16. {"result":"","statusCode":"666666","error":"未知异常"}

十四、惠健康手表接口:

1, 查询手表数据列表(分页)

  1. [POST] http://127.0.0.1/healthCare/rest/watchController/list
  2. body :{
  3. "status": "100",//100:正常,99:推送成功,0:推送失败
  4. "deviceid": "设备id",
  5. "userId": "会员id",
  6. "createdateBegin": "开始时间",
  7. "createdateEnd": "结束时间",
  8. "type": "类型",//1: 心率超标;2: sos报警;3: 电量过低;4: 跌倒报警;5: 服务电话呼叫;6: 血压超标;7: 充电器拔出;8: 久坐提醒;9: 充电器连接;10: 血糖超标11: 设备已开机12: 血氧超标13: 手表已经摘除22: 普通电话呼叫
  9. "testType": "测试类型",//摔倒报警、sos报警、血压、心率、计步器、睡眠、血氧
  10. "page": 2,//当前页
  11. "rows": 20//每页条数
  12. }
  13. 返回结果: {
  14. "result": [
  15. {
  16. "id": "402881ec5f38e48d015f38e8523e0000",
  17. "type": null,
  18. "action": "sensor",
  19. "reserve2": null,
  20. "reserve3": null,
  21. "devicename": null,
  22. "longitude": null,
  23. "sportstep": null,
  24. "sportdistance": null,
  25. "sportcalorie": null,
  26. "sleeptotal": null,
  27. "sleeplow": null,
  28. "lbsinfo": null,
  29. "latitude": null,
  30. "sporttime": null,
  31. "reserve1": null,
  32. "sleepdeep": null,
  33. "reserve5": null,
  34. "reserve4": null,
  35. "status": "100",
  36. "page": 1,
  37. "sysCompanyCode": null,
  38. "rows": 10,
  39. "createdateEnd": null,
  40. "heart": "101",
  41. "systolic": null,
  42. "diastolic": null,
  43. "heartrate": null,
  44. "ox": null,
  45. "deviceid": "626111000053511",
  46. "createdateBegin": null,
  47. "createDate": null,
  48. "userId": null,
  49. "updateBy": null,
  50. "createName": null,
  51. "createBy": null,
  52. "sysOrgCode": null,
  53. "updateName": null,
  54. "testType": "血压",
  55. "updateDate": null
  56. },
  57. {
  58. ...............
  59. }
  60. ],
  61. "statusCode": "000000",
  62. "error": ""
  63. }
  64. ### 2, 查询手表数据(获取最新一条数据)
  65. ```java
  66. [POST] http://127.0.0.1/healthCare/rest/watchController/getEntityByDeviceid
  67. body :{
  68. "userId": "用户id",
  69. "testType": "sos报警"//测试类型参数testType: 【sos报警/摔倒报警/血压/心率/计步器/睡眠/血氧】
  70. }
  71. 返回结果:{
  72. "result": {
  73. "id": "402881ec5f38e48d015f38e8523e0000",
  74. "type": null,
  75. "statustime": "100"null,
  76. "action": "sensor",
  77. "status": "100",
  78. "page": 1,
  79. "createdateEndsporttime": null,
  80. "heart": "101",
  81. "heartratedevicename": null,
  82. "deviceidsportstep": null,
  83. "sportdistance": null,
  84. "sportcalorie": null,
  85. "reserve5": null,
  86. "reserve3": null,
  87. "reserve2": null,
  88. "sleeplow": null,
  89. "reserve4": null,
  90. "sleeptotal": null,
  91. "lbsinfo": null,
  92. "sleepdeep": null,
  93. "longitude": null,
  94. "reserve1": null,
  95. "latitude": null,
  96. "createDate": 1508754670000,
  97. "updateBy": null,
  98. "sysOrgCode": null,
  99. "createBy": null,
  100. "updateName": null,
  101. "createName": null,
  102. "updateDate": null,
  103. "userId": "626111000053511402881035ebd51e0015ebd5353590001",
  104. "diastolicsysCompanyCode": null,
  105. "realname": null,
  106. "rows": 10,
  107. "createdateBegin": null,
  108. "createdateEnd": null,
  109. "systolic": null,
  110. "ox": null,
  111. "sportdistanceheart": "200",
  112. "diastolic": null,
  113. "sleepdeepdeviceid": "626111000053511",
  114. "heartrate": null,
  115. "longitude": null,
  116. "sporttime": null,
  117. "sleeptotal": null,
  118. "sleeplow": null,
  119. "lbsinfo": null,
  120. "sportstep": null,
  121. "latitude": null,
  122. "sportcalorie": null,
  123. "reserve1": null,
  124. "devicename": null,
  125. "reserve2": null,
  126. "reserve3": null,
  127. "reserve5": null,
  128. "reserve4": null,
  129. "rows": 10,
  130. "createdateBegin": null,
  131. "sysCompanyCode": null,
  132. "createDate": null,
  133. "updateName": null,
  134. "createName": null,
  135. "sysOrgCode": null,
  136. "updateBy": null,
  137. "updateDate": null,
  138. "createBy": null,
  139. "userIdtestType": "123心率"
  140. },
  141. "error": "",
  142. "statusCode": "000000",
  143. "error": ""
  144. }
  145. <div class="md-section-divider"></div>

3,智能手表统计接口

  1. [POST] http://127.0.0.1/healthCare/rest/watchController/getEntityByDeviceid
  2. body :{
  3. "userId": "402881035ebd51e0015ebd5353590001",
  4. "deviceid": "626111000053511",
  5. "testType": "心率",
  6. "createdateBegin": "2017-10-01",
  7. "createdateEnd": "2017-10-07"
  8. }//备注://测试类型参数testType: 【sos报警/摔倒报警/血压/心率/计步器/睡眠/血氧】
  9. 返回结果:{
  10. "result": [
  11. {
  12. "heart_sum": 8027,//心率
  13. "heart_avg": "101.61",
  14. "heart_amax": "50",
  15. "heart_min": "101",
  16. "systolic_sum": "101",//血压高压统计
  17. "systolic_avg": "101",
  18. "systolic_amax": "101",
  19. "systolic_min": "101",
  20. "diastolic_sum": "101",//血压低压统计
  21. "diastolic_avg": "101",
  22. "diastolic_amax": "101",
  23. "diastolic_min": "101",
  24. "heartrate_sum": "101",//血压心率值统计
  25. "heartrate_avg": "101",
  26. "heartrate_amax": "101",
  27. "heartrate_min": "101",
  28. "sportstep_sum": "101",//计步器运动步数
  29. "sportstep_avg": "101",
  30. "sportstep_amax": "101",
  31. "sportstep_min": "101",
  32. "sportdistance_sum": "101",//计步器运动里程(公里)
  33. "sportdistance_avg": "101",
  34. "sportdistance_amax": "101",
  35. "sportdistance_min": "101",
  36. "sportcalorie_sum": "101", //计步器运动消耗的卡路里
  37. "sportcalorie_avg": "101",
  38. "sportcalorie_amax": "101",
  39. "sportcalorie_min": "101",
  40. "sporttime_sum": "101",//计步器运动时长(分钟)
  41. "sporttime_avg": "101",
  42. "sporttime_amax": "101",
  43. "sporttime_min": "101",
  44. "sleeptotal_sum": "101",//睡眠睡眠总时长(分钟)
  45. "sleeptotal_avg": "101",
  46. "sleeptotal_amax": "101",
  47. "sleeptotal_min": "101",
  48. "sleeplow_sum": "101",//睡眠浅睡眠时长(分钟)
  49. "sleeplow_avg": "101",
  50. "sleeplow_amax": "101",
  51. "sleeplow_min": "101",
  52. "sleepdeep_sum": "101",//睡眠深睡眠时长(分钟)
  53. "sleepdeep_avg": "101",
  54. "sleepdeep_amax": "101",
  55. "sleepdeep_min": "101",
  56. "ox_sum": "101",//血氧深睡眠时长(分钟)
  57. "ox_avg": "101",
  58. "ox_amax": "101",
  59. "ox_min": "101",
  60. "testtime": "2017-10-23"
  61. }
  62. ],
  63. "statusCode": "000000",
  64. "error": ""
  65. }
  66. <div class="md-section-divider"></div>

十五、尿检:

1,添加测量数据

  1. <div class="md-section-divider"></div>
  2. ```java
  3. [post] rest/hUrineTestController
  4. body:{
  5. "userid":"",//用户id
  6. "token":"",
  7. "leu":"",//白细胞
  8. "nit":"",//亚硝酸盐
  9. "ubg":"",//尿胆原
  10. "pro":"",//蛋白质
  11. "ph":"",//ph
  12. "bld":"",//潜血
  13. "sg":"",//比重
  14. "ket":"",//酮体
  15. "bil":"",//胆红素
  16. "glu":"",//葡萄糖
  17. "vc":"",//vc
  18. "bil":"",//胆红素
  19. "source":"",//数据来源(ios,android,wx)
  20. "boundtype":"",//绑定类型,暂时只有bluetooth
  21. "name":"",//设备名称
  22. }
  23. result:{
  24. "result": {
  25. "name": "apple watch 38mm",
  26. "id": "ff8080815fb427f2015fb42adf1f0000",
  27. "source": "ios",
  28. "createDate": 1510556229398,
  29. "leu": "2",
  30. "nit": "3",
  31. "ubg": "4",
  32. "pro": "5",
  33. "ph": "6",
  34. "bld": "3",
  35. "sg": "2",
  36. "ket": "1",
  37. "bil": "2",
  38. "glu": "2",
  39. "vc": "3",
  40. "boundtype": "bluetooth",
  41. "userid": "ff8080815f291a71015f291aeb400000"
  42. },
  43. "error": "",
  44. "statusCode": "000000"
  45. }
  46. error:{"result":"","error":"ph丢失","statusCode":"666666"}

2,通过数据id查看数据

  1. [get] rest/hUrineTestController/{id}
  2. result:{"result":{},"error":"","statusCode":"000000"}

3,通过用户id查看数据

  1. [post] rest/hUrineTestController/get
  2. body:{
  3. "userid":"",//用户id
  4. "startindex":"",//起始下标,分页用
  5. "pagesize":"",//每页条数
  6. "begincreatetime":"2017-01-01 12:01:21" ,
  7. "endcreatetime":"2017-01-01 12:01:21"
  8. }
  9. result:{"result":[{}],"statusCode":"000000","error":""}

4,统计信息

  1. [get] rest/hUrineTestController/count/{userid}/{field}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. field:{leu|nit|ubg|pro|ph|bld|sg|ket|bil|glu|vc}
  4. result:{
  5. "result": [
  6. {
  7. "date": "2017-10-20",
  8. "field": "vc",
  9. "max": "5",
  10. "min": "1",
  11. "avg": 3
  12. }
  13. ],
  14. "error": "",
  15. "statusCode": "000000"
  16. }

5,查看时间范围内指定指标最大的血压数据

  1. [post] rest/hUrineTestController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{leu|nit|ubg|pro|ph|bld|sg|ket|bil|glu|vc}
  5. "userid":""
  6. }
  7. result:{
  8. "result": [
  9. {
  10. "name": "apple watch 38mm",
  11. "id": "ff8080815fb427f2015fb42adf1f0000",
  12. "createDate": 1510556229000,
  13. "source": "ios",
  14. "userid": "ff8080815f291a71015f291aeb400000",
  15. "leu": "2",
  16. "nit": "3",
  17. "ubg": "4",
  18. "pro": "5",
  19. "ph": "6",
  20. "bld": "3",
  21. "sg": "2",
  22. "ket": "1",
  23. "bil": "2",
  24. "glu": "2",
  25. "vc": "3",
  26. "boundtype": "bluetooth"
  27. }
  28. ],
  29. "statusCode": "000000",
  30. "error": ""
  31. }
  32. error:{"result":"","statusCode":"666666","error":"字段格式不正确"}

6,查看时间范围内指定指标最小的血压数据

  1. [post] rest/hUrineTestController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "field":"",//{leu|nit|ubg|pro|ph|bld|sg|ket|bil|glu|vc}
  5. "userid":""
  6. }
  7. result:{"result":[],"error":"","statusCode":"000000"}

十六、心电检测:

1,添加测量数据

  1. [post] rest/hElectrocardingraphyController
  2. body:{
  3. "userid":"",//用户id
  4. "token":"",
  5. "hr":"",//心率
  6. "result":"",//测量结果
  7. "source":"",//数据来源(ios,android,wx)
  8. "boundtype":"",//绑定类型,暂时只有bluetooth
  9. "name":"",//设备名称
  10. }
  11. result:{
  12. "result": {
  13. "name": "apple watch 38mm",
  14. "id": "ff8080815fb4552a015fb4592cc30000",
  15. "result": "心跳蹦蹦的",
  16. "userid": "ff8080815f291a71015f291aeb400000",
  17. "source": "ios",
  18. "createDate": 1510559263848,
  19. "hr": "3",
  20. "boundtype": "bluetooth"
  21. },
  22. "error": "",
  23. "statusCode": "000000"
  24. }
  25. error:{"result":"","error":"result丢失","statusCode":"666666"}

2,通过数据id查看数据

  1. [get] rest/hElectrocardingraphyController/{id}
  2. result:{"result":{},"error":"","statusCode":"000000"}

3,通过用户id查看数据

  1. [post] rest/hElectrocardingraphyController/get
  2. body:{
  3. "userid":"",//用户id
  4. "startindex":"",//起始下标,分页用
  5. "pagesize":"",//每页条数
  6. "begincreatetime":"2017-01-01 12:01:21" ,
  7. "endcreatetime":"2017-01-01 12:01:21"
  8. }
  9. result:{"result":[{}],"statusCode":"000000","error":""}

4,统计信息

  1. [get] rest/hElectrocardingraphyController/count/{userid}/{starttime}/{endtime}
  2. //{用户id,字段:(),开始时间(yyyy-MM-dd) 结束时间(yyyy-MM-dd)}
  3. result:{
  4. "result": [
  5. {
  6. "date": "2017-10-20",
  7. "field": "hr",
  8. "max": "5",
  9. "min": "1",
  10. "avg": 3
  11. }
  12. ],
  13. "error": "",
  14. "statusCode": "000000"
  15. }

5,查看时间范围内指定指标最大的血压数据

  1. [post] rest/hElectrocardingraphyController/max
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "userid":""
  5. }
  6. result:{
  7. "result": [
  8. {
  9. "name": "apple watch 38mm",
  10. "id": "ff8080815fb4552a015fb4592cc30000",
  11. "result": "心跳蹦蹦的",
  12. "userid": "ff8080815f291a71015f291aeb400000",
  13. "source": "ios",
  14. "createDate": 1510559264000,
  15. "hr": "3",
  16. "boundtype": "bluetooth"
  17. }
  18. ],
  19. "statusCode": "000000",
  20. "error": ""
  21. }
  22. error:{"result":"","statusCode":"666666","error":"字段格式不正确"}

6,查看时间范围内指定指标最小的血压数据

  1. [post] rest/hElectrocardingraphyController/min
  2. body:{
  3. "time":"",//{一天:1d,一周1w,一月:1m,一年:1y}
  4. "userid":""
  5. }
  6. result:{"result":[],"error":"","statusCode":"000000"}

十七,资讯信息

1,查询资讯信息列表

  1. [post]rest/hInformationController/list
  2. body:{
  3. "startindex":"0",
  4. "pagesize":"10",
  5. "type":"recommend",//必填,字段见下表
  6. "begincreatetime":"2017-10-12 00:00:00", //非必填
  7. "endcreatetime":"2018-12-13 00:00:00"//非必填
  8. }
  9. result:{
  10. "result": [
  11. {
  12. "id": "ff8080815fc89158015fc898256f0003",
  13. "type": "recommend",
  14. "content": "
  15. <p>
  16. <img src=\"http://localhost:8080/healthCare/plug-in/ueditor/jsp//upload1/20171117/62191510898934190.jpg\"/>q&#39;q&#39;q&#39;q&#39;q&#39;q&#39;q&#39;q&nbsp;
  17. </p>",
  18. "status": "1",
  19. "author": "正在做",
  20. "title": "花钱不花钱",
  21. "createtime": 1510769313000,
  22. "imageUrl": "upload/files/20171117140856WywTyriS.jpg"
  23. },
  24. {
  25. "id": "ff8080815fbed195015fbed3ab420005",
  26. "type": "recommend",
  27. "content": "含笑半步癫",
  28. "status": "1",
  29. "author": "zn",
  30. "title": "含笑半步癫",
  31. "createtime": 1510648651000,
  32. "imageUrl": "upload/files/20171115163744EV3PPGMf.jpg"
  33. },
  34. {
  35. "id": "ff8080815fbec00a015fbeca86890001",
  36. "type": "recommend",
  37. "content": "大力丸很好吃,吃完上天",
  38. "status": "1",
  39. "author": "张宁",
  40. "title": "大力丸",
  41. "createtime": 1510604846000,
  42. "imageUrl": "upload/files/20171115163656YT7dkrKb.jpeg"
  43. }
  44. ],
  45. "statusCode": "000000",
  46. "error": ""
  47. }

field:

类型名称 类型编码
推荐 recommend
饮食运动 dietexercise
产品体检 healthexam
精彩活动 activity
降糖管理 bloodsugar
降脂管理 bloodfat
降压管理 bloodpresure
医学前沿 medicine
药物知识 drugknowledge

2,通过资讯id获取一条数据

  1. [get] rest/hInformationController/{id}
  2. result:{}

十八、管理计划

1,查询管理计划信息

  1. [post]rest/hInformationController/list
  2. body:{
  3. "startindex":"0",
  4. "pagesize":"10",
  5. "type":"food",//必填,字段见下表
  6. "begincreatetime":"2017-10-12 00:00:00", //非必填
  7. "endcreatetime":"2018-12-13 00:00:00"//非必填
  8. }
  9. result:{
  10. "result": [
  11. {
  12. "id": "402881035fd85161015fd8558ee90004",
  13. "type": "food",
  14. "content": "
  15. <p>
  16. <span style=\"color: rgb(51, 51, 51); font-family: arial, 宋体; font-size: 14px; text-indent: 28px; background-color: rgb(255, 255, 255);\">生命里,一些缱绻,无论素净,还是喧哗,都已经被岁月赋予了清喜的味道,一些闲词,或清新,或淡雅,总会在某一个回眸的时刻醉了流年,濡湿了柔软的心,冥冥之中,我们沿着呼唤的风声,终于在堆满落花的秋里,再次重逢,念在天涯,心在咫尺,我相信,一米阳光,才是我们最好的距离。</span>
  17. </p>",
  18. "status": "1",
  19. "createDate": 1511163007000,
  20. "title": "三款花茶能淡斑,美肤 解决你的烦恼",
  21. "author": "坤渔科技",
  22. "imageUrl": "upload/files/20171120153007MBnuEeh9.jpg"
  23. }
  24. ],
  25. "statusCode": "000000",
  26. "error": ""
  27. }

field:

类型名称 类型编码
饮食建议 food
运动建议 sport
生活习惯 lifestyle
健康食谱 cookbook
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注