feat: 订单异常
This commit is contained in:
parent
84343e17e2
commit
72483a53be
18
application/common/model/OrderAbnormal.php
Normal file
18
application/common/model/OrderAbnormal.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace app\common\model;
|
||||
|
||||
use think\Model;
|
||||
|
||||
class OrderAbnormal extends Model
|
||||
{
|
||||
protected $visible = [
|
||||
|
||||
];
|
||||
|
||||
protected $hidden = [
|
||||
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ use app\common\model\WorkerVendor;
|
|||
use app\common\model\OrderDispatch;
|
||||
use app\common\model\Order;
|
||||
use app\common\model\Abnormal;
|
||||
use app\common\model\OrderAbnormal;
|
||||
//{%add use model%}
|
||||
|
||||
class BaseService
|
||||
|
|
@ -127,5 +128,21 @@ class BaseService
|
|||
return app(Abnormal::class, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return OrderAbnormalService
|
||||
*/
|
||||
protected function getOrderAbnormalService()
|
||||
{
|
||||
return app(OrderAbnormalService::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return OrderAbnormal
|
||||
*/
|
||||
protected function getOrderAbnormalModel()
|
||||
{
|
||||
return app(OrderAbnormal::class, true);
|
||||
}
|
||||
|
||||
//{%add function code%}
|
||||
}
|
||||
|
|
|
|||
8
application/services/OrderAbnormalService.php
Normal file
8
application/services/OrderAbnormalService.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace app\services;
|
||||
|
||||
class OrderAbnormalService extends BaseService
|
||||
{
|
||||
|
||||
}
|
||||
22
application/worker/controller/OrderAbnormal.php
Normal file
22
application/worker/controller/OrderAbnormal.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace app\worker\controller;
|
||||
|
||||
use app\common\controller\WorkerApi;
|
||||
|
||||
class OrderAbnormal extends WorkerApi
|
||||
{
|
||||
protected $noNeedLogin = [];
|
||||
|
||||
public function create()
|
||||
{
|
||||
$params = $this->request->request();
|
||||
$validate = $this->validate($params, \app\worker\validate\OrderAbnormal::class . '.create');
|
||||
if ($validate !== true) {
|
||||
$this->error($validate);
|
||||
}
|
||||
|
||||
$res = $this->getOrderAbnormalService()->create($this->user['id'], $params);
|
||||
$this->success('操作成功', $res);
|
||||
}
|
||||
}
|
||||
8
application/worker/validate/OrderAbnormal.php
Normal file
8
application/worker/validate/OrderAbnormal.php
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace app\worker\validate;
|
||||
|
||||
class OrderAbnormal
|
||||
{
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user