号卡指定区域参数校验接口
<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/tenantBizAreaSimLog/sim/change/validate</code></pre>
<hr />
<h4><strong>请求参数(Body JSON)</strong></h4>
<p><code>10 按号段指定号卡业务区域</code></p>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tenantCode</code></td>
<td>String</td>
<td>是</td>
<td>号卡所属渠道商编码</td>
<td><code>&quot;1042&quot;</code></td>
</tr>
<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>10</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></td>
<td>String</td>
<td>条件</td>
<td>ICCID起始号段(<code>changeAreaType=10</code>时必填)</td>
<td><code>&quot;123001&quot;</code></td>
</tr>
<tr>
<td><code>iccidEnd</code></td>
<td>String</td>
<td>条件</td>
<td>ICCID结束号段(<code>changeAreaType=10</code>时必填)</td>
<td><code>&quot;123600&quot;</code></td>
</tr>
</tbody>
</table>
<p><code>20 按ICCID集合指定号卡业务区域</code></p>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tenantCode</code></td>
<td>String</td>
<td>是</td>
<td>号卡所属渠道商编码</td>
<td><code>&quot;1042&quot;</code></td>
</tr>
<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>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>
</tbody>
</table>
<p><code>30 按导入指定号卡业务区域</code></p>
<table>
<thead>
<tr>
<th>字段</th>
<th>类型</th>
<th>必填</th>
<th>描述</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>tenantBizAreaId</code></td>
<td>Long</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>changeAreaType</code></td>
<td>Integer</td>
<td>是</td>
<td>指定号卡区域类型:<br><code>10</code>=按号段,<code>20</code>=按卡号列表,<code>30</code>=按数量</td>
<td><code>30</code></td>
</tr>
<tr>
<td><code>importRequestId</code></td>
<td>String</td>
<td>条件</td>
<td>按【导入】新增,导入成功响应的KEY</td>
<td><code>1914f39b18a542fc9b01415ca70f42c2</code></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>changeCount</code></td>
<td>Integer</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>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>
<hr />
<h4><strong>请求示例</strong></h4>
<p><code>10 按号段指定号卡业务区域</code></p>
<pre><code class="language-json">{
&quot;changeAreaType&quot;: 10,
&quot;iccidHead&quot;: &quot;89861500192441&quot;,
&quot;iccidBegin&quot;: &quot;123001&quot;,
&quot;iccidEnd&quot;: &quot;123600&quot;,
&quot;tenantCode&quot;: &quot;1042&quot;
}</code></pre>
<p><code>20 按ICCID集合指定号卡业务区域</code></p>
<pre><code class="language-json">{
&quot;changeAreaType&quot;: &quot;20&quot;,
&quot;changeMsisdnList&quot;: [
{
&quot;iccid&quot;: &quot;89861500192441123001&quot;
},
{
&quot;iccid&quot;: &quot;89861500192441123002&quot;
},
{
&quot;iccid&quot;: &quot;89861500192441123003&quot;
}
],
&quot;tenantCode&quot;: &quot;1042&quot;,
&quot;tenantBizAreaId&quot;: 1
}</code></pre>
<p><code>30 按导入指定号卡业务区域</code></p>
<pre><code class="language-json">{
&quot;changeAreaType&quot;: 10,
&quot;changeCount&quot;:50,
&quot;tenantBizAreaId&quot;: 1,
&quot;tenantCode&quot;: &quot;1042&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;: false,
&quot;data&quot;: [
{
&quot;tenantCode&quot;: &quot;1051&quot;,
&quot;msisdn&quot;: &quot;19277552720&quot;,
&quot;iccid&quot;: &quot;89861500192441123001&quot;,
&quot;changeStatus&quot;: 30,
&quot;failMsg&quot;: &quot;号卡归属渠道商与当前渠道商不一致&quot;
},
{
&quot;tenantCode&quot;: &quot;1042&quot;,
&quot;msisdn&quot;: &quot;19277552721&quot;,
&quot;iccid&quot;: &quot;89861500192441123002&quot;,
&quot;changeStatus&quot;: 50,
&quot;failMsg&quot;: &quot;号卡已指定业务区域,并且非当前指定渠道商业务区域报备&quot;
}
],
&quot;changeCount&quot;: 600,
&quot;successCount&quot;: 227,
&quot;exceptionCount&quot;: 373,
&quot;message&quot;: &quot;目前号段包含有373张卡已指定区域,是否将它改为目前指定区域?&quot;,
&quot;requestId&quot;: &quot;dee1e253fb5b416e901834b6d5486b8b&quot;
}
}</code></pre>
<h4><strong>响应示例(失败)</strong></h4>
<pre><code class="language-json">{
&quot;code&quot;: 500,
&quot;msg&quot;: &quot;号卡指定区域所属配置不能为空&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>必填。</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>changeStatus=50</code>),需根据<code>message</code>提示用户确认是否覆盖。</li>
</ul></li>
<li><strong>错误处理</strong>:
<ul>
<li>若<code>bizAreaCode</code>或<code>bizAreaName</code>为空,返回<code>500</code>错误("号卡指定区域不能为空")。</li>
<li>若<code>tenantBizAreaId</code>未关联有效配置,返回<code>500</code>错误("号卡指定区域所属配置不能为空")。</li>
</ul></li>
</ol>