新增渠道商业务区域报备信息接口
<h3>API接口文档:渠道商业务区域报备-新增</h3>
<hr />
<h4><strong>接口名称</strong></h4>
<p>渠道商业务区域报备新增配置</p>
<h4><strong>接口描述</strong></h4>
<p>新增渠道商业务区域配置,支持设置阈值、告警规则及号卡区域分配策略(按号段/卡号列表/数量)。接口会返回配置结果及每张号卡的变更状态。</p>
<hr />
<h4><strong>请求方式</strong></h4>
<p><code>POST</code></p>
<h4><strong>请求URL</strong></h4>
<pre><code>/cbn/tenantBizArea/save</code></pre>
<hr />
<h4><strong>请求参数(Body JSON)</strong></h4>
<h5><strong>基础配置参数</strong></h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>id</code></td>
<td>Integer</td>
<td>是</td>
<td>ID</td>
<td><code>1</code></td>
</tr>
<tr>
<td><code>tenantCode</code></td>
<td>String</td>
<td>是</td>
<td>渠道商编码</td>
<td><code>&quot;1042&quot;</code></td>
</tr>
<tr>
<td><code>bizArea</code></td>
<td>String</td>
<td>是</td>
<td>业务区域ID(<code>sys_cn_area.id</code>,多个用<code>,</code>分割)</td>
<td><code>&quot;20&quot;</code></td>
</tr>
<tr>
<td><code>areaThreshold</code></td>
<td>BigDecimal</td>
<td>是</td>
<td>业务区域限定阈值(单位:%)</td>
<td><code>20</code></td>
</tr>
<tr>
<td><code>alarmDay</code></td>
<td>Integer</td>
<td>是</td>
<td>告警监测天数</td>
<td><code>5</code></td>
</tr>
<tr>
<td><code>alarmActiveNum</code></td>
<td>Integer</td>
<td>是</td>
<td>告警检测激活数</td>
<td><code>100</code></td>
</tr>
<tr>
<td><code>alarmChangeTypes</code></td>
<td>String</td>
<td>是</td>
<td>告警处置类型(多选),值参考下方【告警处置类型枚举】</td>
<td><code>&quot;1010,1020,20&quot;</code></td>
</tr>
<tr>
<td><code>agentPerson</code></td>
<td>String</td>
<td>是</td>
<td>代理告警人联系方式</td>
<td><code>&quot;19128983352&quot;</code></td>
</tr>
<tr>
<td><code>businessPerson</code></td>
<td>String</td>
<td>是</td>
<td>商务告警人联系方式</td>
<td><code>&quot;19128983352&quot;</code></td>
</tr>
</tbody>
</table>
<h5><strong>号卡区域分配参数</strong></h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>changeAreaType</code></td>
<td>Integer</td>
<td>是</td>
<td>指定开卡区域类型:<br><code>10</code>=按号段,<code>20</code>=按卡号列表,<code>30</code>=按数量</td>
<td><code>20</code></td>
</tr>
<tr>
<td><code>iccidHead</code></td>
<td>String</td>
<td>条件</td>
<td>ICCID前14位(<code>changeAreaType=10</code>时必填)</td>
<td><code>&quot;89861500192441&quot;</code></td>
</tr>
<tr>
<td><code>iccidBegin</code>/<code>iccidEnd</code></td>
<td>String</td>
<td>条件</td>
<td>ICCID起始/结束号段(<code>changeAreaType=10</code>时必填)</td>
<td><code>&quot;123001&quot;</code>/<code>&quot;123600&quot;</code></td>
</tr>
<tr>
<td><code>changeMsisdnList</code></td>
<td>List<Object></td>
<td>条件</td>
<td>ICCID号列表(<code>changeAreaType=20</code>时必填)</td>
<td><code>[{&quot;iccid&quot;:&quot;89861500192441123001&quot;}]</code></td>
</tr>
<tr>
<td><code>changeCount</code></td>
<td>Integer</td>
<td>条件</td>
<td>指定号卡区域数量(<code>changeAreaType=30</code>时必填)</td>
<td><code>100</code></td>
</tr>
</tbody>
</table>
<h6><strong><code>changeMsisdnList</code>子对象结构</strong></h6>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>msisdn</code></td>
<td>String</td>
<td>否</td>
<td>192号码</td>
</tr>
<tr>
<td><code>iccid</code></td>
<td>String</td>
<td>是</td>
<td>ICCID号</td>
</tr>
</tbody>
</table>
<hr />
<h4><strong>响应参数</strong></h4>
<h5>整体结构</h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>code</code></td>
<td>Integer</td>
<td>状态码(0=成功)</td>
</tr>
<tr>
<td><code>msg</code></td>
<td>String</td>
<td>状态描述</td>
</tr>
<tr>
<td><code>data</code></td>
<td>Object</td>
<td>配置结果数据</td>
</tr>
</tbody>
</table>
<h5><code>data</code> 配置结果对象</h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>success</code></td>
<td>Boolean</td>
<td>整体配置是否成功</td>
</tr>
<tr>
<td><code>data</code></td>
<td>Array</td>
<td>每张号卡的配置结果列表</td>
</tr>
<tr>
<td><code>successCount</code></td>
<td>Integer</td>
<td>配置成功的数量</td>
</tr>
<tr>
<td><code>exceptionCount</code></td>
<td>Integer</td>
<td>配置失败的数量</td>
</tr>
<tr>
<td><code>message</code></td>
<td>String</td>
<td>提示信息(如提交结果)</td>
</tr>
<tr>
<td><code>requestId</code></td>
<td>String</td>
<td>请求唯一标识</td>
</tr>
</tbody>
</table>
<h5><code>data</code> 配置明细项</h5>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tenantCode</code></td>
<td>String</td>
<td>号卡归属渠道商编码</td>
</tr>
<tr>
<td><code>msisdn</code></td>
<td>String</td>
<td>192号码</td>
</tr>
<tr>
<td><code>iccid</code></td>
<td>String</td>
<td>ICCID号</td>
</tr>
<tr>
<td><code>changeAreaType</code></td>
<td>Integer</td>
<td>号卡区域分配类型(<code>10</code>=号段,<code>20</code>=卡号列表,<code>30</code>=数量)</td>
</tr>
<tr>
<td><code>changeTenantBizAreaId</code></td>
<td>Long</td>
<td>新配置的业务区域报备ID</td>
</tr>
<tr>
<td><code>changeAreaCode</code></td>
<td>String</td>
<td>新业务区域编码(<code>sys_cn_area.code</code>,多个用<code>,</code>分割)</td>
</tr>
<tr>
<td><code>changeAreaName</code></td>
<td>String</td>
<td>新业务区域名称(<code>sys_cn_area.name</code>,多个用<code>,</code>分割)</td>
</tr>
<tr>
<td><code>changeStatus</code></td>
<td>Integer</td>
<td>变更状态(见下方【变更状态枚举】)</td>
</tr>
<tr>
<td><code>failMsg</code></td>
<td>String</td>
<td>失败原因(仅<code>changeStatus</code>非<code>SUCCESS</code>时返回)</td>
</tr>
</tbody>
</table>
<h5>变更状态枚举(<code>changeStatus</code>)</h5>
<table>
<thead>
<tr>
<th>值</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>10</td>
<td>成功</td>
</tr>
<tr>
<td>20</td>
<td>失败</td>
</tr>
<tr>
<td>30</td>
<td>号卡归属渠道商不一致</td>
</tr>
<tr>
<td>40</td>
<td>号卡已激活</td>
</tr>
<tr>
<td>50</td>
<td>号卡已指定业务区域</td>
</tr>
</tbody>
</table>
<h5>告警处置类型枚举(<code>alarmChangeTypes</code>)</h5>
<table>
<thead>
<tr>
<th>值</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>10</td>
<td>告警提醒处理</td>
</tr>
<tr>
<td>1010</td>
<td>代理商负责人短信通知</td>
</tr>
<tr>
<td>1020</td>
<td>商务负责人短信通知</td>
</tr>
<tr>
<td>1030</td>
<td>代理商系统界面告警提示</td>
</tr>
<tr>
<td>20</td>
<td>限制开卡处理</td>
</tr>
</tbody>
</table>
<hr />
<h4><strong>请求示例</strong></h4>
<pre><code class="language-json">{
&quot;tenantCode&quot;: &quot;1042&quot;,
&quot;bizArea&quot;: &quot;20&quot;,
&quot;areaThreshold&quot;: 20,
&quot;alarmDay&quot;: 5,
&quot;alarmActiveNum&quot;: 100,
&quot;alarmChangeTypes&quot;: &quot;1010,1020,20&quot;,
&quot;agentPerson&quot;: &quot;19128983352&quot;,
&quot;businessPerson&quot;: &quot;19128983352&quot;,
&quot;changeAreaType&quot;: 20,
&quot;changeMsisdnList&quot;: [
{ &quot;iccid&quot;: &quot;89861500192441123001&quot; },
{ &quot;iccid&quot;: &quot;89861500192441123002&quot; },
{ &quot;iccid&quot;: &quot;89861500192441123003&quot; }
]
}</code></pre>
<h4><strong>响应示例(成功)</strong></h4>
<pre><code class="language-json">{
&quot;code&quot;: 0,
&quot;msg&quot;: &quot;操作成功&quot;,
&quot;data&quot;: {
&quot;success&quot;: true,
&quot;data&quot;: [
{
&quot;tenantCode&quot;: &quot;1042&quot;,
&quot;msisdn&quot;: &quot;19277552720&quot;,
&quot;iccid&quot;: &quot;89861500192441123001&quot;,
&quot;changeAreaType&quot;: 20,
&quot;changeTenantBizAreaId&quot;: 2,
&quot;changeAreaCode&quot;: &quot;120000&quot;,
&quot;changeAreaName&quot;: &quot;天津市&quot;,
&quot;changeStatus&quot;: 10
}
],
&quot;successCount&quot;: 3,
&quot;exceptionCount&quot;: 0,
&quot;message&quot;: &quot;提交成功&quot;,
&quot;requestId&quot;: &quot;07129678026546199ed45ae9fb864c4b&quot;
}
}</code></pre>
<h4><strong>响应示例(失败)</strong></h4>
<pre><code class="language-json">{
&quot;code&quot;: 500,
&quot;msg&quot;: &quot;业务区域ID不能为空&quot;
}</code></pre>
<hr />
<h4><strong>注意事项</strong></h4>
<ol>
<li><strong>参数依赖规则</strong>:
<ul>
<li><code>changeAreaType=10</code>时,必须传递<code>iccidHead</code>、<code>iccidBegin</code>、<code>iccidEnd</code>。</li>
<li><code>changeAreaType=20</code>时,必须传递<code>iccidList</code>或<code>changeMsisdnList</code>。</li>
<li><code>changeAreaType=30</code>时,需传递<code>changeCount</code>。</li>
</ul></li>
<li><strong>业务校验</strong>:
<ul>
<li>若号卡已激活(<code>changeStatus=40</code>)或归属渠道商不一致(<code>changeStatus=30</code>),配置会失败。</li>
<li>重复提交同一号卡时,需根据<code>message</code>确认是否覆盖原有配置。</li>
</ul></li>
<li><strong>字典字段</strong>:
<ul>
<li>响应中的<code>model.dict</code>包含枚举值的映射关系(如告警类型、状态),可用于前端展示。</li>
</ul></li>
</ol>