@originxp
2017-11-13T09:42:50.000000Z
字数 2470
阅读 662
1.1 针对多个uid进行群发的功能
URL : /api2/groupSendMessage
请求方式: post
请求参数:
{"ownerId": "190001","token": "saoiewrnxczmnvkjsafo0324ijidfuio","body": {"text": "jwiwimm"},"type": "Text","sendKey":"1493009837628","sendUids": ["34322","5564","23424"]}
注:
* sendUids数组length小于500
* sendKey为13位的时间戳
返回格式
{"data": {"sendKey":"1493009837628"},"message": "success","ok": true}
1.2 针对 科室,警戒值 等进行群发
URL : /api2/groupSendSpecificMessage
请求方式: post
请求参数:
{"ownerId": "190001","token": "saoiewrnxczmnvkjsafo0324ijidfuio","body": {"text": "jwiwimm"},"type": "Text","sendKey":"1493009837628","SpeBody": {"科室id":"19933","科室参数":"234"}}
注:
返回格式
{"data": {"sendKey":"1493009837628"},"message": "success","ok": true}
接口请求不做修改,返回值格式
添加群发消息后的格式:{"data": [{"chatMessage": {"body": {"text": "jwiwimm"},"clientMsgId": 150951694867153200,"createDate": 1509516948000,"groupId": 47752,"id": 874405,"ownerId": "1902915","system": false,"to": "1902915","type": "Text","version": "2.0"},"doctorId": "1901292","doctorName": "控糖顾问","createDate": 1502960773000,"gmtModified": 1502960773000,"id": 47752,"name": "1901292-1902915","ownerId": "1902915","ownerName": "Ant","patientId": "1902915","patientName": "Ant","type": 1,"unreadCount": 16},{"body": {"text": "jwiwimm"},"type": "Text","ownerId": "199083","createDate": "1502960773000","sendKey": "1402960773000","uidCount": "59","receiveNames": "煎蛋,糖友2343,巅峰,堂渔鸥,糖友98932,糖友32332"},],"message": "success","ok": true}
URL : /api2/groupSendMessageDetail
请求方式: post
请求参数:
{"ownerId": "199083","token": "saoiewrnxczmnvkjsafo0324ijidfuio","start": "0","limit": "20"}
返回值
{"data": [{"body": {"text": "jwiwimm"},"type": "Text","ownerId": "199083","createDate": "1502960773000","sendKey": "1402960773000","uidCount": "59","receiveNames": "煎蛋,糖友2343,巅峰,堂渔鸥,糖友98932,糖友32332"},{"body": {"text": "发我IE如确认"},"type": "Text","ownerId": "199083","createDate": "1502960773000","sendKey": "1402960773000","uidCount": "159","receiveNames": "煎蛋,糖友2343,巅峰,堂渔鸥,糖友98932,糖友32332"}],"message": "success","ok": true}
medical接口
URL : /chat/groupSendReceiveDetail
请求方式: post
请求参数:
{"ownerId": "199083","token": "saoiewrnxczmnvkjsafo0324ijidfuio","sendKey": "1402960773000","start": "0","limit": "20"}
返回格式
{"header": {"code": 2000,"message": "OK"},"body": [{"sex": "1","avatarPath": "","diabetesName": "2型糖尿病","userName": "糖友_911235","userId": "1409807","age": "50"},{"sex": "1","avatarPath": "","diabetesName": "2型糖尿病","userName": "糖友_684515","userId": "1406926","age": "50"},{"sex": "1","avatarPath": "/avatar/1474188_avatar.png","diabetesName": "2型糖尿病","userName": "糖友_269049","userId": "1474188","age": "50"}]}