POST api/Mobile/AddChatHistory
添加聊天消息记录
Request Information
URI Parameters
None.
Body Parameters
聊天消息
Collection of ChatHistory| Name | Description | Type | Additional information |
|---|---|---|---|
| Id |
Desc: Default: Nullable:False |
integer |
None. |
| FkId |
Desc:自己ID Default: Nullable:False |
string |
None. |
| FkNickname |
Desc:自己昵称 Default: Nullable:True |
string |
None. |
| FkRole |
Desc:自己角色 1:管理员;2:药师;3:远程审方店员;4调配员;5医师 Default: Nullable:True |
integer |
None. |
| TargetId |
Desc:聊天对象ID Default: Nullable:False |
string |
None. |
| TargetNickname |
Desc:聊天对象昵称 Default: Nullable:True |
string |
None. |
| TargetRole |
Desc:聊天对象角色 1:管理员;2:药师;3:远程审方店员;4调配员;5医师 Default: Nullable:True |
integer |
None. |
| ChatTime |
Desc:消息时间 Default: Nullable:True |
date |
None. |
| ChatContent |
Desc:消息内容 Default: Nullable:True |
string |
None. |
| ProductId |
Desc:聊天产品ID,如处方guid Default: Nullable:True |
string |
None. |
| ChatType |
消息类型 0:发出去的消息 10:收到的消息 20:收到的系统通知 |
integer |
None. |
| CreateTime |
Desc:聊天保存时间 Default:DateTime.Now Nullable:True |
date |
None. |
| ContentType |
消息类型 10:文本 20:图片 30:图文混合 |
integer |
None. |
Request Formats
application/json, text/json
[
{
"Id": 1,
"FkId": "sample string 2",
"FkNickname": "sample string 3",
"FkRole": 1,
"TargetId": "sample string 4",
"TargetNickname": "sample string 5",
"TargetRole": 1,
"ChatTime": "2025-12-11T23:23:07.2979056+08:00",
"ChatContent": "sample string 6",
"ProductId": "sample string 7",
"ChatType": 8,
"CreateTime": "2025-12-11T23:23:07.2979056+08:00",
"ContentType": 1
},
{
"Id": 1,
"FkId": "sample string 2",
"FkNickname": "sample string 3",
"FkRole": 1,
"TargetId": "sample string 4",
"TargetNickname": "sample string 5",
"TargetRole": 1,
"ChatTime": "2025-12-11T23:23:07.2979056+08:00",
"ChatContent": "sample string 6",
"ProductId": "sample string 7",
"ChatType": 8,
"CreateTime": "2025-12-11T23:23:07.2979056+08:00",
"ContentType": 1
}
]
application/xml, text/xml
<ArrayOfChatHistory xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/YCloud.Rcp.Entity.RcpWeb">
<ChatHistory>
<ChatContent>sample string 6</ChatContent>
<ChatTime>2025-12-11T23:23:07.2979056+08:00</ChatTime>
<ChatType>8</ChatType>
<ContentType>1</ContentType>
<CreateTime>2025-12-11T23:23:07.2979056+08:00</CreateTime>
<FkId>sample string 2</FkId>
<FkNickname>sample string 3</FkNickname>
<FkRole>1</FkRole>
<Id>1</Id>
<ProductId>sample string 7</ProductId>
<TargetId>sample string 4</TargetId>
<TargetNickname>sample string 5</TargetNickname>
<TargetRole>1</TargetRole>
</ChatHistory>
<ChatHistory>
<ChatContent>sample string 6</ChatContent>
<ChatTime>2025-12-11T23:23:07.2979056+08:00</ChatTime>
<ChatType>8</ChatType>
<ContentType>1</ContentType>
<CreateTime>2025-12-11T23:23:07.2979056+08:00</CreateTime>
<FkId>sample string 2</FkId>
<FkNickname>sample string 3</FkNickname>
<FkRole>1</FkRole>
<Id>1</Id>
<ProductId>sample string 7</ProductId>
<TargetId>sample string 4</TargetId>
<TargetNickname>sample string 5</TargetNickname>
<TargetRole>1</TargetRole>
</ChatHistory>
</ArrayOfChatHistory>
application/x-www-form-urlencoded
Sample not available.
Response Information
Resource Description
添加聊天消息记录
ResponseModelOfBoolean| Name | Description | Type | Additional information |
|---|---|---|---|
| rows | boolean |
None. |
|
| total | integer |
None. |
|
| errorMsg | string |
None. |
|
| errorCode | string |
None. |
|
| records | integer |
None. |
|
| page | integer |
None. |
|
| extend | Object |
None. |
Response Formats
application/json, text/json
{
"rows": true,
"total": 2,
"errorMsg": "sample string 3",
"errorCode": "sample string 4",
"records": 5,
"page": 1,
"extend": {}
}
application/xml, text/xml
<ResponseModelOfboolean xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/YCloud.Rcp.Entity.WebResponse"> <errorCode>sample string 4</errorCode> <errorMsg>sample string 3</errorMsg> <extend /> <page>1</page> <records>5</records> <rows>true</rows> <total>2</total> </ResponseModelOfboolean>