StoreExpress.php
1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace addons\groupon\controller\store;
use addons\groupon\exception\Exception;
use addons\groupon\library\traits\export\ExportOrder;
/**
* 门店包裹
*/
class StoreExpress extends Base
{
use ExportOrder;
protected $noNeedLogin = [];
protected $noNeedRight = ['*'];
public function index() {
$params = $this->request->get();
$this->success('包裹列表', \addons\groupon\model\store\StoreExpress::getList($params));
}
public function detail() {
$params = $this->request->get();
$this->success('包裹详情', \addons\groupon\model\store\StoreExpress::getDetail($params));
}
/**
* 包裹到货
*
* @return void
*/
public function arrive()
{
$params = $this->request->post();
$this->success('到货成功', \addons\groupon\model\store\StoreExpress::operArrive($params));
}
public function export() {
$params = $this->request->get();
$id = $params['id'] ?? 0;
$orderStoreExpress = \app\admin\model\groupon\order\OrderStoreExpress::with(['store'])->where('id', $id)->find();
if (!$orderStoreExpress) {
$this->error('包裹未找到');
}
$this->exportOutput($orderStoreExpress);
}
}