获取销售订单权限商品SKU精简信息列表
<p>[TOC]</p>
<h4><strong>接口名称</strong></h4>
<ul>
<li><code>获取销售订单权限商品 SKU 精简信息列表</code></li>
</ul>
<h4><strong>接口描述</strong></h4>
<ul>
<li><code>根据交易单号(tradeNo)获取订单关联的商品 SKU 简化信息列表,包含 SKU 基础信息、价格、库存等。</code></li>
</ul>
<h4><strong>请求方式</strong></h4>
<p><code>GET</code></p>
<h4><strong>请求 URL</strong></h4>
<pre><code>http://localhost:48082/admin-api/product/spu/trade/sku-simple-list</code></pre>
<h4><strong>请求参数</strong></h4>
<table>
<thead>
<tr>
<th>参数名</th>
<th>必填</th>
<th>类型</th>
<th>说明</th>
<th>示例值</th>
</tr>
</thead>
<tbody>
<tr>
<td>tradeNo</td>
<td>否</td>
<td>字符串</td>
<td>交易单号(唯一标识)</td>
<td><code>o202410041915591</code></td>
</tr>
</tbody>
</table>
<hr />
<h3><strong>响应参数</strong></h3>
<h5>1. 根字段</h5>
<table>
<thead>
<tr>
<th>字段名</th>
<th>类型</th>
<th>是否可为空</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>code</td>
<td>整数</td>
<td>否</td>
<td>状态码(0 表示成功,其他为错误码)</td>
</tr>
<tr>
<td>data</td>
<td>数组</td>
<td>是</td>
<td>SKU 精简信息列表(失败时可能为空)</td>
</tr>
<tr>
<td>msg</td>
<td>字符串</td>
<td>是</td>
<td>错误信息(成功时通常为空)</td>
</tr>
</tbody>
</table>
<hr />
<h5>2. <code>data</code> 数组(SKU 精简信息列表)</h5>
<table>
<thead>
<tr>
<th>字段名</th>
<th>类型</th>
<th>是否可为空</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>id</td>
<td>整数</td>
<td>否</td>
<td>SKU 唯一标识 ID</td>
</tr>
<tr>
<td>spuId</td>
<td>整数</td>
<td>否</td>
<td>所属 SPU(商品)ID</td>
</tr>
<tr>
<td>name</td>
<td>字符串</td>
<td>否</td>
<td>SKU 名称(如商品名称+规格描述)</td>
</tr>
<tr>
<td>price</td>
<td>整数</td>
<td>否</td>
<td>销售价(单位:分,示例 <code>34900</code>=349元)</td>
</tr>
<tr>
<td>marketPrice</td>
<td>整数</td>
<td>否</td>
<td>市场价(单位:分)</td>
</tr>
<tr>
<td>costPrice</td>
<td>整数</td>
<td>否</td>
<td>成本价(单位:分)</td>
</tr>
<tr>
<td>barCode</td>
<td>字符串</td>
<td>是</td>
<td>商品条形码(示例为 <code>null</code>)</td>
</tr>
<tr>
<td>picUrl</td>
<td>字符串</td>
<td>否</td>
<td>SKU 图片 URL</td>
</tr>
<tr>
<td>stock</td>
<td>整数</td>
<td>是</td>
<td>当前库存(示例为 <code>95</code>,<code>null</code> 表示无库存)</td>
</tr>
<tr>
<td>weight</td>
<td>数值</td>
<td>是</td>
<td>商品重量(单位需确认,示例为 <code>null</code>)</td>
</tr>
<tr>
<td>volume</td>
<td>数值</td>
<td>是</td>
<td>商品体积(单位需确认,示例为 <code>null</code>)</td>
</tr>
<tr>
<td>firstBrokeragePrice</td>
<td>整数</td>
<td>否</td>
<td>一级分销佣金(单位:分,示例为 <code>0</code>)</td>
</tr>
<tr>
<td>secondBrokeragePrice</td>
<td>整数</td>
<td>否</td>
<td>二级分销佣金(单位:分,示例为 <code>0</code>)</td>
</tr>
</tbody>
</table>
<hr />
<h3><strong>成功响应示例</strong></h3>
<pre><code class="language-json">{
&quot;code&quot;: 0,
&quot;data&quot;: [
{
&quot;id&quot;: 1,
&quot;spuId&quot;: 633,
&quot;name&quot;: &quot;索尼(SONY)WH-CH510 无线立体声耳机 学生网课&quot;,
&quot;price&quot;: 34900,
&quot;marketPrice&quot;: 34900,
&quot;costPrice&quot;: 1,
&quot;barCode&quot;: null,
&quot;picUrl&quot;: &quot;https://static.iocoder.cn/mall/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg&quot;,
&quot;stock&quot;: 95,
&quot;weight&quot;: null,
&quot;volume&quot;: null,
&quot;firstBrokeragePrice&quot;: 0,
&quot;secondBrokeragePrice&quot;: 0
}
],
&quot;msg&quot;: &quot;&quot;
}</code></pre>
<hr />
<h3><strong>注意事项</strong></h3>
<ol>
<li><strong>价格单位</strong>:<code>price</code>、<code>marketPrice</code> 等价格字段单位为分,需转换为元(如 <code>34900</code> 分 = 349 元)。</li>
<li><strong>空值处理</strong>:<code>barCode</code>、<code>stock</code>、<code>weight</code>、<code>volume</code> 可能为 <code>null</code>,需前端兼容处理。</li>
<li><strong>库存逻辑</strong>:<code>stock</code> 为 <code>null</code> 时可能表示库存未启用或无限库存。</li>
<li><strong>佣金字段</strong>:<code>firstBrokeragePrice</code> 和 <code>secondBrokeragePrice</code> 为分销场景使用,非分销订单可能为 <code>0</code>。</li>
<li><strong>图片 URL</strong>:确保 <code>picUrl</code> 是有效的可访问地址。</li>
</ol>
<ul>
<li>更多返回错误代码请看首页的错误代码描述</li>
</ul>