下拉接口

This commit is contained in:
2025-08-29 17:58:43 +08:00
parent 87728793c2
commit a763bfc84c
18 changed files with 525 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
<?php
namespace app\common\service;
use app\admin\validate\BrandSeriesValidate;
use app\common\logic\BrandSeriesLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\BrandSeries;
use support\exception\BusinessException;
use support\Request;
class BrandSeriesService
{
protected $logic;
public function __construct()
{
$this->logic = (new BrandSeriesLogic());
}
/**
* 获取系统list
*/
public function getList($params)
{
if (empty($params['brand_id']))
throw new BusinessException('品牌id不能为空');
$where = [];
if(isset($params['brand_id']) && $params['brand_id'])
$where[] = ['brand_id', '=', $params['brand_id']];
return $this->logic->getList($where);
}
}
+24
View File
@@ -0,0 +1,24 @@
<?php
namespace app\common\service;
use app\common\logic\BrandLogic;
class BrandService
{
protected $logic;
public function __construct()
{
$this->logic = (new BrandLogic());
}
/**
* 获取系统list
*/
public function getList()
{
return $this->logic->getList();
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace app\common\service;
use app\admin\validate\SysAccountValidate;
use app\common\logic\SysAccountLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\SysAccount;
use support\Request;
class SysAccountService
{
protected $logic;
public function __construct()
{
$this->logic = (new SysAccountLogic());
}
/**
* 获取系统list
*/
public function getList()
{
return $this->logic->getList();
}
}
+42
View File
@@ -0,0 +1,42 @@
<?php
namespace app\common\service;
use app\admin\validate\SysDictItemValidate;
use app\common\logic\SysDictItemLogic;
use app\common\logic\SysDictLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\SysDictItem;
use support\exception\BusinessException;
use support\Request;
class SysDictItemService
{
protected $logic;
public function __construct()
{
$this->logic = (new SysDictItemLogic());
}
/**
* 获取系统list
*/
public function getList($params)
{
if (empty($params['dict_id']) && empty($params['dict_code']))
throw new BusinessException('未明确要查询的字典组');
$where = [];
if(isset($params['dict_id']) && $params['dict_id'])
$where[] = ['dict_id', '=', $params['dict_id']];
if(isset($params['dict_code']) && $params['dict_code']){
$dict = (new SysDictLogic)->getDictByCode($params['dict_code']);
if (empty($dict['id']))
throw new BusinessException('字典组code错误');
$where[] = ['dict_id', '=', $dict['id']];
}
return $this->logic->getList($where);
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace app\common\service;
use app\admin\validate\SysDictValidate;
use app\common\logic\SysDictLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\SysDict;
use support\Request;
class SysDictService
{
protected $logic;
public function __construct()
{
$this->logic = (new SysDictLogic());
}
/**
* 获取系统list
*/
public function getList()
{
return $this->logic->getList();
}
}
+28
View File
@@ -0,0 +1,28 @@
<?php
namespace app\common\service;
use app\admin\validate\SysPortValidate;
use app\common\logic\SysPortLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\SysPort;
use support\Request;
class SysPortService
{
protected $logic;
public function __construct()
{
$this->logic = (new SysPortLogic());
}
/**
* 获取系统list
*/
public function getList()
{
return $this->logic->getList();
}
}
+33
View File
@@ -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);
}
}
@@ -0,0 +1,28 @@
<?php
namespace app\common\service;
use app\admin\validate\VehModificationValidate;
use app\common\logic\VehModificationLogic;
use app\common\traits\crud\CrudServiceTrait;
use app\common\model\VehModification;
use support\Request;
class VehModificationService
{
protected $logic;
public function __construct()
{
$this->logic = (new VehModificationLogic());
}
/**
* 获取系统list
*/
public function getList()
{
return $this->logic->getList();
}
}