POST api/Agent/Platform/Broadcast/AddNew
生产商的用户,添加一个待审核的公告时使用的API。 此操作只添加一个待审核的主记录,稍后还需要添加影引件图片,才是一个完整的公告。
Request Information
URI Parameters
None.
Body Parameters
添加的公告的主记录的内容
PlatformBroadcastMainItemName | Description | Type | Additional information |
---|---|---|---|
BroadcaseId |
公告ID Bigint PK 自增长,在新增时,此值不会采信。 |
integer |
Required |
Title |
公告标题 Varchar(60) NN |
string |
Required Max length: 60 |
ImportmentLevel |
等级 Char(1) NN 1一般,2重要,3非常重要 |
string |
Required Max length: 1 |
ReleaseStatus |
在新增的时候,这个值不会被采信(新增,修改时,这个值永远是“0”)。 状态 Char(1) NN ‘0’正在审核中,‘1’已通过审核,‘2’审核不通过,‘3’已撤回 |
string |
Max length: 1 |
BroadTime |
发布时间 Datetime NN 在新增和修改时,这个值永远不会被采信。 |
date |
None. |
EffectTime |
有效期至 DateTime NN |
date |
Required |
ToProcedure |
是否被生产商用户阅读 Char(1) NN ‘1’表示是,其他值表示否,此值表示需要展示给生产商的用户。 |
string |
Required Matching regular expression pattern: 1|0 Max length: 1 |
ToAgent |
是否被运营商用户阅读 Char(1) NN ‘1’表示是,其他值表示否,此值表示需要展示给运营商用户。 |
string |
Required Matching regular expression pattern: 1|0 Max length: 1 |
ToFarmer |
是否被农户阅读 Char(1) NN ‘1’表示是,其他值表示否,此值表示需要展示给农户用户。 |
string |
Required Matching regular expression pattern: 1|0 Max length: 1 |
ToMonitor |
是否被监控平台用户阅读 Char(1) NN ‘1’表示是,其他值表示否,此值表示需要展示给监控平台用户。 |
string |
Required Matching regular expression pattern: 1|0 Max length: 1 |
AuthorType |
发布者类别 Char(1) NN “P“生产商,”S”运营商 |
string |
Required Matching regular expression pattern: S|P Max length: 1 |
UserName |
生产商用户ID Varchar(20) 。 插入和修改时,此值永远不会被采信,系统会从安全上下文中取值。 |
string |
Max length: 20 |
AgentId |
运营商ID Bigint 。 插入和修改时,此值永远不会被采信,系统会从安全上下文中取值。 |
integer |
None. |
UserCode |
运营商用户ID Int 插入和修改时,此值永远不会被采信,系统会从安全上下文中取值。 |
integer |
None. |
ReadCount |
阅读量 Int NN,插入和修改时,此值永远不会被采信。 |
integer |
None. |
AuthUserName |
审核 人 Varchar(20),插入和修改时,此值永远不会被采信。 |
string |
None. |
AuthTime |
审核时间 datetime,插入和修改时,此值永远不会被采信。 |
date |
None. |
AuthDescription |
审核通过或不通过的原因描述,插入和修改时,此值永远不会被采信,仅用于返回数据。 |
string |
None. |
TextContent |
内容简要 Varchar(200) NN 文本简要内容。 |
string |
Required Max length: 200 |
Request Formats
application/json, text/json
{ "BroadcaseId": 1, "Title": "sample string 2", "ImportmentLevel": "sample string 3", "ReleaseStatus": "sample string 4", "BroadTime": "2025-04-28T14:58:11.2584605+08:00", "EffectTime": "2025-04-28T14:58:11.2584605+08:00", "ToProcedure": "sample string 7", "ToAgent": "sample string 8", "ToFarmer": "sample string 9", "ToMonitor": "sample string 10", "AuthorType": "sample string 11", "UserName": "sample string 12", "AgentId": 13, "UserCode": 14, "ReadCount": 15, "AuthUserName": "sample string 16", "AuthTime": "2025-04-28T14:58:11.2584605+08:00", "AuthDescription": "sample string 18", "TextContent": "sample string 19" }
application/xml, text/xml
<PlatformBroadcastMainItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer.Flowmeter"> <AgentId>13</AgentId> <AuthDescription>sample string 18</AuthDescription> <AuthTime>2025-04-28T14:58:11.2584605+08:00</AuthTime> <AuthUserName>sample string 16</AuthUserName> <AuthorType>sample string 11</AuthorType> <BroadTime>2025-04-28T14:58:11.2584605+08:00</BroadTime> <BroadcaseId>1</BroadcaseId> <EffectTime>2025-04-28T14:58:11.2584605+08:00</EffectTime> <ImportmentLevel>sample string 3</ImportmentLevel> <ReadCount>15</ReadCount> <ReleaseStatus>sample string 4</ReleaseStatus> <TextContent>sample string 19</TextContent> <Title>sample string 2</Title> <ToAgent>sample string 8</ToAgent> <ToFarmer>sample string 9</ToFarmer> <ToMonitor>sample string 10</ToMonitor> <ToProcedure>sample string 7</ToProcedure> <UserCode>14</UserCode> <UserName>sample string 12</UserName> </PlatformBroadcastMainItem>
application/x-www-form-urlencoded
Sample not available.
application/bson
Binary JSON content. See http://bsonspec.org for details.
Response Information
Resource Description
生产商的用户,添加一个待审核的公告时使用的API。 此操作只添加一个待审核的主记录,稍后还需要添加影引件图片,才是一个完整的公告。
CommonOperationResultWithTagOfInt64Name | Description | Type | Additional information |
---|---|---|---|
errcode | integer |
None. |
|
errmsg | string |
None. |
|
tag | integer |
None. |
Response Formats
application/json, text/json
{ "errcode": 1, "errmsg": "sample string 2", "tag": 3 }
application/xml, text/xml
<CommonOperationResultWithTagOflong xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/DigitalScience.DataTransfer"> <errcode>1</errcode> <errmsg>sample string 2</errmsg> <tag>3</tag> </CommonOperationResultWithTagOflong>
application/bson
Binary JSON content. See http://bsonspec.org for details.