...
|
...
|
@@ -10,6 +10,7 @@ namespace app\portal\controller; |
|
|
|
|
|
|
|
|
use app\portal\model\IndentModel;
|
|
|
use app\portal\model\LogisticsModel;
|
|
|
use cmf\controller\HomeBaseController;
|
|
|
|
|
|
class LoadController extends HomeBaseController
|
...
|
...
|
@@ -32,9 +33,8 @@ class LoadController extends HomeBaseController |
|
|
dump(cache('data'));
|
|
|
}
|
|
|
public function notify(){
|
|
|
|
|
|
$RequestType = $_POST['RequestType'];
|
|
|
$RequestData = $_POST['RequestData'];
|
|
|
$RequestType = empty($_POST['RequestType']) ? 0: $_POST['RequestType'];
|
|
|
$RequestData = empty($_POST['RequestData']) ? 0: $_POST['RequestData'];
|
|
|
if(empty($RequestType)){
|
|
|
$this->error('error');
|
|
|
}
|
...
|
...
|
@@ -42,10 +42,21 @@ class LoadController extends HomeBaseController |
|
|
$this->error('error');
|
|
|
}
|
|
|
$result = json_decode($RequestData,true);
|
|
|
$indentModel = new IndentModel();
|
|
|
foreach($result['data'] as $key => $vo){
|
|
|
$indent = $indentModel->findData(['logistic_code'=>$vo['LogisticCode']]);
|
|
|
if(!empty($indent)){
|
|
|
if($vo['state'] >=1 && $vo['state'] != 4){
|
|
|
if($indent['state'] == 2){
|
|
|
$indentModel->updateData(['id'=>$indent['id']],['state'=>5]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
cache('result',$result);
|
|
|
$bird = config('bird');
|
|
|
$date = date("Y-m-d H:i:s",time());
|
|
|
$data = '{ "EBusinessID": "test1472267", "UpdateTime": "'.$date.'", "Success": true, "Reason": ""}';
|
|
|
$data = '{ "EBusinessID": "'.$bird['EBusinessID'].'", "UpdateTime": "'.$date.'", "Success": true, "Reason": ""}';
|
|
|
cache('data',$data);
|
|
|
return $data;
|
|
|
}
|
...
|
...
|
|