| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?php
- namespace App\Http\Controllers\Admin;
- use App\Services\Common\OrderService;
- /**
- * 订单控制器
- */
- class OrderController extends Backend
- {
- public function __construct()
- {
- parent::__construct();
- $this->service = new OrderService();
- }
- /**
- * 列表
- */
- public function index()
- {
- $params = request()->all();
- $pageSize = isset($params['limit']) ? intval($params['limit']) : PERPAGE;
- $params['store_id'] = $this->storeId?$this->storeId: 0;
- return $this->service->getDataList($params, $pageSize);
- }
- /**
- * 删除
- */
- public function delete()
- {
- return $this->service->delete();
- }
- /**
- * 修改状态
- */
- public function status()
- {
- return $this->service->status();
- }
- /**
- * 获取详情
- */
- public function info()
- {
- $id = request()->get('id');
- return $this->service->getInfo($id);
- }
- /**
- * 完成支付
- */
- public function completePay()
- {
- return $this->service->completePay();
- }
- /**
- * 订单发货
- */
- public function deliver()
- {
- return $this->service->deliverOrder();
- }
- /**
- * 订单发货
- */
- public function getDelivery()
- {
- $id = request()->post('id',0);
- return $this->service->getDelivery($id);
- }
- /**
- * 订单结算
- */
- public function settle()
- {
- return $this->service->settleOrder();
- }
- /**
- * 订单完成
- */
- public function complete()
- {
- return $this->service->completeOrder();
- }
- /**
- * 取消订单
- */
- public function cancel()
- {
- return $this->service->cancelOrder();
- }
- /**
- * 申请退款
- */
- public function applyRefund()
- {
- return $this->service->applyRefund();
- }
- /**
- * 同意退款
- */
- public function agreeRefund()
- {
- return $this->service->agreeRefund();
- }
- /**
- * 确认退款
- */
- public function confirmRefund()
- {
- return $this->service->confirmRefund();
- }
- /**
- * 拒绝退款
- */
- public function rejectRefund()
- {
- return $this->service->rejectRefund();
- }
- /**
- * 订单统计
- */
- public function statistics()
- {
- return $this->service->getStatistics($this->storeId);
- }
- /**
- * 导出订单
- */
- public function export()
- {
- $params = request()->all();
- $params['store_id'] = $this->storeId ?: 0;
- return $this->service->exportData($params);
- }
- }
|