| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- <?php
- namespace business\controllers;
- use biz\order\services\OrderService;
- use Yii;
- use common\components\util;
- use common\components\stringUtil;
- class OrderController extends BaseController
- {
-
- public function actionList()
- {
- $get = Yii::$app->request->get();
- //组建where
- $status = isset($get['status']) ? $get['status'] : 0;
- $search = isset($get['search']) ? $get['search'] : '';
- $where = ['merchantId' => $this->merchantId, 'status' => $status];
- if (!empty($search)) {
- if (stringUtil::isMobieNumber($search)) {
- $where['receiveMobile'] = $search;
- } else {
- $where['id'] = $search;
- }
- }
-
- $list = OrderService::getOrderList($where);
- util::success($list);
- }
-
- //订单详情 shish 2019.12.16
- public function actionDetail()
- {
- $id = Yii::$app->request->get('id');
- $detail = OrderService::getDetail();
- util::success($detail);
- }
-
- //订单归类 shish 2019.12.17
- public function actionClassify()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->merchantId);
- unset($post['id']);
- OrderService::classify($id, $post);
- util::ok();
- }
-
- }
|