Commit d5b5a1b9 authored by 蒋林's avatar 蒋林

对外相关接口开发

parent 91d84bd3
...@@ -62,6 +62,24 @@ class Suning extends BaseController ...@@ -62,6 +62,24 @@ class Suning extends BaseController
$obj->ReturnMessage(true, '', $result); $obj->ReturnMessage(true, '', $result);
} }
//服务订单作业查询
public function receiveServiceOrder()
{
$param = $this->input->post();
//验证参数
$obj = $this->receiveObj();
$obj->SetValues($param);
$obj->CheckReceiveServiceOrderValues();
$values = $obj->GetValues();
$this->saveLog('', 'receiveServiceOrder', $values);
$sourceObj = $this->sourceObj($values['account'], $values['pwd']);
$result = $sourceObj->ReceiveServiceOrder($values['object']);
$obj->ReturnMessage(true, '', $result);
}
//服务订单查询条件 //服务订单查询条件
public function selectServiceOrderCondition() public function selectServiceOrderCondition()
{ {
......
...@@ -34,6 +34,14 @@ class ReceiveSuning extends Receive ...@@ -34,6 +34,14 @@ class ReceiveSuning extends Receive
} }
} }
public function CheckReceiveServiceOrderValues()
{
$fileds = ['object'];
$this->CheckValues($fileds);
$this->values['object'] = json_decode($this->values['object'], true);
}
public function CheckSelectServiceOrderConditionValues() public function CheckSelectServiceOrderConditionValues()
{ {
$this->CheckValues(); $this->CheckValues();
......
...@@ -168,7 +168,12 @@ class SourceSuning extends Source ...@@ -168,7 +168,12 @@ class SourceSuning extends Source
//debug //debug
$this->Debug('ReceiveServiceOrder', $result); $this->Debug('ReceiveServiceOrder', $result);
return $result; $res = [];
if (isset($result['data']) && $result['data']) {
$res = json_decode($result['data'], true);
}
return $res;
} }
/** /**
...@@ -639,7 +644,7 @@ class SourceSuning extends Source ...@@ -639,7 +644,7 @@ class SourceSuning extends Source
{ {
$result = parent::CurlPostHttps($url, $post, $headers, $type); $result = parent::CurlPostHttps($url, $post, $headers, $type);
if ($result['data']) { if (isset($result['data']) && $result['data']) {
$result['data'] = gzdecode($result['data']); $result['data'] = gzdecode($result['data']);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment