下拉接口
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace app\common\service;
|
||||
|
||||
use app\admin\validate\VehColorValidate;
|
||||
use app\common\logic\VehColorLogic;
|
||||
use app\common\traits\crud\CrudServiceTrait;
|
||||
use app\common\model\VehColor;
|
||||
use support\exception\BusinessException;
|
||||
|
||||
class VehColorService
|
||||
{
|
||||
|
||||
protected $logic;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->logic = (new VehColorLogic());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取系统list
|
||||
*/
|
||||
public function getList($params)
|
||||
{
|
||||
if (empty($params['type']))
|
||||
throw new BusinessException('类型不能为空');
|
||||
$where = [];
|
||||
if(isset($params['type']) && $params['type'])
|
||||
$where[] = ['type', '=', $params['type']];
|
||||
return $this->logic->getList($where);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user