| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- <?php
- namespace ghs\controllers;
- use bizGhs\order\classes\OrderClass;
- use bizGhs\order\classes\OrderSendClass;
- use bizGhs\order\services\OrderSendService;
- use bizGhs\order\services\OrderService;
- use Yii;
- use common\components\util;
- class OrderSendController extends BaseController
- {
- //发货 ssh 2019.12.16
- public function actionDetail()
- {
- $id = Yii::$app->request->get('id', 0);
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- //发货列表
- $list = OrderSendService::sendList($order);
- util::success($list);
- }
- //发货 ssh 2019.12.17
- public function actionDeliver()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- $post['merchantId'] = $this->sjId;
- $post['orderSn'] = $order['orderSn'];
- OrderSendService::deliver($post);
- }
- //送达 ssh 2019.12.17
- public function actionReach()
- {
- $post = Yii::$app->request->post();
- $id = isset($post['id']) ? $post['id'] : 0;
- $option = isset($post['option']) ? $post['option'] : 0;
- $order = OrderService::getById($id);
- OrderService::valid($order, $this->shopId);
- OrderSendService::reach($order, ['option' => $option]);
- }
- }
|