Files
OMS/app/openapi/lib/api/params/v1/invoice.php
2026-01-04 19:08:31 +08:00

97 lines
4.5 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
+----------------------------------------------------------
* Api接口[参数判断]
+----------------------------------------------------------
*
* Time: 2014-03-18 $ update 20160608 by wangjianjun
* [Ecos!] (C)2003-2014 Shopex Inc.
+----------------------------------------------------------
*/
class openapi_api_params_v1_invoice extends openapi_api_params_abstract implements openapi_api_params_interface
{
/**
* 检查Params
* @param mixed $method method
* @param mixed $params 参数
* @param mixed $sub_msg sub_msg
* @return mixed 返回验证结果
*/
public function checkParams($method, $params, &$sub_msg)
{
if (parent::checkParams($method, $params, $sub_msg)) {
return true;
} else {
return false;
}
}
/**
* 获取AppParams
* @param mixed $method method
* @return mixed 返回结果
*/
public function getAppParams($method)
{
$params = array(
'getList' => array(
'mode' => array('type' => 'string', 'required' => 'false', 'name' => '开票方式', 'desc' => '1电子发票 0纸质发票 ;不填不区分'),
'is_status' => array('type' => 'string', 'required' => 'false', 'name' => '开票状态', 'desc' => '1已开票 0未发票 2已作废 ;不填不区分'),
'start_time' => array('type' => 'date', 'required' => 'false', 'name' => '开始时间', 'desc' => '例如2012-12-08 18:50:30'),
'end_time' => array('type' => 'date', 'required' => 'false', 'name' => '结束时间', 'desc' => '例如2012-12-08 18:50:30'),
'last_modify_start_time' => array('type' => 'string', 'require' => 'false', 'name' => '最后更新开始时间', 'desc' => '例如2012-12-08 18:50:30'),
'last_modify_end_time' => array('type' => 'string', 'require' => 'false', 'name' => '最后更新结束时间', 'desc' => '例如2012-12-08 18:50:30'),
'page_no' => array('type' => 'number', 'require' => 'false', 'name' => '页码', 'desc' => '默认1,第一页'),
'page_size' => array('type' => 'number', 'require' => 'false', 'name' => '每页最大数量', 'desc' => '最大100'),
),
'update' => array(
'order_bn' => array('type' => 'string', 'required' => 'true', 'name' => '订单号', 'desc' => '必填'),
'shop_id' => array('type' => 'string', 'required' => 'true', 'name' => '前端店铺ID', 'desc' => '必填 参考shop_id字段'),
'invoice_no' => array('type' => 'string', 'required' => 'true', 'name' => '发票号', 'desc' => '必填'),
),
'getResultList' => array(
'start_time' => array('type' => 'date', 'required' => 'true', 'name' => '开始时间', 'desc' => '例如2012-12-08 18:50:30'),
'end_time' => array('type' => 'date', 'required' => 'true', 'name' => '结束时间', 'desc' => '例如2012-12-08 18:50:30'),
'order_bn' => array('type' => 'string', 'require' => 'false', 'name' => '订单号', 'desc' => '交易订单号'),
),
);
return $params[$method];
}
/**
* description
* @param mixed $method method
* @return mixed 返回值
*/
public function description($method)
{
$desccription = array(
'getList' => array('name' => '获取订单发票列表', 'description' => '获取订单发票的信息列表'),
'update' => array('name' => '更新纸质发票的打印信息', 'description' => '更新纸质发票的打印信息'),
'getResultList' => array('name' => '获取开票结果列表', 'description' => '获取开票结果列表'),
);
return $desccription[$method];
}
}