修改服务
This commit is contained in:
parent
872f6b9dfb
commit
b061ab5225
@ -32,6 +32,7 @@ class Permissions extends Migrator
|
|||||||
$table->addColumn('permission_name', 'string',['limit' => 15,'default'=>'','comment'=>'菜单名称'])
|
$table->addColumn('permission_name', 'string',['limit' => 15,'default'=>'','comment'=>'菜单名称'])
|
||||||
->addColumn('parent_id', 'integer',['default'=>0,'comment'=>'父级ID', 'signed' => false])
|
->addColumn('parent_id', 'integer',['default'=>0,'comment'=>'父级ID', 'signed' => false])
|
||||||
->addColumn('route', 'string', ['default' => '', 'comment' => '路由', 'limit' => 50])
|
->addColumn('route', 'string', ['default' => '', 'comment' => '路由', 'limit' => 50])
|
||||||
|
->addColumn('icon', 'string', ['default' => '', 'comment' => '菜单图标', 'limit' => 50])
|
||||||
->addColumn('module', 'string', ['default' => '', 'comment' => '模块', 'limit' => 20])
|
->addColumn('module', 'string', ['default' => '', 'comment' => '模块', 'limit' => 20])
|
||||||
->addColumn('method', 'string', ['default' => 'get', 'comment' => '路由请求方法', 'limit' => 15])
|
->addColumn('method', 'string', ['default' => 'get', 'comment' => '路由请求方法', 'limit' => 15])
|
||||||
->addColumn('permission_mark', 'string', ['null' => false, 'comment' => '权限标识', 'limit' => 50])
|
->addColumn('permission_mark', 'string', ['null' => false, 'comment' => '权限标识', 'limit' => 50])
|
||||||
|
@ -34,8 +34,8 @@ class Permissions extends CatchModel
|
|||||||
|
|
||||||
public function getList($search = [])
|
public function getList($search = [])
|
||||||
{
|
{
|
||||||
return $this->when($search['name'] ?? false, function ($query) use ($search){
|
return $this->when($search['permission_name'] ?? false, function ($query) use ($search){
|
||||||
$query->whereLike('name', $search['name']);
|
$query->whereLike('permission_name', '%'.$search['permission_name'].'%');
|
||||||
})
|
})
|
||||||
->when($search['id'] ?? false, function ($query) use ($search){
|
->when($search['id'] ?? false, function ($query) use ($search){
|
||||||
$query->where('parent_id', $search['id'])
|
$query->where('parent_id', $search['id'])
|
||||||
|
@ -31,7 +31,7 @@ class OperateLog extends Migrator
|
|||||||
$table = $this->table('operate_log',['engine'=>'Myisam', 'comment' => '操作日志', 'signed' => false]);
|
$table = $this->table('operate_log',['engine'=>'Myisam', 'comment' => '操作日志', 'signed' => false]);
|
||||||
$table->addColumn('module', 'string',['limit' => 50,'default'=>'','comment'=>'模块名称'])
|
$table->addColumn('module', 'string',['limit' => 50,'default'=>'','comment'=>'模块名称'])
|
||||||
->addColumn('operate', 'string',['default'=> '', 'limit' => 20, 'comment'=>'操作模块'])
|
->addColumn('operate', 'string',['default'=> '', 'limit' => 20, 'comment'=>'操作模块'])
|
||||||
->addColumn('route', 'string',['default'=> '','limit' => 20, 'comment'=>'路由'])
|
->addColumn('route', 'string',['default'=> '','limit' => 100, 'comment'=>'路由'])
|
||||||
->addColumn('params', 'string',['default'=> '','limit' => 1000, 'comment'=>'参数'])
|
->addColumn('params', 'string',['default'=> '','limit' => 1000, 'comment'=>'参数'])
|
||||||
->addColumn('ip', 'string',['default'=>'', 'limit' => 20,'comment'=>'ip', 'signed' => false])
|
->addColumn('ip', 'string',['default'=>'', 'limit' => 20,'comment'=>'ip', 'signed' => false])
|
||||||
->addColumn('creator_id', 'integer',['default'=> 0,'comment'=>'创建人ID', 'signed' => false])
|
->addColumn('creator_id', 'integer',['default'=> 0,'comment'=>'创建人ID', 'signed' => false])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user