Files
OMS/app/erpapi/lib/yilianyun/result.php
2025-12-28 23:13:25 +08:00

67 lines
1.4 KiB
PHP
Raw 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 © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class erpapi_yilianyun_result extends erpapi_result
{
/**
* 业务返回码
* 100000 操作成功可以获取rsp_content业务数据
* 600000 处理中,因网络超时等原因所致,需要调用方重试
* 999999 操作失败
* @return string
*/
function get_status()
{
if (isset($this->response['error']) && $this->response['error'] == 0) {
return 'succ';
}
return 'fail';
}
function get_msg_id()
{
return $this->response['msg_id'];
}
/**
* 返回数据
* @return mixed
*/
function get_data()
{
if (isset($this->response['body'])) {
return is_string($this->response['body']) ? json_decode($this->response['body'], true) : $this->response['body'];
}
}
/**
* 业务返回码描述
* @return string
*/
function get_err_msg()
{
return $this->response['error_description'];
}
/**
* 业务成功状态
* success :true, 业务失败状态 success :false
* @return mixed
*/
function get_result()
{
if (isset($this->response['error'])) {
return $this->response['error'];
}
}
function get_code()
{
return $this->response['error'];
}
}