| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace addons\StarChain\backend\controllers;
- use addons\StarChain\common\services\OrderService;
- use addons\StarChain\common\services\RefundService;
- /**
- * 售后订单
- */
- class RefundController extends BaseController
- {
- /**
- * 售后列表
- *
- * @return string
- */
- public function actionIndex()
- {
- if ($this->request->isAjax) {
- $params = $this->request->get();
- $service = new RefundService(['mall_id' => $this->mall_id]);
- return $this->success('ok', $service->getRefundList($params));
- }
- return $this->render($this->action->id);
- }
- /**
- * 同意申请
- *
- * @return string
- */
- public function actionAgree()
- {
- if ($this->request->isAjax) {
- $id = $this->request->getBodyParam('id');
- $service = new RefundService(['mall_id' => $this->mall_id]);
- return $service->agree([$id])
- ? $this->success('ok')
- : $this->error('推送失败');
- }
- }
-
- /**
- * 驳回申请
- *
- * @return string
- */
- public function actionReject()
- {
- if ($this->request->isAjax) {
- $id = $this->request->getBodyParam('id');
- $service = new RefundService(['mall_id' => $this->mall_id]);
- return $service->reject([$id])
- ? $this->success('ok')
- : $this->error('操作失败');
- }
- }
- }
|