| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- <?php
- namespace addons\Alitopay\backend\controllers;
- use addons\Alitopay\common\services\OrderService;
- class OrderController extends BaseController
- {
- public $service;
- public function __construct ($id, $module, $config = [])
- {
- parent::__construct($id, $module, $config);
- $this->service = new OrderService();
- }
- public function actionIndex(){
- if( !$this->request->isAjax ){
- return $this->render('index');
- }
- $param = $this->request->get();
- $list = $this->service->list($this->mall_id,$param);
- $this->success('ok',$list);
- }
- // 打款
- public function actionToPay(){
- $ids = $this->request->get("ids");
- $ids = explode(',',$ids);
- $res = $this->service->orderToPay($this->mall_id,$ids);
- return !$res ? $this->error($this->service->error) : $this->success('ok',['html'=>$res]);
- }
- // 打款
- public function actionQuery(){
- $id = $this->request->get("id");
- $res = $this->service->orderQuery($id);
- return !$res ? $this->error($this->service->error) : $this->success('查询成功,请刷新页面');
- }
- public function actionApplyBill(){
- $id = $this->request->get("id");
- $res = $this->service->fundTransCommonQuery($this->mall_id,$id);
- return !$res ? $this->error($this->service->error) : $this->success('成功,请刷新页面');
- }
- }
|