线下订单(消费记录)
<h1>线下消费订单</h1>
<h2>请求URL</h2>
<p>POST localhost/addons/yun_shop/api.php?route=plugin.wisely-system.open.order.offline&i=1</p>
<h2>请求参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>是否必需</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>body.mobile</td>
<td>string</td>
<td>是</td>
<td>手机号</td>
</tr>
<tr>
<td>body.password</td>
<td>string</td>
<td>是</td>
<td>密码</td>
</tr>
<tr>
<td>body.timestamp</td>
<td>string</td>
<td>是</td>
<td>当前时间戳(秒级10位) *参加签名</td>
</tr>
<tr>
<td>body.notstr</td>
<td>string</td>
<td>是</td>
<td>a-z A-Z 1-9, 随机12位字符串 *参加签名</td>
</tr>
<tr>
<td>order.offline_order_no</td>
<td>string</td>
<td>是</td>
<td>线下订单号</td>
</tr>
<tr>
<td>order.offline_pay_no</td>
<td>string</td>
<td>否</td>
<td>线下支付单号</td>
</tr>
<tr>
<td>order.is_history</td>
<td>int</td>
<td>是</td>
<td>是历史订单 0 否 1是 (历史订单不进行积分/余额的抵扣和增加)</td>
</tr>
<tr>
<td>order.store_sn</td>
<td>string</td>
<td>是</td>
<td>门店编号, 没有编号默认: "00"</td>
</tr>
<tr>
<td>order.offline_order_status</td>
<td>int</td>
<td>是</td>
<td>订单状态, 1已付款 2退款</td>
</tr>
<tr>
<td>order.offline_refund_order_no</td>
<td>string</td>
<td>否</td>
<td>退款单号</td>
</tr>
<tr>
<td>order.deduct_points</td>
<td>string</td>
<td>是</td>
<td>抵扣线上积分</td>
</tr>
<tr>
<td>order.amount</td>
<td>string</td>
<td>是</td>
<td>订单总金额</td>
</tr>
<tr>
<td>order.pay_amount</td>
<td>string</td>
<td>是</td>
<td>支付金额(抵扣线上余额)</td>
</tr>
<tr>
<td>order.create_time</td>
<td>string</td>
<td>是</td>
<td>订单创建时间</td>
</tr>
<tr>
<td>order.pay_time</td>
<td>string</td>
<td>是</td>
<td>付款时间</td>
</tr>
<tr>
<td>order.refund_time</td>
<td>string</td>
<td>否</td>
<td>退款时间</td>
</tr>
<tr>
<td>order.remark</td>
<td>string</td>
<td>否</td>
<td>订单备注</td>
</tr>
<tr>
<td>order.order_goods</td>
<td>array</td>
<td>是</td>
<td>订单商品</td>
</tr>
<tr>
<td>order.order_goods.goods_id</td>
<td>int</td>
<td>是</td>
<td>订单id</td>
</tr>
<tr>
<td>order.order_goods.goods_name</td>
<td>string</td>
<td>是</td>
<td>订单商品名称</td>
</tr>
<tr>
<td>order.order_goods.goods_price</td>
<td>string</td>
<td>是</td>
<td>订单商品价格</td>
</tr>
<tr>
<td>order.order_goods.goods_total</td>
<td>string</td>
<td>是</td>
<td>订单商品数量</td>
</tr>
<tr>
<td>order.order_goods.unit_price</td>
<td>string</td>
<td>是</td>
<td>订单商品单价</td>
</tr>
<tr>
<td>order.pay_list</td>
<td>array</td>
<td>是</td>
<td>订单支付列表</td>
</tr>
<tr>
<td>order.pay_list.pay_code</td>
<td>string</td>
<td>是</td>
<td>支付订单号</td>
</tr>
<tr>
<td>order.pay_list.pay_type</td>
<td>string</td>
<td>是</td>
<td>支付类型</td>
</tr>
<tr>
<td>order.pay_list.pay_type_name</td>
<td>string</td>
<td>是</td>
<td>支付类型名称</td>
</tr>
<tr>
<td>order.pay_list.pay_amount</td>
<td>string</td>
<td>是</td>
<td>支付金额</td>
</tr>
<tr>
<td>order.pay_list.deduct_points</td>
<td>string</td>
<td>是</td>
<td>支付抵扣积分</td>
</tr>
<tr>
<td>sign</td>
<td>string</td>
<td>是</td>
<td>签名</td>
</tr>
</tbody>
</table>
<h3>请求示例</h3>
<pre><code>localhost/addons/yun_shop/api.php?route=plugin.wisely-system.open.order.offline&amp;i=1
{
&quot;body&quot;: {
&quot;mobile&quot;: &quot;17620803841&quot;,
&quot;password&quot;: &quot;123456&quot;,
&quot;notstr&quot;: &quot;kutciyozow64&quot;,
&quot;timestamp&quot;: 1713890387
},
&quot;order&quot;: {
&quot;offline_order_no&quot;: &quot;SN12345678901&quot;,
&quot;offline_pay_no&quot;: &quot;PN12345678901&quot;,
&quot;store_sn&quot;: &quot;00&quot;
&quot;is_history&quot;: 0,
&quot;offline_order_status&quot;: 1,
&quot;offline_refund_order_no&quot;: &quot;RN1234581&quot;,
&quot;deduct_points&quot;: &quot;2.00&quot;,
&quot;amount&quot;: &quot;10.00&quot;,
&quot;pay_amount&quot;: &quot;8.00&quot;,
&quot;create_time&quot;: &quot;2021-01-01 12:00:00&quot;,
&quot;pay_time&quot;: &quot;2021-01-01 12:00:00&quot;,
&quot;refund_time&quot;: &quot;2021-01-01 12:00:00&quot;,
&quot;remark&quot;: &quot;订单备注&quot;,
&quot;order_goods&quot; : [
{
&quot;goods_id&quot;: 1,
&quot;goods_name&quot;: &quot;商品名称&quot;,
&quot;goods_price&quot;: &quot;10.00&quot;,
&quot;goods_total&quot;: 1,
&quot;unit_price&quot;: &quot;10.00&quot;,
}
],
&quot;pay_list&quot;: [
{
&quot;pay_code&quot;: &quot;PC1234567&quot;,
&quot;pay_type&quot;: 1,
&quot;pay_type_name&quot;: &quot;现金&quot;,
&quot;pay_amount&quot;: &quot;8.00&quot;,
&quot;deduct_points&quot;: &quot;2.00&quot;
}
]
},
&quot;sign&quot;: &quot;496337b3b139d7a8a2ec129e65156a9d&quot;
}</code></pre>
<h2>响应参数</h2>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>描述</th>
</tr>
</thead>
<tbody>
<tr>
<td>result</td>
<td>int</td>
<td>结果. 0 = 失败, 1成功</td>
</tr>
<tr>
<td>msg</td>
<td>string</td>
<td>信息。</td>
</tr>
<tr>
<td>data</td>
<td>object</td>
<td>-</td>
</tr>
</tbody>
</table>
<h3>响应成功</h3>
<pre><code class="language-json">{
&quot;result&quot;: 1,
&quot;msg&quot;: &quot;ok&quot;,
&quot;data&quot;: []
}</code></pre>
<h3>响应失败</h3>
<pre><code class="language-json">{
&quot;result&quot;: 0,
&quot;msg&quot;: &quot;同步失败&quot;,
&quot;data&quot;: []
}</code></pre>