This commit is contained in:
parent
d0c3c06659
commit
a269fe52cc
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
"name": "AutoVod",
|
||||||
|
"label": "Ai短视频",
|
||||||
|
"description": "自动实现短视频生产,自动发布",
|
||||||
|
"installed": true,
|
||||||
|
"enabled": true,
|
||||||
|
"version": "1.0.0",
|
||||||
|
"order": 99
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,6 @@ class AreaController
|
||||||
#[GetMapping("getInfo")]
|
#[GetMapping("getInfo")]
|
||||||
public function getInfo($pid = 0)
|
public function getInfo($pid = 0)
|
||||||
{
|
{
|
||||||
return 1;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,19 +14,21 @@ namespace Addon\Comarea\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\Controller;
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
|
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Builder\Entity\UISettingEntity;
|
use Builder\Entity\UISettingEntity;
|
||||||
use Builder\Entity\UserEntity;
|
use Builder\Entity\UserEntity;
|
||||||
|
|
||||||
use Builder\Entity\MenuEntity;
|
use Builder\Entity\MenuEntity;
|
||||||
use Builder\Entity\MenuItemEntity;
|
use Builder\Entity\MenuItemEntity;
|
||||||
use Builder\View;
|
use Builder\View;
|
||||||
|
use Hyperf\HttpServer\Annotation\AutoController;
|
||||||
/**
|
/**
|
||||||
* Class IndexController
|
* Class IndexController
|
||||||
|
* @AutoController()
|
||||||
* @package Addon\Comarea\Controller
|
* @package Addon\Comarea\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "area")]
|
#[Controller(prefix: "area")]
|
||||||
class IndexController extends MineController
|
class IndexController extends BaseController
|
||||||
{
|
{
|
||||||
#[GetMapping("index")]
|
#[GetMapping("index")]
|
||||||
public function Index(){
|
public function Index(){
|
||||||
|
|
@ -36,4 +38,12 @@ class IndexController extends MineController
|
||||||
$setting->setUser($user);
|
$setting->setUser($user);
|
||||||
return View::make($setting);
|
return View::make($setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// #[GetMapping("grid")]
|
||||||
|
public function grid(){
|
||||||
|
|
||||||
|
var_dump(555);
|
||||||
|
return 111;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -16,8 +16,8 @@ use App\System\Service\SystemAppService;
|
||||||
use Hyperf\HttpServer\Annotation\Middlewares;
|
use Hyperf\HttpServer\Annotation\Middlewares;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Exception\NormalStatusException;
|
use Builder\Exception\NormalStatusException;
|
||||||
use Builder\Helper\MineCode;
|
use Builder\Helper\BaseCode;
|
||||||
use Builder\MineApi;
|
use Builder\Api;
|
||||||
use Hyperf\HttpServer\Annotation\Controller;
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\RequestMapping;
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -28,7 +28,7 @@ use Api\Middleware\VerifyInterfaceMiddleware;
|
||||||
* @package Api
|
* @package Api
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "api")]
|
#[Controller(prefix: "api")]
|
||||||
class ApiController extends MineApi
|
class ApiController extends Api
|
||||||
{
|
{
|
||||||
public const SIGN_VERSION = '1.0';
|
public const SIGN_VERSION = '1.0';
|
||||||
|
|
||||||
|
|
@ -63,8 +63,8 @@ class ApiController extends MineApi
|
||||||
return $class->{$apiData['method_name']}();
|
return $class->{$apiData['method_name']}();
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new NormalStatusException(
|
throw new NormalStatusException(
|
||||||
t('mineadmin.interface_exception') . $e->getMessage(),
|
t('uiview.interface_exception') . $e->getMessage(),
|
||||||
MineCode::INTERFACE_EXCEPTION
|
BaseCode::INTERFACE_EXCEPTION
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -77,7 +77,7 @@ class ApiController extends MineApi
|
||||||
protected function __init()
|
protected function __init()
|
||||||
{
|
{
|
||||||
if (empty($this->request->input('apiData'))) {
|
if (empty($this->request->input('apiData'))) {
|
||||||
throw new NormalStatusException(t('mineadmin.access_denied'), MineCode::NORMAL_STATUS);
|
throw new NormalStatusException(t('uiview.access_denied'), BaseCode::NORMAL_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->request->input('apiData');
|
return $this->request->input('apiData');
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ use App\System\Service\SystemAppService;
|
||||||
use Hyperf\Di\Annotation\Inject;
|
use Hyperf\Di\Annotation\Inject;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Helper\MineCode;
|
use Builder\Helper\BaseCode;
|
||||||
use Builder\MineApi;
|
use Builder\Api;
|
||||||
use Hyperf\HttpServer\Annotation\Controller;
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
|
|
@ -27,7 +27,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package Api
|
* @package Api
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "apiDoc")]
|
#[Controller(prefix: "apiDoc")]
|
||||||
class ApiDocController extends MineApi
|
class ApiDocController extends Api
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var SystemAppService
|
* @var SystemAppService
|
||||||
|
|
@ -54,11 +54,11 @@ class ApiDocController extends MineApi
|
||||||
$app_secret = $this->request->input('app_secret', '');
|
$app_secret = $this->request->input('app_secret', '');
|
||||||
|
|
||||||
if (empty($app_id) && empty($app_secret)) {
|
if (empty($app_id) && empty($app_secret)) {
|
||||||
return $this->error(t('mineadmin.api_auth_fail'), MineCode::API_PARAMS_ERROR);
|
return $this->error(t('uiview.api_auth_fail'), BaseCode::API_PARAMS_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($code = $this->systemAppService->loginDoc($app_id, $app_secret)) !== MineCode::API_VERIFY_PASS) {
|
if (($code = $this->systemAppService->loginDoc($app_id, $app_secret)) !== BaseCode::API_VERIFY_PASS) {
|
||||||
return $this->error(t('mineadmin.api_auth_fail'), $code);
|
return $this->error(t('uiview.api_auth_fail'), $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->success();
|
return $this->success();
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace Api\InterfaceApi\v1;
|
namespace Api\InterfaceApi\v1;
|
||||||
|
|
||||||
use Builder\MineResponse;
|
use Builder\BaseResponse;
|
||||||
use App\System\Mapper\SystemDeptMapper;
|
use App\System\Mapper\SystemDeptMapper;
|
||||||
use App\System\Mapper\SystemUserMapper;
|
use App\System\Mapper\SystemUserMapper;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
|
|
@ -33,7 +33,7 @@ class DemoApi
|
||||||
*/
|
*/
|
||||||
protected SystemDeptMapper $dept;
|
protected SystemDeptMapper $dept;
|
||||||
|
|
||||||
protected MineResponse $response;
|
protected BaseResponse $response;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DemoApi constructor.
|
* DemoApi constructor.
|
||||||
|
|
@ -44,7 +44,7 @@ class DemoApi
|
||||||
*/
|
*/
|
||||||
public function __construct(SystemUserMapper $user, SystemDeptMapper $dept)
|
public function __construct(SystemUserMapper $user, SystemDeptMapper $dept)
|
||||||
{
|
{
|
||||||
$this->response = container()->get(MineResponse::class);
|
$this->response = container()->get(BaseResponse::class);
|
||||||
$this->user = $user;
|
$this->user = $user;
|
||||||
$this->dept = $dept;
|
$this->dept = $dept;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ use Hyperf\Event\Annotation\Listener;
|
||||||
use Hyperf\Event\Contract\ListenerInterface;
|
use Hyperf\Event\Contract\ListenerInterface;
|
||||||
use Builder\Event\ApiAfter;
|
use Builder\Event\ApiAfter;
|
||||||
use Builder\Helper\Str;
|
use Builder\Helper\Str;
|
||||||
use Builder\MineRequest;
|
use Builder\BaseRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* API访问日志保存
|
* API访问日志保存
|
||||||
|
|
@ -46,7 +46,7 @@ class ApiLogListener implements ListenerInterface
|
||||||
{
|
{
|
||||||
/* @var $event ApiAfter */
|
/* @var $event ApiAfter */
|
||||||
$data = $event->getApiData();
|
$data = $event->getApiData();
|
||||||
$request = container()->get(MineRequest::class);
|
$request = container()->get(BaseRequest::class);
|
||||||
$service = container()->get(SystemApiLogService::class);
|
$service = container()->get(SystemApiLogService::class);
|
||||||
|
|
||||||
if (empty($data)) {
|
if (empty($data)) {
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ use App\System\Service\SystemApiService;
|
||||||
use Hyperf\Di\Annotation\Inject;
|
use Hyperf\Di\Annotation\Inject;
|
||||||
use Hyperf\Context\Context;
|
use Hyperf\Context\Context;
|
||||||
use Builder\Exception\NormalStatusException;
|
use Builder\Exception\NormalStatusException;
|
||||||
use Builder\Helper\MineCode;
|
use Builder\Helper\BaseCode;
|
||||||
use Builder\MineRequest;
|
use Builder\BaseRequest;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\EventDispatcher\EventDispatcherInterface;
|
use Psr\EventDispatcher\EventDispatcherInterface;
|
||||||
|
|
@ -90,23 +90,23 @@ class VerifyInterfaceMiddleware implements MiddlewareInterface
|
||||||
switch ($this->_getApiData()['auth_mode']) {
|
switch ($this->_getApiData()['auth_mode']) {
|
||||||
case SystemApi::AUTH_MODE_EASY:
|
case SystemApi::AUTH_MODE_EASY:
|
||||||
if (empty($queryParams['app_id'])) {
|
if (empty($queryParams['app_id'])) {
|
||||||
return MineCode::API_APP_ID_MISSING;
|
return BaseCode::API_APP_ID_MISSING;
|
||||||
}
|
}
|
||||||
if (empty($queryParams['identity'])) {
|
if (empty($queryParams['identity'])) {
|
||||||
return MineCode::API_IDENTITY_MISSING;
|
return BaseCode::API_IDENTITY_MISSING;
|
||||||
}
|
}
|
||||||
return $service->verifyEasyMode($queryParams['app_id'], $queryParams['identity']);
|
return $service->verifyEasyMode($queryParams['app_id'], $queryParams['identity']);
|
||||||
case SystemApi::AUTH_MODE_NORMAL:
|
case SystemApi::AUTH_MODE_NORMAL:
|
||||||
|
|
||||||
if (empty($queryParams['access_token'])) {
|
if (empty($queryParams['access_token'])) {
|
||||||
return MineCode::API_ACCESS_TOKEN_MISSING;
|
return BaseCode::API_ACCESS_TOKEN_MISSING;
|
||||||
}
|
}
|
||||||
return $service->verifyNormalMode($queryParams['access_token']);
|
return $service->verifyNormalMode($queryParams['access_token']);
|
||||||
default:
|
default:
|
||||||
throw new \RuntimeException();
|
throw new \RuntimeException();
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_exception'), MineCode::API_AUTH_EXCEPTION);
|
throw new NormalStatusException(t('uiview.api_auth_exception'), BaseCode::API_AUTH_EXCEPTION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -119,25 +119,25 @@ class VerifyInterfaceMiddleware implements MiddlewareInterface
|
||||||
{
|
{
|
||||||
$service = container()->get(SystemApiService::class);
|
$service = container()->get(SystemApiService::class);
|
||||||
$apiModel = $service->mapper->one(function($query) {
|
$apiModel = $service->mapper->one(function($query) {
|
||||||
$request = container()->get(MineRequest::class);
|
$request = container()->get(BaseRequest::class);
|
||||||
$query->where('access_name', $request->route('method'));
|
$query->where('access_name', $request->route('method'));
|
||||||
});
|
});
|
||||||
|
|
||||||
// 检查接口是否存在
|
// 检查接口是否存在
|
||||||
if (! $apiModel) {
|
if (! $apiModel) {
|
||||||
throw new NormalStatusException(t('mineadmin.not_found'), MineCode::NOT_FOUND);
|
throw new NormalStatusException(t('uiview.not_found'), BaseCode::NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查接口是否停用
|
// 检查接口是否停用
|
||||||
if ($apiModel['status'] == SystemApi::DISABLE) {
|
if ($apiModel['status'] == SystemApi::DISABLE) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_stop'), MineCode::RESOURCE_STOP);
|
throw new NormalStatusException(t('uiview.api_stop'), BaseCode::RESOURCE_STOP);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 检查接口请求方法
|
// 检查接口请求方法
|
||||||
if ($apiModel['request_mode'] !== SystemApi::METHOD_ALL && $request->getMethod()[0] !== $apiModel['request_mode']) {
|
if ($apiModel['request_mode'] !== SystemApi::METHOD_ALL && $request->getMethod()[0] !== $apiModel['request_mode']) {
|
||||||
throw new NormalStatusException(
|
throw new NormalStatusException(
|
||||||
t('mineadmin.not_allow_method', ['method' => $request->getMethod()]),
|
t('uiview.not_allow_method', ['method' => $request->getMethod()]),
|
||||||
MineCode::METHOD_NOT_ALLOW
|
BaseCode::METHOD_NOT_ALLOW
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -164,8 +164,8 @@ class VerifyInterfaceMiddleware implements MiddlewareInterface
|
||||||
|
|
||||||
$request = $this->apiModelCheck($request);
|
$request = $this->apiModelCheck($request);
|
||||||
|
|
||||||
if (($code = $this->auth($request)) !== MineCode::API_VERIFY_PASS) {
|
if (($code = $this->auth($request)) !== BaseCode::API_VERIFY_PASS) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_fail'), $code);
|
throw new NormalStatusException(t('uiview.api_auth_fail'), $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $handler->handle($request);
|
$result = $handler->handle($request);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SAAS应用系统 --- 十年开发经验汇集巨献!
|
||||||
|
* ==========================================================
|
||||||
|
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
|
||||||
|
* ----------------------------------------------------------
|
||||||
|
* 官方网址: https://www.zoomtk.com
|
||||||
|
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
|
||||||
|
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
|
||||||
|
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
|
||||||
|
* ==========================================================
|
||||||
|
*/
|
||||||
|
namespace App\Mall\Controller\Agent;
|
||||||
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||||
|
|
||||||
|
|
||||||
|
use Builder\BaseController;
|
||||||
|
use Builder\View\Layout\Content;
|
||||||
|
use Builder\View\Layout\Row;
|
||||||
|
|
||||||
|
use Builder\View\Components\Grid\Avatar;
|
||||||
|
use Builder\View\Components\Widgets\Alert;
|
||||||
|
use Builder\View\Components\Widgets\Button;
|
||||||
|
use Builder\View\Components\Widgets\Dialog;
|
||||||
|
use Builder\View\Components\Widgets\Card;
|
||||||
|
use Builder\View\Components\Widgets\Html;
|
||||||
|
use Builder\View;
|
||||||
|
use Builder\Entity\MenuEntity;
|
||||||
|
use Builder\Entity\MenuItemEntity;
|
||||||
|
|
||||||
|
use Builder\Entity\UISettingEntity;
|
||||||
|
use Builder\Entity\UserEntity;
|
||||||
|
use Hyperf\HttpServer\Response;
|
||||||
|
use Hyperf\HttpServer\Annotation\AutoController;
|
||||||
|
|
||||||
|
use Builder\View\Grid;
|
||||||
|
use Builder\View\Form;
|
||||||
|
//use Builder\View\Grid;
|
||||||
|
/**
|
||||||
|
* Class IndexController
|
||||||
|
* @package App\Mall\Controller
|
||||||
|
*/
|
||||||
|
#[Controller(prefix: "mall/agent")]
|
||||||
|
class IndexController extends BaseController
|
||||||
|
{
|
||||||
|
#[GetMapping("index")]
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$content = new Content();
|
||||||
|
$content->showHeader()
|
||||||
|
->title('测试')
|
||||||
|
->body(
|
||||||
|
Alert::make()
|
||||||
|
->type('error')
|
||||||
|
->title('这里是警告信息')
|
||||||
|
->description('我是提示消息哈哈哈')
|
||||||
|
);
|
||||||
|
return $content->toJson();
|
||||||
|
}
|
||||||
|
#[RequestMapping(methods: "get,post")]
|
||||||
|
public function grid(){
|
||||||
|
$page = request('page');
|
||||||
|
$pre = 10;
|
||||||
|
$grid = new Grid();
|
||||||
|
if ($grid->isGetData()) {
|
||||||
|
// $start = ($page - 1) * $pre;
|
||||||
|
// $data = file_get_contents('http://web.peakchao.top:250/music/getMusicBanner');
|
||||||
|
// $data = json_decode($data, true);
|
||||||
|
// $lsat_page = 10;
|
||||||
|
// $grid->customData($data['result'], $page, $pre, $lsat_page, 100);
|
||||||
|
}
|
||||||
|
$grid->dataUrl('/ui/grid');
|
||||||
|
$grid->autoHeight();
|
||||||
|
$grid->column('name')->width(180);
|
||||||
|
$grid->column('img1', 'Image')->defaultValue('https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132')->component(Avatar::make())->width(80);
|
||||||
|
$grid->column('singer')->width(80);
|
||||||
|
|
||||||
|
$grid->batchActions(function (Grid\BatchActions $actions) {
|
||||||
|
$actions->hideDeleteAction();
|
||||||
|
});
|
||||||
|
$grid->ref("top250");
|
||||||
|
$grid->toolbars(function (Grid\Toolbars $toolbars) {
|
||||||
|
$toolbars->createButton()->disabled();
|
||||||
|
$js = <<<JS
|
||||||
|
self.attrs.type='success'
|
||||||
|
self.\$message.success("获取成功,请在浏览器调试器查看打印数据")
|
||||||
|
console.log(ref)
|
||||||
|
JS;
|
||||||
|
$toolbars->addLeft(Button::make("动态获取已选择的项目")->refData("top250", $js));
|
||||||
|
$js = <<<JS
|
||||||
|
ref.\$refs.top250.clearSelection();
|
||||||
|
JS;
|
||||||
|
$toolbars->addLeft(Button::make("调用表格事件,清除全选")->refData("top250", $js)->className('ml-10'));
|
||||||
|
$js = <<<JS
|
||||||
|
ref.\$bus.emit("tableReload");
|
||||||
|
JS;
|
||||||
|
|
||||||
|
$toolbars->addLeft(Button::make("手动发送emit")->refData("top250", $js)->className('ml-10'));
|
||||||
|
|
||||||
|
$toolbars->addLeft(Button::make("表格交互")->ref('gButton')->className('ml-10')->dialog(function (Dialog $dialog) {
|
||||||
|
$dialog->width('40%');
|
||||||
|
$dialog->ref("gDialog")->showClose(false);
|
||||||
|
// $dialog->slot(function (Content $content) {
|
||||||
|
// $this->dialogGrid($content);
|
||||||
|
// });
|
||||||
|
$dialog->title("表格交互");
|
||||||
|
}));
|
||||||
|
$js = <<<JS
|
||||||
|
let table = ref.\$refs.top250
|
||||||
|
table.stripe=false;
|
||||||
|
table['rowClassName'] = ({row, rowIndex})=>{
|
||||||
|
if (rowIndex === 1) {
|
||||||
|
return 'warning-row';
|
||||||
|
} else if (rowIndex === 3) {
|
||||||
|
return 'success-row';
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
JS;
|
||||||
|
$toolbars->addLeft(Button::make("设置表格row-class-name")->refData("top250", $js)->className('ml-10'));
|
||||||
|
});
|
||||||
|
|
||||||
|
// $grid->top(function (Content $content) {
|
||||||
|
// $content->row($this->code())->className('mb-10');
|
||||||
|
// });
|
||||||
|
|
||||||
|
$grid->selection();
|
||||||
|
$grid->actions(function (Grid\Actions $actions) {
|
||||||
|
$actions->hideEditAction();
|
||||||
|
$actions->hideDeleteAction();
|
||||||
|
$title = $actions->getRow()['name'] ?? '';
|
||||||
|
$actions->add(Grid\Actions\ActionButton::make("操作:$title"));
|
||||||
|
});
|
||||||
|
|
||||||
|
return $grid->toJson();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,99 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SAAS应用系统 --- 十年开发经验汇集巨献!
|
||||||
|
* ==========================================================
|
||||||
|
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
|
||||||
|
* ----------------------------------------------------------
|
||||||
|
* 官方网址: https://www.zoomtk.com
|
||||||
|
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
|
||||||
|
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
|
||||||
|
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
|
||||||
|
* ==========================================================
|
||||||
|
*/
|
||||||
|
namespace App\Mall\Controller\Goods;
|
||||||
|
namespace App\Mall\Controller\Goods;
|
||||||
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||||
|
use Builder\BaseController;
|
||||||
|
use Builder\View\Components\Grid\Avatar;
|
||||||
|
use Builder\View\Layout\Content;
|
||||||
|
use Builder\View\Layout\Row;
|
||||||
|
use Builder\View\Components\Widgets\Alert;
|
||||||
|
use Builder\View\Components\Widgets\Button;
|
||||||
|
use Builder\View\Components\Widgets\Dialog;
|
||||||
|
use Builder\View\Components\Widgets\Card;
|
||||||
|
use Builder\View\Components\Widgets\Html;
|
||||||
|
use Builder\View;
|
||||||
|
use Builder\Entity\MenuEntity;
|
||||||
|
use Builder\Entity\MenuItemEntity;
|
||||||
|
use Builder\Entity\UISettingEntity;
|
||||||
|
use Builder\Entity\UserEntity;
|
||||||
|
use Builder\View\Form;
|
||||||
|
use Builder\View\Grid;
|
||||||
|
#[Controller(prefix: "mall/goodscategory")]
|
||||||
|
class GoodsCategory extends BaseController
|
||||||
|
{
|
||||||
|
#[RequestMapping(methods: "get,post")]
|
||||||
|
public function lists(){
|
||||||
|
$page = request('page');
|
||||||
|
$pre = 10;
|
||||||
|
$grid = new Grid();
|
||||||
|
if ($grid->isGetData()) {
|
||||||
|
// $start = ($page - 1) * $pre;
|
||||||
|
// $data = file_get_contents('http://web.peakchao.top:250/music/getMusicBanner');
|
||||||
|
// $data = json_decode($data, true);
|
||||||
|
// $lsat_page = 10;
|
||||||
|
// $grid->customData($data['result'], $page, $pre, $lsat_page, 100);
|
||||||
|
$grid->customData([
|
||||||
|
[
|
||||||
|
'pk'=>'1',
|
||||||
|
'name'=>'11111',
|
||||||
|
'singer'=>'333',
|
||||||
|
'img1'=>'https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'pk'=>'2',
|
||||||
|
'name'=>'xxx',
|
||||||
|
'singer'=>'999',
|
||||||
|
'img1'=>'https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132'
|
||||||
|
]
|
||||||
|
], $page, $pre, 1, 100);
|
||||||
|
return $grid;
|
||||||
|
}
|
||||||
|
$grid->pk('pk'); //显示操作列
|
||||||
|
$grid->operationColumn(); //显示操作列
|
||||||
|
$grid->tablePagination();//开启分页
|
||||||
|
$grid->showCheckedAll();//开启多选
|
||||||
|
$grid->dataCompleteRefresh(); //设置编辑删除更新数据
|
||||||
|
$grid->addTopButton('add');
|
||||||
|
$grid->addTopButton('delete');
|
||||||
|
$grid->addTopButton('edit');
|
||||||
|
// { formType: 'grid', cols: [ { span: 24, formList: [ { dataIndex: 'avatar' }] }] },
|
||||||
|
$a = [
|
||||||
|
'width' => 500,
|
||||||
|
'layout' => [
|
||||||
|
[
|
||||||
|
'formType' => 'grid',
|
||||||
|
'cols' => [
|
||||||
|
[
|
||||||
|
'span' => 24,
|
||||||
|
'formList' => [
|
||||||
|
[
|
||||||
|
'dataIndex' => 'img1'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
],
|
||||||
|
]
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$grid->formOption($a);
|
||||||
|
$grid->column('img1', '图片')
|
||||||
|
->defaultValue('https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132')
|
||||||
|
->component(Avatar::make())
|
||||||
|
->width(100);
|
||||||
|
$grid->column('name','中国')->width(180)->formType('textarea');
|
||||||
|
$grid->column('singer','头像')->width(80);
|
||||||
|
return $grid;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* SAAS应用系统 --- 十年开发经验汇集巨献!
|
||||||
|
* ==========================================================
|
||||||
|
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
|
||||||
|
* ----------------------------------------------------------
|
||||||
|
* 官方网址: https://www.zoomtk.com
|
||||||
|
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
|
||||||
|
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
|
||||||
|
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
|
||||||
|
* ==========================================================
|
||||||
|
*/
|
||||||
|
namespace App\Mall\Controller\Goods;
|
||||||
|
|
||||||
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
||||||
|
|
||||||
|
|
||||||
|
use Builder\BaseController;
|
||||||
|
use Builder\View\Layout\Content;
|
||||||
|
use Builder\View\Layout\Row;
|
||||||
|
use Builder\View\Components\Grid\Avatar;
|
||||||
|
use Builder\View\Components\Widgets\Alert;
|
||||||
|
use Builder\View\Components\Widgets\Button;
|
||||||
|
use Builder\View\Components\Widgets\Dialog;
|
||||||
|
use Builder\View\Components\Widgets\Card;
|
||||||
|
use Builder\View\Components\Widgets\Html;
|
||||||
|
use Builder\View;
|
||||||
|
use Builder\Entity\MenuEntity;
|
||||||
|
use Builder\Entity\MenuItemEntity;
|
||||||
|
|
||||||
|
use Builder\Entity\UISettingEntity;
|
||||||
|
use Builder\Entity\UserEntity;
|
||||||
|
|
||||||
|
|
||||||
|
use Builder\View\Grid;
|
||||||
|
use Builder\View\Form;
|
||||||
|
/**
|
||||||
|
* Class GoodsController
|
||||||
|
* @package App\Mall\Controller
|
||||||
|
*/
|
||||||
|
#[Controller(prefix: "mall/goods")]
|
||||||
|
class GoodsController extends BaseController
|
||||||
|
{
|
||||||
|
#[RequestMapping(methods: "get,post")]
|
||||||
|
public function lists(){
|
||||||
|
$page = request('page');
|
||||||
|
$pre = 10;
|
||||||
|
$grid = new Grid();
|
||||||
|
if ($grid->isGetData()) {
|
||||||
|
// $start = ($page - 1) * $pre;
|
||||||
|
// $data = file_get_contents('http://web.peakchao.top:250/music/getMusicBanner');
|
||||||
|
// $data = json_decode($data, true);
|
||||||
|
// $lsat_page = 10;
|
||||||
|
var_dump(666);
|
||||||
|
$grid->customData([
|
||||||
|
[
|
||||||
|
'name'=>'11111',
|
||||||
|
'singer'=>'333',
|
||||||
|
'img1'=>'https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132'
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'name'=>'xxx',
|
||||||
|
'singer'=>'999',
|
||||||
|
'img1'=>'https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132'
|
||||||
|
]
|
||||||
|
], $page, $pre, 1, 100);
|
||||||
|
return $grid;
|
||||||
|
}
|
||||||
|
$grid->dataUrl('/ui/grid');
|
||||||
|
$grid->column('img1', 'Image')
|
||||||
|
->defaultValue('https://wx.qlogo.cn/mmopen/vi_32/ajNVdqHZLLBpqXMk6kUC4PeB5VrIVtHyUqrcPg65sjKdPxlkBINiaQ1NG6nZC9iaWOh9qdO6VaApJzgWA1wu5h8Q/132')
|
||||||
|
->component(Avatar::make())->width(80);
|
||||||
|
$grid->column('name')->width(180);
|
||||||
|
$grid->column('singer')->width(80);
|
||||||
|
return $grid->toJson();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
namespace App\Mall\Controller;
|
namespace App\Mall\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\Controller;
|
use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Builder\Entity\UISettingEntity;
|
use Builder\Entity\UISettingEntity;
|
||||||
use Builder\Entity\UserEntity;
|
use Builder\Entity\UserEntity;
|
||||||
|
|
||||||
|
|
@ -22,12 +22,14 @@ use Builder\View\Layout\Content;
|
||||||
use Builder\View\Components\Widgets\Alert;
|
use Builder\View\Components\Widgets\Alert;
|
||||||
use Builder\Entity\MenuEntity;
|
use Builder\Entity\MenuEntity;
|
||||||
use Builder\Entity\MenuItemEntity;
|
use Builder\Entity\MenuItemEntity;
|
||||||
|
use Hyperf\HttpServer\Annotation\AutoController;
|
||||||
/**
|
/**
|
||||||
* Class IndexController
|
* Class IndexController
|
||||||
|
* @AutoController()
|
||||||
* @package App\Mall\Controller
|
* @package App\Mall\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "mall")]
|
#[Controller(prefix: "mall")]
|
||||||
class IndexController extends MineController
|
class IndexController extends BaseController
|
||||||
{
|
{
|
||||||
#[GetMapping("index")]
|
#[GetMapping("index")]
|
||||||
public function Index(){
|
public function Index(){
|
||||||
|
|
@ -38,12 +40,12 @@ class IndexController extends MineController
|
||||||
return View::make($setting);
|
return View::make($setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[GetMapping("test")]
|
// #[GetMapping("test")]
|
||||||
public function test()
|
public function test()
|
||||||
{
|
{
|
||||||
$content = new Content();
|
$content = new Content();
|
||||||
$content->showHeader()
|
$content->showHeader()
|
||||||
->title('测试')
|
->title('888')
|
||||||
->body(
|
->body(
|
||||||
Alert::make()
|
Alert::make()
|
||||||
->type('error')
|
->type('error')
|
||||||
|
|
@ -52,4 +54,10 @@ class IndexController extends MineController
|
||||||
);
|
);
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[GetMapping("grid")]
|
||||||
|
public function grid(){
|
||||||
|
var_dump(555);
|
||||||
|
return 111;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,8 +14,8 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineCollection;
|
use Builder\BaseCollection;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -25,7 +25,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class SystemApiColumnController
|
* Class SystemApiColumnController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/apiColumn"), Auth]
|
#[Controller(prefix: "system/apiColumn"), Auth]
|
||||||
class SystemApiColumnController extends MineController
|
class SystemApiColumnController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemApiColumnService $service;
|
protected SystemApiColumnService $service;
|
||||||
|
|
@ -164,7 +164,7 @@ class SystemApiColumnController extends MineController
|
||||||
#[PostMapping("downloadTemplate")]
|
#[PostMapping("downloadTemplate")]
|
||||||
public function downloadTemplate(): ResponseInterface
|
public function downloadTemplate(): ResponseInterface
|
||||||
{
|
{
|
||||||
return (new MineCollection)->export(\App\System\Dto\ApiColumnDto::class, '模板下载', []);
|
return (new BaseCollection)->export(\App\System\Dto\ApiColumnDto::class, '模板下载', []);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class SystemApiController
|
* Class SystemApiController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/api"), Auth]
|
#[Controller(prefix: "system/api"), Auth]
|
||||||
class SystemApiController extends MineController
|
class SystemApiController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemApiService $service;
|
protected SystemApiService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class SystemApiGroupController
|
* Class SystemApiGroupController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/apiGroup"), Auth]
|
#[Controller(prefix: "system/apiGroup"), Auth]
|
||||||
class SystemApiGroupController extends MineController
|
class SystemApiGroupController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemApiGroupService $service;
|
protected SystemApiGroupService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class SystemAppController
|
* Class SystemAppController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/app"), Auth]
|
#[Controller(prefix: "system/app"), Auth]
|
||||||
class SystemAppController extends MineController
|
class SystemAppController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemAppService $service;
|
protected SystemAppService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class SystemAppGroupController
|
* Class SystemAppGroupController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/appGroup"), Auth]
|
#[Controller(prefix: "system/appGroup"), Auth]
|
||||||
class SystemAppGroupController extends MineController
|
class SystemAppGroupController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemAppGroupService $service;
|
protected SystemAppGroupService $service;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/common"), Auth]
|
#[Controller(prefix: "system/common"), Auth]
|
||||||
class CommonController extends MineController
|
class CommonController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUserService $userService;
|
protected SystemUserService $userService;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 文件管理控制器
|
* 文件管理控制器
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\DataCenter
|
* @package App\System\Controller\DataCenter
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/attachment"), Auth]
|
#[Controller(prefix: "system/attachment"), Auth]
|
||||||
class AttachmentController extends MineController
|
class AttachmentController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUploadFileService $service;
|
protected SystemUploadFileService $service;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -20,7 +20,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller\DataCenter
|
* @package App\System\Controller\DataCenter
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/dataMaintain"), Auth]
|
#[Controller(prefix: "system/dataMaintain"), Auth]
|
||||||
class DataMaintainController extends MineController
|
class DataMaintainController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected DataMaintainService $service;
|
protected DataMaintainService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller\DataCenter
|
* @package App\System\Controller\DataCenter
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/dataDict"), Auth]
|
#[Controller(prefix: "system/dataDict"), Auth]
|
||||||
class DictDataController extends MineController
|
class DictDataController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemDictDataService $service;
|
protected SystemDictDataService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -27,7 +27,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @Auth
|
* @Auth
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/dictType"), Auth]
|
#[Controller(prefix: "system/dictType"), Auth]
|
||||||
class DictTypeController extends MineController
|
class DictTypeController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemDictTypeService $service;
|
protected SystemDictTypeService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,7 +22,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class NoticeController
|
* Class NoticeController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/notice"), Auth]
|
#[Controller(prefix: "system/notice"), Auth]
|
||||||
class NoticeController extends MineController
|
class NoticeController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemNoticeService $service;
|
protected SystemNoticeService $service;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PutMapping;
|
use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -20,7 +20,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* Class MessageController
|
* Class MessageController
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/queueMessage"), Auth]
|
#[Controller(prefix: "system/queueMessage"), Auth]
|
||||||
class QueueMessageController extends MineController
|
class QueueMessageController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemQueueMessageService $service;
|
protected SystemQueueMessageService $service;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Hyperf\Di\Annotation\Inject;
|
use Hyperf\Di\Annotation\Inject;
|
||||||
use Builder\Entity\UISettingEntity;
|
use Builder\Entity\UISettingEntity;
|
||||||
use Builder\Entity\UserEntity;
|
use Builder\Entity\UserEntity;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Builder\View;
|
use Builder\View;
|
||||||
use Builder\View\Layout\Content;
|
use Builder\View\Layout\Content;
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,7 +25,7 @@ use Builder\View\Layout\Content;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system")]
|
#[Controller(prefix: "system")]
|
||||||
class IndexController extends MineController
|
class IndexController extends BaseController
|
||||||
{
|
{
|
||||||
#[GetMapping("index")]
|
#[GetMapping("index")]
|
||||||
public function Index(){
|
public function Index(){
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Helper\LoginUser;
|
use Builder\Helper\LoginUser;
|
||||||
use Builder\Interfaces\UserServiceInterface;
|
use Builder\Interfaces\UserServiceInterface;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Builder\Vo\UserServiceVo;
|
use Builder\Vo\UserServiceVo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\Vo\UserServiceVo;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system")]
|
#[Controller(prefix: "system")]
|
||||||
class LoginController extends MineController
|
class LoginController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUserService $systemUserService;
|
protected SystemUserService $systemUserService;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 日志控制器
|
* 日志控制器
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\Logs
|
* @package App\System\Controller\Logs
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/logs"), Auth]
|
#[Controller(prefix: "system/logs"), Auth]
|
||||||
class LogsController extends MineController
|
class LogsController extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 登录日志服务
|
* 登录日志服务
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller\Modules
|
* @package App\System\Controller\Modules
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/setting/module"), Auth]
|
#[Controller(prefix: "system/setting/module"), Auth]
|
||||||
class ModuleController extends MineController
|
class ModuleController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected ModuleService $service;
|
protected ModuleService $service;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -21,7 +21,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller\Monitor
|
* @package App\System\Controller\Monitor
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/cache"), Auth]
|
#[Controller(prefix: "system/cache"), Auth]
|
||||||
class CacheMonitorController extends MineController
|
class CacheMonitorController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected CacheMonitorService $service;
|
protected CacheMonitorService $service;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 在线用户监控
|
* 在线用户监控
|
||||||
|
|
@ -18,7 +18,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\Monitor
|
* @package App\System\Controller\Monitor
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/onlineUser"), Auth]
|
#[Controller(prefix: "system/onlineUser"), Auth]
|
||||||
class OnlineUserMonitorController extends MineController
|
class OnlineUserMonitorController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUserService $service;
|
protected SystemUserService $service;
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ServerMonitorController
|
* Class ServerMonitorController
|
||||||
* @package App\System\Controller\Monitor
|
* @package App\System\Controller\Monitor
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/server"), Auth]
|
#[Controller(prefix: "system/server"), Auth]
|
||||||
class ServerMonitorController extends MineController
|
class ServerMonitorController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected ServerMonitorService $service;
|
protected ServerMonitorService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/dept"), Auth]
|
#[Controller(prefix: "system/dept"), Auth]
|
||||||
class DeptController extends MineController
|
class DeptController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemDeptService $service;
|
protected SystemDeptService $service;
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/menu"), Auth]
|
#[Controller(prefix: "system/menu"), Auth]
|
||||||
class MenuController extends MineController
|
class MenuController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemMenuService $service;
|
protected SystemMenuService $service;
|
||||||
|
|
@ -89,7 +89,7 @@ class MenuController extends MineController
|
||||||
public function update(int $id, SystemMenuRequest $request): ResponseInterface
|
public function update(int $id, SystemMenuRequest $request): ResponseInterface
|
||||||
{
|
{
|
||||||
return $this->service->update($id, $request->all())
|
return $this->service->update($id, $request->all())
|
||||||
? $this->success() : $this->error(t('mineadmin.data_no_change'));
|
? $this->success() : $this->error(t('uiview.data_no_change'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,7 +22,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/post"), Auth]
|
#[Controller(prefix: "system/post"), Auth]
|
||||||
class PostController extends MineController
|
class PostController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemPostService $service;
|
protected SystemPostService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -22,7 +22,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/role"), Auth]
|
#[Controller(prefix: "system/role"), Auth]
|
||||||
class RoleController extends MineController
|
class RoleController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemRoleService $service;
|
protected SystemRoleService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,8 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineCollection;
|
use Builder\BaseCollection;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -23,7 +23,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/user"), Auth]
|
#[Controller(prefix: "system/user"), Auth]
|
||||||
class UserController extends MineController
|
class UserController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUserService $service;
|
protected SystemUserService $service;
|
||||||
|
|
@ -241,6 +241,6 @@ class UserController extends MineController
|
||||||
#[PostMapping("downloadTemplate")]
|
#[PostMapping("downloadTemplate")]
|
||||||
public function downloadTemplate(): ResponseInterface
|
public function downloadTemplate(): ResponseInterface
|
||||||
{
|
{
|
||||||
return (new MineCollection)->export(\App\System\Dto\UserDto::class, '模板下载', []);
|
return (new BaseCollection)->export(\App\System\Dto\UserDto::class, '模板下载', []);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -14,7 +14,7 @@ use App\System\Service\SettingConfigService;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统配置控制器
|
* 系统配置控制器
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\Settings
|
* @package App\System\Controller\Settings
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/setting/config"), Auth]
|
#[Controller(prefix: "system/setting/config"), Auth]
|
||||||
class SystemConfigController extends MineController
|
class SystemConfigController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SettingConfigService $service;
|
protected SettingConfigService $service;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use App\System\Service\SettingConfigGroupService;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统配置组控制器
|
* 系统配置组控制器
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\Settings
|
* @package App\System\Controller\Settings
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/setting/configGroup"), Auth]
|
#[Controller(prefix: "system/setting/configGroup"), Auth]
|
||||||
class SystemConfigGroupController extends MineController
|
class SystemConfigGroupController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SettingConfigGroupService $service;
|
protected SettingConfigGroupService $service;
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use Hyperf\HttpServer\Annotation\PutMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
use Psr\Http\Message\ResponseInterface;
|
use Psr\Http\Message\ResponseInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -24,7 +24,7 @@ use Psr\Http\Message\ResponseInterface;
|
||||||
* @package App\System\Controller\Tools
|
* @package App\System\Controller\Tools
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/setting/crontab"), Auth]
|
#[Controller(prefix: "system/setting/crontab"), Auth]
|
||||||
class CrontabController extends MineController
|
class CrontabController extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 计划任务服务
|
* 计划任务服务
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ use App\System\Service\SettingGenerateTablesService;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\Annotation\OperationLog;
|
use Builder\Annotation\OperationLog;
|
||||||
use Builder\Annotation\Permission;
|
use Builder\Annotation\Permission;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -26,7 +26,7 @@ use Builder\MineController;
|
||||||
* @package App\System\Controller\Tools
|
* @package App\System\Controller\Tools
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system/setting/code"), Auth]
|
#[Controller(prefix: "system/setting/code"), Auth]
|
||||||
class GenerateCodeController extends MineController
|
class GenerateCodeController extends BaseController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 信息表服务
|
* 信息表服务
|
||||||
|
|
|
||||||
|
|
@ -10,14 +10,14 @@ use Hyperf\HttpServer\Annotation\Controller;
|
||||||
use Hyperf\HttpServer\Annotation\GetMapping;
|
use Hyperf\HttpServer\Annotation\GetMapping;
|
||||||
use Hyperf\HttpServer\Annotation\PostMapping;
|
use Hyperf\HttpServer\Annotation\PostMapping;
|
||||||
use Builder\Annotation\Auth;
|
use Builder\Annotation\Auth;
|
||||||
use Builder\MineController;
|
use Builder\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class UploadController
|
* Class UploadController
|
||||||
* @package App\System\Controller
|
* @package App\System\Controller
|
||||||
*/
|
*/
|
||||||
#[Controller(prefix: "system")]
|
#[Controller(prefix: "system")]
|
||||||
class UploadController extends MineController
|
class UploadController extends BaseController
|
||||||
{
|
{
|
||||||
#[Inject]
|
#[Inject]
|
||||||
protected SystemUploadFileService $service;
|
protected SystemUploadFileService $service;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\System\Dto;
|
namespace App\System\Dto;
|
||||||
|
|
||||||
use Builder\Interfaces\MineModelExcel;
|
use Builder\Interfaces\BaseModelExcel;
|
||||||
use Builder\Annotation\ExcelData;
|
use Builder\Annotation\ExcelData;
|
||||||
use Builder\Annotation\ExcelProperty;
|
use Builder\Annotation\ExcelProperty;
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Builder\Annotation\ExcelProperty;
|
||||||
* 接口字段DTO
|
* 接口字段DTO
|
||||||
*/
|
*/
|
||||||
#[ExcelData]
|
#[ExcelData]
|
||||||
class ApiColumnDto implements MineModelExcel
|
class ApiColumnDto implements BaseModelExcel
|
||||||
{
|
{
|
||||||
#[ExcelProperty(value: "所属接口ID", index: 0)]
|
#[ExcelProperty(value: "所属接口ID", index: 0)]
|
||||||
public string $api_id;
|
public string $api_id;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
namespace App\System\Dto;
|
namespace App\System\Dto;
|
||||||
|
|
||||||
use Builder\Interfaces\MineModelExcel;
|
use Builder\Interfaces\BaseModelExcel;
|
||||||
use Builder\Annotation\ExcelData;
|
use Builder\Annotation\ExcelData;
|
||||||
use Builder\Annotation\ExcelProperty;
|
use Builder\Annotation\ExcelProperty;
|
||||||
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Builder\Annotation\ExcelProperty;
|
||||||
* 用户DTO
|
* 用户DTO
|
||||||
*/
|
*/
|
||||||
#[ExcelData]
|
#[ExcelData]
|
||||||
class UserDto implements MineModelExcel
|
class UserDto implements BaseModelExcel
|
||||||
{
|
{
|
||||||
#[ExcelProperty(value: "用户名", index: 0)]
|
#[ExcelProperty(value: "用户名", index: 0)]
|
||||||
public string $username;
|
public string $username;
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Hyperf\Event\Annotation\Listener;
|
||||||
use Hyperf\Event\Contract\ListenerInterface;
|
use Hyperf\Event\Contract\ListenerInterface;
|
||||||
use Builder\Event\UserLoginAfter;
|
use Builder\Event\UserLoginAfter;
|
||||||
use Builder\Helper\Str;
|
use Builder\Helper\Str;
|
||||||
use Builder\MineRequest;
|
use Builder\BaseRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class LoginListener
|
* Class LoginListener
|
||||||
|
|
@ -32,7 +32,7 @@ class LoginListener implements ListenerInterface
|
||||||
*/
|
*/
|
||||||
public function process(object $event): void
|
public function process(object $event): void
|
||||||
{
|
{
|
||||||
$request = container()->get(MineRequest::class);
|
$request = container()->get(BaseRequest::class);
|
||||||
$service = container()->get(SystemLoginLogService::class);
|
$service = container()->get(SystemLoginLogService::class);
|
||||||
$redis = redis();
|
$redis = redis();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ use Hyperf\DbConnection\Db;
|
||||||
use Builder\Abstracts\AbstractMapper;
|
use Builder\Abstracts\AbstractMapper;
|
||||||
use Builder\Annotation\Transaction;
|
use Builder\Annotation\Transaction;
|
||||||
use Builder\Exception\MineException;
|
use Builder\Exception\MineException;
|
||||||
use Builder\MineCollection;
|
use Builder\BaseCollection;
|
||||||
|
|
||||||
class SystemDeptMapper extends AbstractMapper
|
class SystemDeptMapper extends AbstractMapper
|
||||||
{
|
{
|
||||||
|
|
@ -36,7 +36,7 @@ class SystemDeptMapper extends AbstractMapper
|
||||||
->orderBy('sort', 'desc')
|
->orderBy('sort', 'desc')
|
||||||
->userDataScope()
|
->userDataScope()
|
||||||
->get()->toArray();
|
->get()->toArray();
|
||||||
return (new MineCollection())->toTree($treeData, $treeData[0]['parent_id'] ?? 0);
|
return (new BaseCollection())->toTree($treeData, $treeData[0]['parent_id'] ?? 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ use Hyperf\Database\Model\Builder;
|
||||||
use Hyperf\DbConnection\Db;
|
use Hyperf\DbConnection\Db;
|
||||||
use Builder\Abstracts\AbstractMapper;
|
use Builder\Abstracts\AbstractMapper;
|
||||||
use Builder\Annotation\Transaction;
|
use Builder\Annotation\Transaction;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 信息管理Mapper类
|
* 信息管理Mapper类
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use Hyperf\Database\Model\Builder;
|
||||||
use Hyperf\Database\Model\ModelNotFoundException;
|
use Hyperf\Database\Model\ModelNotFoundException;
|
||||||
use Builder\Abstracts\AbstractMapper;
|
use Builder\Abstracts\AbstractMapper;
|
||||||
use Builder\Annotation\Transaction;
|
use Builder\Annotation\Transaction;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SystemUserMapper
|
* Class SystemUserMapper
|
||||||
|
|
@ -126,9 +126,9 @@ class SystemUserMapper extends AbstractMapper
|
||||||
/**
|
/**
|
||||||
* 获取用户信息
|
* 获取用户信息
|
||||||
* @param int $id
|
* @param int $id
|
||||||
* @return MineModel
|
* @return BaseModel
|
||||||
*/
|
*/
|
||||||
public function read(int $id): ?MineModel
|
public function read(int $id): ?BaseModel
|
||||||
{
|
{
|
||||||
$user = $this->model::find($id);
|
$user = $this->model::find($id);
|
||||||
if ($user) {
|
if ($user) {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $group_id 组ID
|
* @property int $group_id 组ID
|
||||||
* @property string $key 配置键名
|
* @property string $key 配置键名
|
||||||
|
|
@ -14,7 +14,7 @@ use Builder\MineModel;
|
||||||
* @property int $sort 排序
|
* @property int $sort 排序
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SettingConfig extends MineModel
|
class SettingConfig extends BaseModel
|
||||||
{
|
{
|
||||||
public bool $incrementing = false;
|
public bool $incrementing = false;
|
||||||
protected string $primaryKey = 'key';
|
protected string $primaryKey = 'key';
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 配置组名称
|
* @property string $name 配置组名称
|
||||||
|
|
@ -14,7 +14,7 @@ use Builder\MineModel;
|
||||||
* @property \Carbon\Carbon $updated_at 更新时间
|
* @property \Carbon\Carbon $updated_at 更新时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SettingConfigGroup extends MineModel
|
class SettingConfigGroup extends BaseModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The table associated with the model.
|
* The table associated with the model.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 任务名称
|
* @property string $name 任务名称
|
||||||
|
|
@ -20,7 +20,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SettingCrontabLog[] $logs
|
* @property-read \Hyperf\Database\Model\Collection|SettingCrontabLog[] $logs
|
||||||
*/
|
*/
|
||||||
class SettingCrontab extends MineModel
|
class SettingCrontab extends BaseModel
|
||||||
{
|
{
|
||||||
// 命令任务
|
// 命令任务
|
||||||
public const COMMAND_CRONTAB = 1;
|
public const COMMAND_CRONTAB = 1;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $crontab_id 任务ID
|
* @property int $crontab_id 任务ID
|
||||||
|
|
@ -14,7 +14,7 @@ use Builder\MineModel;
|
||||||
* @property int $status 执行状态 (1成功 2失败)
|
* @property int $status 执行状态 (1成功 2失败)
|
||||||
* @property string $created_at 创建时间
|
* @property string $created_at 创建时间
|
||||||
*/
|
*/
|
||||||
class SettingCrontabLog extends MineModel
|
class SettingCrontabLog extends BaseModel
|
||||||
{
|
{
|
||||||
public bool $timestamps = false;
|
public bool $timestamps = false;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $table_id 所属表ID
|
* @property int $table_id 所属表ID
|
||||||
|
|
@ -29,7 +29,7 @@ use Builder\MineModel;
|
||||||
* @property \Carbon\Carbon $updated_at 更新时间
|
* @property \Carbon\Carbon $updated_at 更新时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SettingGenerateColumns extends MineModel
|
class SettingGenerateColumns extends BaseModel
|
||||||
{
|
{
|
||||||
public const YES = 2;
|
public const YES = 2;
|
||||||
public const NO = 1;
|
public const NO = 1;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $table_name 表名称
|
* @property string $table_name 表名称
|
||||||
|
|
@ -25,7 +25,7 @@ use Builder\MineModel;
|
||||||
* @property \Carbon\Carbon $updated_at 更新时间
|
* @property \Carbon\Carbon $updated_at 更新时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SettingGenerateTables extends MineModel
|
class SettingGenerateTables extends BaseModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The table associated with the model.
|
* The table associated with the model.
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $group_id 接口组ID
|
* @property int $group_id 接口组ID
|
||||||
|
|
@ -27,7 +27,7 @@ use Builder\MineModel;
|
||||||
* @property-read SystemApiGroup $apiGroup
|
* @property-read SystemApiGroup $apiGroup
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemApp[] $apps
|
* @property-read \Hyperf\Database\Model\Collection|SystemApp[] $apps
|
||||||
*/
|
*/
|
||||||
class SystemApi extends MineModel
|
class SystemApi extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
public const METHOD_ALL = 'A';
|
public const METHOD_ALL = 'A';
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $api_id 接口主键
|
* @property int $api_id 接口主键
|
||||||
|
|
@ -23,7 +23,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read SystemApi $api
|
* @property-read SystemApi $api
|
||||||
*/
|
*/
|
||||||
class SystemApiColumn extends MineModel
|
class SystemApiColumn extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 接口组名称
|
* @property string $name 接口组名称
|
||||||
|
|
@ -17,7 +17,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemApi[] $apis
|
* @property-read \Hyperf\Database\Model\Collection|SystemApi[] $apis
|
||||||
*/
|
*/
|
||||||
class SystemApiGroup extends MineModel
|
class SystemApiGroup extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $api_id api ID
|
* @property int $api_id api ID
|
||||||
|
|
@ -17,7 +17,7 @@ use Builder\MineModel;
|
||||||
* @property string $access_time 访问时间
|
* @property string $access_time 访问时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemApiLog extends MineModel
|
class SystemApiLog extends BaseModel
|
||||||
{
|
{
|
||||||
public bool $timestamps = false;
|
public bool $timestamps = false;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $group_id 应用组ID
|
* @property int $group_id 应用组ID
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineModel;
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemApi[] $apis
|
* @property-read \Hyperf\Database\Model\Collection|SystemApi[] $apis
|
||||||
* @property-read SystemAppGroup $appGroup
|
* @property-read SystemAppGroup $appGroup
|
||||||
*/
|
*/
|
||||||
class SystemApp extends MineModel
|
class SystemApp extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 应用组名称
|
* @property string $name 应用组名称
|
||||||
|
|
@ -16,7 +16,7 @@ use Builder\MineModel;
|
||||||
* @property string $deleted_at 删除时间
|
* @property string $deleted_at 删除时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemAppGroup extends MineModel
|
class SystemAppGroup extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $parent_id 父ID
|
* @property int $parent_id 父ID
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
||||||
*/
|
*/
|
||||||
class SystemDept extends MineModel
|
class SystemDept extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $type_id 字典类型ID
|
* @property int $type_id 字典类型ID
|
||||||
|
|
@ -20,7 +20,7 @@ use Builder\MineModel;
|
||||||
* @property string $deleted_at 删除时间
|
* @property string $deleted_at 删除时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemDictData extends MineModel
|
class SystemDictData extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 字典名称
|
* @property string $name 字典名称
|
||||||
|
|
@ -18,7 +18,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemDictData[] $dictData
|
* @property-read \Hyperf\Database\Model\Collection|SystemDictData[] $dictData
|
||||||
*/
|
*/
|
||||||
class SystemDictType extends MineModel
|
class SystemDictType extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $username 用户名
|
* @property string $username 用户名
|
||||||
|
|
@ -16,7 +16,7 @@ use Builder\MineModel;
|
||||||
* @property string $login_time 登录时间
|
* @property string $login_time 登录时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemLoginLog extends MineModel
|
class SystemLoginLog extends BaseModel
|
||||||
{
|
{
|
||||||
public bool $timestamps = false;
|
public bool $timestamps = false;
|
||||||
public const SUCCESS = 1;
|
public const SUCCESS = 1;
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $parent_id 父ID
|
* @property int $parent_id 父ID
|
||||||
|
|
@ -27,7 +27,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
||||||
*/
|
*/
|
||||||
class SystemMenu extends MineModel
|
class SystemMenu extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $message_id 消息ID
|
* @property int $message_id 消息ID
|
||||||
|
|
@ -19,7 +19,7 @@ use Builder\MineModel;
|
||||||
* @property string $deleted_at 删除时间
|
* @property string $deleted_at 删除时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemNotice extends MineModel
|
class SystemNotice extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $username 用户名
|
* @property string $username 用户名
|
||||||
|
|
@ -23,7 +23,7 @@ use Builder\MineModel;
|
||||||
* @property string $deleted_at 删除时间
|
* @property string $deleted_at 删除时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemOperLog extends MineModel
|
class SystemOperLog extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 岗位名称
|
* @property string $name 岗位名称
|
||||||
|
|
@ -19,7 +19,7 @@ use Builder\MineModel;
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $users
|
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $users
|
||||||
*/
|
*/
|
||||||
class SystemPost extends MineModel
|
class SystemPost extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $exchange_name 交换机名称
|
* @property string $exchange_name 交换机名称
|
||||||
|
|
@ -18,7 +18,7 @@ use Builder\MineModel;
|
||||||
* @property \Carbon\Carbon $created_at 创建时间
|
* @property \Carbon\Carbon $created_at 创建时间
|
||||||
* @property \Carbon\Carbon $updated_at 更新时间
|
* @property \Carbon\Carbon $updated_at 更新时间
|
||||||
*/
|
*/
|
||||||
class SystemQueueLog extends MineModel
|
class SystemQueueLog extends BaseModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @Message("未生产")
|
* @Message("未生产")
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
declare (strict_types=1);
|
declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property int $content_id 内容ID
|
* @property int $content_id 内容ID
|
||||||
|
|
@ -19,7 +19,7 @@ use Builder\MineModel;
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $receiveUser
|
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $receiveUser
|
||||||
* @property-read SystemUser $sendUser
|
* @property-read SystemUser $sendUser
|
||||||
*/
|
*/
|
||||||
class SystemQueueMessage extends MineModel
|
class SystemQueueMessage extends BaseModel
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 消息类型:通知
|
* 消息类型:通知
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $name 角色名称
|
* @property string $name 角色名称
|
||||||
|
|
@ -22,7 +22,7 @@ use Builder\MineModel;
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemMenu[] $menus
|
* @property-read \Hyperf\Database\Model\Collection|SystemMenu[] $menus
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $users
|
* @property-read \Hyperf\Database\Model\Collection|SystemUser[] $users
|
||||||
*/
|
*/
|
||||||
class SystemRole extends MineModel
|
class SystemRole extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
// 所有
|
// 所有
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 主键
|
* @property int $id 主键
|
||||||
* @property string $storage_mode 存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)
|
* @property string $storage_mode 存储模式 (1 本地 2 阿里云 3 七牛云 4 腾讯云)
|
||||||
|
|
@ -24,7 +24,7 @@ use Builder\MineModel;
|
||||||
* @property string $deleted_at 删除时间
|
* @property string $deleted_at 删除时间
|
||||||
* @property string $remark 备注
|
* @property string $remark 备注
|
||||||
*/
|
*/
|
||||||
class SystemUploadfile extends MineModel
|
class SystemUploadfile extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ declare (strict_types=1);
|
||||||
namespace App\System\Model;
|
namespace App\System\Model;
|
||||||
|
|
||||||
use Hyperf\Database\Model\SoftDeletes;
|
use Hyperf\Database\Model\SoftDeletes;
|
||||||
use Builder\MineModel;
|
use Builder\BaseModel;
|
||||||
/**
|
/**
|
||||||
* @property int $id 用户ID,主键
|
* @property int $id 用户ID,主键
|
||||||
* @property string $username 用户名
|
* @property string $username 用户名
|
||||||
|
|
@ -30,7 +30,7 @@ use Builder\MineModel;
|
||||||
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
* @property-read \Hyperf\Database\Model\Collection|SystemRole[] $roles
|
||||||
* @property-write mixed $password 密码
|
* @property-write mixed $password 密码
|
||||||
*/
|
*/
|
||||||
class SystemUser extends MineModel
|
class SystemUser extends BaseModel
|
||||||
{
|
{
|
||||||
use SoftDeletes;
|
use SoftDeletes;
|
||||||
public const USER_NORMAL = 1;
|
public const USER_NORMAL = 1;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class GenerateRequest extends MineFormRequest
|
class GenerateRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class MessageRequest extends MineFormRequest
|
class MessageRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class ModuleRequest extends MineFormRequest
|
class ModuleRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SettingConfigGroupRequest extends MineFormRequest
|
class SettingConfigGroupRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SettingConfigRequest extends MineFormRequest
|
class SettingConfigRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SettingCrontabRequest extends MineFormRequest
|
class SettingCrontabRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemApiColumnRequest extends MineFormRequest
|
class SystemApiColumnRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemApiGroupRequest extends MineFormRequest
|
class SystemApiGroupRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemApiRequest extends MineFormRequest
|
class SystemApiRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemAppGroupRequest extends MineFormRequest
|
class SystemAppGroupRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemAppRequest extends MineFormRequest
|
class SystemAppRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemDeptRequest extends MineFormRequest
|
class SystemDeptRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemDictDataRequest extends MineFormRequest
|
class SystemDictDataRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemDictTypeRequest extends MineFormRequest
|
class SystemDictTypeRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemMenuRequest extends MineFormRequest
|
class SystemMenuRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemNoticeRequest extends MineFormRequest
|
class SystemNoticeRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemPostRequest extends MineFormRequest
|
class SystemPostRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemRoleRequest extends MineFormRequest
|
class SystemRoleRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,9 @@ declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use App\System\Service\SystemUserService;
|
use App\System\Service\SystemUserService;
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
|
|
||||||
class SystemUserRequest extends MineFormRequest
|
class SystemUserRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,11 @@ declare(strict_types=1);
|
||||||
namespace App\System\Request;
|
namespace App\System\Request;
|
||||||
|
|
||||||
use App\Setting\Service\SettingConfigService;
|
use App\Setting\Service\SettingConfigService;
|
||||||
use Builder\MineFormRequest;
|
use Builder\FormRequest;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
|
||||||
class UploadRequest extends MineFormRequest
|
class UploadRequest extends FormRequest
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 公共规则
|
* 公共规则
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ use Builder\Event\UserLoginBefore;
|
||||||
use Builder\Event\UserLogout;
|
use Builder\Event\UserLogout;
|
||||||
use Builder\Exception\NormalStatusException;
|
use Builder\Exception\NormalStatusException;
|
||||||
use Builder\Exception\UserBanException;
|
use Builder\Exception\UserBanException;
|
||||||
use Builder\Helper\MineCode;
|
use Builder\Helper\BaseCode;
|
||||||
use Builder\Interfaces\UserServiceInterface;
|
use Builder\Interfaces\UserServiceInterface;
|
||||||
use Builder\Vo\UserServiceVo;
|
use Builder\Vo\UserServiceVo;
|
||||||
|
|
||||||
|
|
@ -72,13 +72,13 @@ class UserAuthService implements UserServiceInterface
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if ($e instanceof ModelNotFoundException) {
|
if ($e instanceof ModelNotFoundException) {
|
||||||
throw new NormalStatusException(t('jwt.username_error'), MineCode::NO_DATA);
|
throw new NormalStatusException(t('jwt.username_error'), BaseCode::NO_DATA);
|
||||||
}
|
}
|
||||||
if ($e instanceof NormalStatusException) {
|
if ($e instanceof NormalStatusException) {
|
||||||
throw new NormalStatusException(t('jwt.password_error'), MineCode::PASSWORD_ERROR);
|
throw new NormalStatusException(t('jwt.password_error'), BaseCode::PASSWORD_ERROR);
|
||||||
}
|
}
|
||||||
if ($e instanceof UserBanException) {
|
if ($e instanceof UserBanException) {
|
||||||
throw new NormalStatusException(t('jwt.user_ban'), MineCode::USER_BAN);
|
throw new NormalStatusException(t('jwt.user_ban'), BaseCode::USER_BAN);
|
||||||
}
|
}
|
||||||
console()->error($e->getMessage());
|
console()->error($e->getMessage());
|
||||||
throw new NormalStatusException(t('jwt.unknown_error'));
|
throw new NormalStatusException(t('jwt.unknown_error'));
|
||||||
|
|
|
||||||
|
|
@ -8,15 +8,15 @@ use Hyperf\Utils\Filesystem\Filesystem;
|
||||||
use Symfony\Component\Console\Input\ArrayInput;
|
use Symfony\Component\Console\Input\ArrayInput;
|
||||||
use Symfony\Component\Console\Output\NullOutput;
|
use Symfony\Component\Console\Output\NullOutput;
|
||||||
|
|
||||||
use Builder\Mine;
|
use Builder\Base;
|
||||||
use Builder\Abstracts\AbstractService;
|
use Builder\Abstracts\AbstractService;
|
||||||
use Builder\Generator\ModuleGenerator;
|
use Builder\Generator\ModuleGenerator;
|
||||||
class ModuleService extends AbstractService
|
class ModuleService extends AbstractService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @var Mine
|
* @var Base
|
||||||
*/
|
*/
|
||||||
protected Mine $mine;
|
protected Base $base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string|null
|
* @var string|null
|
||||||
|
|
@ -24,7 +24,7 @@ class ModuleService extends AbstractService
|
||||||
#[Value('cache.default.prefix')]
|
#[Value('cache.default.prefix')]
|
||||||
protected ?string $prefix = null;
|
protected ?string $prefix = null;
|
||||||
|
|
||||||
public function __construct(Mine $mine)
|
public function __construct(Base $mine)
|
||||||
{
|
{
|
||||||
$this->mine = $mine;
|
$this->mine = $mine;
|
||||||
}
|
}
|
||||||
|
|
@ -122,14 +122,14 @@ class ModuleService extends AbstractService
|
||||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||||
* @throws \Throwable
|
* @throws \Throwable
|
||||||
*/
|
*/
|
||||||
public function uninstallModule(string $name): bool
|
public function uninstallModule(string $name,$type='app'): bool
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$migrate = container()->get(\Hyperf\Database\Migrations\Migrator::class);
|
$migrate = container()->get(\Hyperf\Database\Migrations\Migrator::class);
|
||||||
$path = BASE_PATH . '/app/' . $name . '/Database/Migrations';
|
$path = BASE_PATH . '/'.$type.'/' . $name . '/Database/Migrations';
|
||||||
$migrate->rollback([$path]);
|
$migrate->rollback([$path]);
|
||||||
is_dir($path . '/Update') && $migrate->rollback([$path . '/Update']);
|
is_dir($path . '/Update') && $migrate->rollback([$path . '/Update']);
|
||||||
$this->deleteModule($name);
|
$this->deleteModule($name,$type);
|
||||||
$this->setModuleCache();
|
$this->setModuleCache();
|
||||||
return true;
|
return true;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|
@ -143,11 +143,11 @@ class ModuleService extends AbstractService
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function deleteModule(string $name): bool
|
public function deleteModule(string $name,$type='app'): bool
|
||||||
{
|
{
|
||||||
/** @var Filesystem $filesystem */
|
/** @var Filesystem $filesystem */
|
||||||
$filesystem = make(Filesystem::class);
|
$filesystem = make(Filesystem::class);
|
||||||
$modulePath = BASE_PATH . '/app/' . ucfirst($name);
|
$modulePath = BASE_PATH . '/'.$type.'/' . ucfirst($name);
|
||||||
return $filesystem->deleteDirectory($modulePath);
|
return $filesystem->deleteDirectory($modulePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -197,11 +197,11 @@ class ModuleService extends AbstractService
|
||||||
* @throws \Psr\Container\ContainerExceptionInterface
|
* @throws \Psr\Container\ContainerExceptionInterface
|
||||||
* @throws \Psr\Container\NotFoundExceptionInterface
|
* @throws \Psr\Container\NotFoundExceptionInterface
|
||||||
*/
|
*/
|
||||||
public function modifyStatus(array $data): bool
|
public function modifyStatus(array $data,$type='app'): bool
|
||||||
{
|
{
|
||||||
$modules = make(Mine::class)->getModuleInfo();
|
$modules = make(Init::class)->getModuleInfo();
|
||||||
if (isset($modules[$data['name']])) {
|
if (isset($modules[$data['name']])) {
|
||||||
$filePath = BASE_PATH . '/app/' . $data['name'] . '/config.json';
|
$filePath = BASE_PATH . '/'.$type.'/' . $data['name'] . '/info.json';
|
||||||
$status = $data['status'] ? 'true' : 'false';
|
$status = $data['status'] ? 'true' : 'false';
|
||||||
$content = preg_replace(
|
$content = preg_replace(
|
||||||
'/\"enabled\":\s(true|false),/',
|
'/\"enabled\":\s(true|false),/',
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ class ServerMonitorService
|
||||||
|
|
||||||
$result['run_time'] = \Builder\Helper\Str::Sec2Time(time() - START_TIME);
|
$result['run_time'] = \Builder\Helper\Str::Sec2Time(time() - START_TIME);
|
||||||
|
|
||||||
$result['mineadmin_version'] = \Builder\Mine::getVersion();
|
$result['mineadmin_version'] = \Builder\Base::getVersion();
|
||||||
|
|
||||||
$result['hyperf_version'] = HF_VERSION;
|
$result['hyperf_version'] = HF_VERSION;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use App\System\Model\SystemApp;
|
||||||
use Builder\Abstracts\AbstractService;
|
use Builder\Abstracts\AbstractService;
|
||||||
use Builder\Annotation\Transaction;
|
use Builder\Annotation\Transaction;
|
||||||
use Builder\Exception\NormalStatusException;
|
use Builder\Exception\NormalStatusException;
|
||||||
use Builder\Helper\MineCode;
|
use Builder\Helper\BaseCode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* app应用业务
|
* app应用业务
|
||||||
|
|
@ -82,11 +82,11 @@ class SystemAppService extends AbstractService
|
||||||
public function getAccessToken(array $params): array
|
public function getAccessToken(array $params): array
|
||||||
{
|
{
|
||||||
if (empty($params['app_id'])) {
|
if (empty($params['app_id'])) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_fail'), MineCode::API_APP_ID_MISSING);
|
throw new NormalStatusException(t('uiview.api_auth_fail'), BaseCode::API_APP_ID_MISSING);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($params['signature'])) {
|
if (empty($params['signature'])) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_fail'), MineCode::API_SIGN_MISSING);
|
throw new NormalStatusException(t('uiview.api_auth_fail'), BaseCode::API_SIGN_MISSING);
|
||||||
}
|
}
|
||||||
|
|
||||||
$model = $this->mapper->one(function($query) use(&$params){
|
$model = $this->mapper->one(function($query) use(&$params){
|
||||||
|
|
@ -94,11 +94,11 @@ class SystemAppService extends AbstractService
|
||||||
});
|
});
|
||||||
|
|
||||||
if (! $model) {
|
if (! $model) {
|
||||||
throw new NormalStatusException(t('mineadmin.access_denied'), MineCode::API_AUTH_EXCEPTION);
|
throw new NormalStatusException(t('uiview.access_denied'), BaseCode::API_AUTH_EXCEPTION);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($params['signature'] !== $this->getSignature($model['app_secret'], $params)) {
|
if ($params['signature'] !== $this->getSignature($model['app_secret'], $params)) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_fail'), MineCode::API_IDENTITY_ERROR);
|
throw new NormalStatusException(t('uiview.api_auth_fail'), BaseCode::API_IDENTITY_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
$params['id'] = $model['id'];
|
$params['id'] = $model['id'];
|
||||||
|
|
@ -137,14 +137,14 @@ class SystemAppService extends AbstractService
|
||||||
}, ['id', 'status']);
|
}, ['id', 'status']);
|
||||||
|
|
||||||
if (! $model) {
|
if (! $model) {
|
||||||
return MineCode::API_PARAMS_ERROR;
|
return BaseCode::API_PARAMS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($model->status != SystemApp::ENABLE) {
|
if ($model->status != SystemApp::ENABLE) {
|
||||||
return MineCode::APP_BAN;
|
return BaseCode::APP_BAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
return MineCode::API_VERIFY_PASS;
|
return BaseCode::API_VERIFY_PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -162,18 +162,18 @@ class SystemAppService extends AbstractService
|
||||||
}, ['id', 'status', 'app_secret']);
|
}, ['id', 'status', 'app_secret']);
|
||||||
|
|
||||||
if (! $model) {
|
if (! $model) {
|
||||||
return MineCode::API_PARAMS_ERROR;
|
return BaseCode::API_PARAMS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($model->status != SystemApp::ENABLE) {
|
if ($model->status != SystemApp::ENABLE) {
|
||||||
return MineCode::APP_BAN;
|
return BaseCode::APP_BAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($identity != md5($appId . $model->app_secret)) {
|
if ($identity != md5($appId . $model->app_secret)) {
|
||||||
throw new NormalStatusException(t('mineadmin.api_auth_fail'), MineCode::API_SIGN_ERROR);
|
throw new NormalStatusException(t('uiview.api_auth_fail'), BaseCode::API_SIGN_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return MineCode::API_VERIFY_PASS;
|
return BaseCode::API_VERIFY_PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -184,7 +184,7 @@ class SystemAppService extends AbstractService
|
||||||
*/
|
*/
|
||||||
public function verifyNormalMode(string $accessToken): int
|
public function verifyNormalMode(string $accessToken): int
|
||||||
{
|
{
|
||||||
return app_verify()->check($accessToken) ? MineCode::API_VERIFY_PASS : MineCode::API_PARAMS_ERROR;
|
return app_verify()->check($accessToken) ? BaseCode::API_VERIFY_PASS : BaseCode::API_PARAMS_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue