| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace addons\HuijuBill\backend\controllers;
- use addons\HuijuBill\common\service\RefundService;
- use Yii;
- use common\controllers\AddonsController;
- /**
- * 退款
- *
- * Class RefundController
- * @package addons\HuijuBill\backend\controllers
- */
- class RefundController extends BaseController
- {
- public $enableCsrfValidation = false;
- /**
- * 首页
- *
- * @return void
- */
- public function actionList()
- {
- if ($this->request->isAjax) {
- $params = $this->request->getQueryParams();
- $data = (new RefundService(['mall_id' => $this->mall_id]))->getRefundOrderList($params);
- return $this->success('ok', $data);
- }
- return $this->render('list');
- }
- /**
- * 补单
- *
- * @return void
- */
- public function actionReissue()
- {
- if (!$this->request->isPost) {
- return $this->error('请求错误');
- }
- // post
- $ids = $this->request->post('ids');
- if (($service = new RefundService(['mall_id' => $this->mall_id]))->reissueRefund($ids)) {
- return $this->success('补单申请成功');
- }
- return $this->error($service->error);
- }
- }
|