LoadController.php 1.3 KB
<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/6/7
 * Time: 16:48
 */

namespace app\portal\controller;


use app\portal\model\IndentModel;
use cmf\controller\HomeBaseController;

class LoadController extends HomeBaseController
{
    public function index(){
        $indentModel = new IndentModel();
        $where['state'] = ['eq',2];
        $data = $indentModel->selectData($where);
        if(!empty($data)){
            foreach($data as $key => $vo){
                $birdController = new BirdController();
                $result = $birdController->getOrder($vo['id']);
            }
        }
    }
    public function test(){

        dump(cache('param'));
        dump(cache('result'));
        dump(cache('data'));
    }
    public function notify(){

        $RequestType = $_POST['RequestType'];
        $RequestData = $_POST['RequestData'];
        if(empty($RequestType)){
            $this->error('error');
        }
        if($RequestType != 101){
            $this->error('error');
        }
        $result = json_decode($RequestData,true);
        cache('result',$result);
        $bird = config('bird');
        $data = '{ "EBusinessID": "1237100", "UpdateTime": "2015-03-11 16:26:11", "Success": true, "Reason": ""}';
        cache('data',$data);
        echo $data;
    }
}