<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ### 控制器 *** 開發指南將以實際業務出發來講解如何進行開發,下面將以常用的訂單管理來演示。 ## 示例代碼 ``` <?php /** * +---------------------------------------------------------------------- * | 草帽支付系統 [ WE CAN DO IT JUST THINK ] * +---------------------------------------------------------------------- * | Copyright (c) 2018 http://www.iredcap.cn All rights reserved. * +---------------------------------------------------------------------- * | Licensed ( https://www.apache.org/licenses/LICENSE-2.0 ) * +---------------------------------------------------------------------- * | Author: Brian Waring <BrianWaring98@gmail.com> * +---------------------------------------------------------------------- */ namespace app\admin\controller; use app\common\library\enum\CodeEnum; class Orders extends BaseAdmin { /** * 訂單列表 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * * @return mixed */ public function index(){ $this->assign($this->logicOrders->getOrdersAllStat()); return $this->fetch(); } /** * 交易列表 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * */ public function getList(){ //狀態 $where['status'] = ['eq', $this->request->param('status','0')]; //組合搜索 !empty($this->request->param('trade_no|out_trade_no')) && $where['trade_no|out_trade_no'] = ['like', '%'.$this->request->param('trade_no').'%']; !empty($this->request->param('uid')) && $where['uid'] = ['eq', $this->request->param('uid')]; !empty($this->request->param('channel')) && $where['channel'] = ['eq', $this->request->param('channel')]; //時間搜索 時間戳搜素 $where['create_time'] = $this->parseRequestDate(); $data = $this->logicOrders->getOrderList($where,true, 'create_time desc',false); $count = $this->logicOrders->getOrdersCount($where); $this->result($data || !empty($data) ? [ 'code' => CodeEnum::SUCCESS, 'msg'=> '', 'count'=>$count, 'data'=>$data ] : [ 'code' => CodeEnum::ERROR, 'msg'=> '暫無數據', 'count'=>$count, 'data'=>$data ] ); } /** * 獲取詳情 * 1.基本 * 2.回調 * 3.商戶 * 4.結算 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * * @return mixed */ public function details(){ $where['id'] = $this->request->param('id','0'); //時間搜索 時間戳搜素 $where['create_time'] = $this->parseRequestDate(); $this->assign('order', $this->logicOrders->getOrderList($where)); return $this->fetch(); } /** * 退款列表 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * * @return mixed */ public function refund(){ $where = []; //組合搜索 !empty($this->request->param('keywords')) && $where['trade_no|out_trade_no|uid|id'] = ['like', '%'.$this->request->param('keywords').'%']; !empty($this->request->param('channel')) && $where['channel'] = ['eq', $this->request->param('channel')]; !empty($this->request->param('status')) && $where['status'] = ['eq', $this->request->param('status')]; $this->assign('list', $this->logicOrders->getOrderList($where)); return $this->fetch(); } /** * 商戶訂單統計 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * */ public function user(){ return $this->fetch(); } /** * 商戶交易統計 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * */ public function userList(){ $where = []; //組合搜索 !empty($this->request->param('uid')) && $where['uid'] = ['eq', $this->request->param('uid')]; //時間搜索 時間戳搜素 $where['create_time'] = $this->parseRequestDate(); $data = $this->logicOrders->getOrderUserStat($where); //$this->result($data || !empty($data) ? [CodeEnum::SUCCESS,'',$data] : [CodeEnum::ERROR,'暫無數據','']); $count = count($data); $this->result($data || !empty($data) ? [ 'code' => CodeEnum::SUCCESS, 'msg'=> '', 'count'=>$count, 'data'=>$data ] : [ 'code' => CodeEnum::ERROR, 'msg'=> '暫無數據', 'count'=>$count, 'data'=>$data ] ); } /** * 商戶渠道統計 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * */ public function channel(){ return $this->fetch(); } /** * 商戶渠道統計 * * @author 勇敢的小笨羊 <brianwaring98@gmail.com> * */ public function channelList(){ $where = []; //組合搜索 !empty($this->request->param('cnl_id')) && $where['a.cnl_id'] = ['eq', $this->request->param('cnl_id')]; //時間搜索 時間戳搜素 $where['a.create_time'] = $this->parseRequestDate(); $data = $this->logicOrders->getOrderChannelStat($where); $count = count($data); $this->result($data || !empty($data) ? [ 'code' => CodeEnum::SUCCESS, 'msg'=> '', 'count'=>$count, 'data'=>$data ] : [ 'code' => CodeEnum::ERROR, 'msg'=> '暫無數據', 'count'=>$count, 'data'=>$data ] ); } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看