Merge branch 'dev_master'
This commit is contained in:
commit
cf827a1083
@ -7,7 +7,10 @@ namespace Infrastructure
|
|||||||
public class OptionsSetting
|
public class OptionsSetting
|
||||||
{
|
{
|
||||||
public static string ConnAdmin = "conn_zrAdmin";
|
public static string ConnAdmin = "conn_zrAdmin";
|
||||||
public static string ConnDbType = "conn_zrAdmin_Type";
|
public static string ConnDbType = "conn_zrAdmin_type";
|
||||||
|
public static string ConnBus = "conn_bus";
|
||||||
|
public static string ConnBusDbType = "conn_bus_type";
|
||||||
|
|
||||||
public static string DbKey = "DbKey";
|
public static string DbKey = "DbKey";
|
||||||
|
|
||||||
public string Redis { get; set; }
|
public string Redis { get; set; }
|
||||||
|
|||||||
@ -38,11 +38,9 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
[HttpGet("list")]
|
[HttpGet("list")]
|
||||||
public IActionResult List([FromQuery] SysRole role, [FromQuery] PagerInfo pager)
|
public IActionResult List([FromQuery] SysRole role, [FromQuery] PagerInfo pager)
|
||||||
{
|
{
|
||||||
var list = sysRoleService.SelectRoleList(role);
|
var list = sysRoleService.SelectRoleList(role, pager);
|
||||||
|
|
||||||
VMPageResult<SysRole> vMPageResult = new(list, pager);
|
return SUCCESS(list, TIME_FORMAT_FULL);
|
||||||
|
|
||||||
return SUCCESS(vMPageResult, TIME_FORMAT_FULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -124,7 +122,7 @@ namespace ZR.Admin.WebApi.Controllers.System
|
|||||||
/// <param name="sysRoleDto"></param>
|
/// <param name="sysRoleDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPut("dataScope")]
|
[HttpPut("dataScope")]
|
||||||
[ActionPermissionFilter(Permission = "system:role:update")]
|
[ActionPermissionFilter(Permission = "system:role:authorize")]
|
||||||
[Log(Title = "角色管理", BusinessType = BusinessType.UPDATE)]
|
[Log(Title = "角色管理", BusinessType = BusinessType.UPDATE)]
|
||||||
public IActionResult DataScope([FromBody] SysRole sysRoleDto)
|
public IActionResult DataScope([FromBody] SysRole sysRoleDto)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -40,7 +40,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("list")]
|
[HttpGet("list")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:list")]
|
[ActionPermissionFilter(Permission = "monitor:job:list")]
|
||||||
public IActionResult Query([FromQuery] TasksQueryDto parm, [FromQuery] PagerInfo pager)
|
public IActionResult Query([FromQuery] TasksQueryDto parm, [FromQuery] PagerInfo pager)
|
||||||
{
|
{
|
||||||
//开始拼装查询条件
|
//开始拼装查询条件
|
||||||
@ -71,13 +71,12 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
return SUCCESS(_tasksQzService.GetAll());
|
return SUCCESS(_tasksQzService.GetAll());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 添加任务
|
/// 添加任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("create")]
|
[HttpPost("create")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:add")]
|
[ActionPermissionFilter(Permission = "monitor:job:add")]
|
||||||
[Log(Title = "添加任务", BusinessType = BusinessType.INSERT)]
|
[Log(Title = "添加任务", BusinessType = BusinessType.INSERT)]
|
||||||
public IActionResult Create([FromBody] TasksCreateDto parm)
|
public IActionResult Create([FromBody] TasksCreateDto parm)
|
||||||
{
|
{
|
||||||
@ -104,7 +103,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("update")]
|
[HttpPost("update")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:edit")]
|
[ActionPermissionFilter(Permission = "monitor:job:edit")]
|
||||||
[Log(Title = "修改任务", BusinessType = BusinessType.UPDATE)]
|
[Log(Title = "修改任务", BusinessType = BusinessType.UPDATE)]
|
||||||
public async Task<IActionResult> Update([FromBody] TasksUpdateDto parm)
|
public async Task<IActionResult> Update([FromBody] TasksUpdateDto parm)
|
||||||
{
|
{
|
||||||
@ -156,7 +155,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpDelete("delete")]
|
[HttpDelete("delete")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:delete")]
|
[ActionPermissionFilter(Permission = "monitor:job:delete")]
|
||||||
[Log(Title = "删除任务", BusinessType = BusinessType.DELETE)]
|
[Log(Title = "删除任务", BusinessType = BusinessType.DELETE)]
|
||||||
public async Task<IActionResult> Delete(string id)
|
public async Task<IActionResult> Delete(string id)
|
||||||
{
|
{
|
||||||
@ -185,7 +184,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("start")]
|
[HttpGet("start")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:start")]
|
[ActionPermissionFilter(Permission = "monitor:job:start")]
|
||||||
[Log(Title = "启动任务", BusinessType = BusinessType.OTHER)]
|
[Log(Title = "启动任务", BusinessType = BusinessType.OTHER)]
|
||||||
public async Task<IActionResult> Start(string id)
|
public async Task<IActionResult> Start(string id)
|
||||||
{
|
{
|
||||||
@ -216,7 +215,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("stop")]
|
[HttpGet("stop")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:stop")]
|
[ActionPermissionFilter(Permission = "monitor:job:stop")]
|
||||||
[Log(Title = "停止任务", BusinessType = BusinessType.OTHER)]
|
[Log(Title = "停止任务", BusinessType = BusinessType.OTHER)]
|
||||||
public async Task<IActionResult> Stop(string id)
|
public async Task<IActionResult> Stop(string id)
|
||||||
{
|
{
|
||||||
@ -248,7 +247,7 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("run")]
|
[HttpGet("run")]
|
||||||
[ActionPermissionFilter(Permission = "system:task:run")]
|
[ActionPermissionFilter(Permission = "monitor:job:run")]
|
||||||
[Log(Title = "执行任务", BusinessType = BusinessType.OTHER)]
|
[Log(Title = "执行任务", BusinessType = BusinessType.OTHER)]
|
||||||
public async Task<IActionResult> Run(string id)
|
public async Task<IActionResult> Run(string id)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,7 +11,11 @@ using Microsoft.Extensions.Configuration;
|
|||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.OpenApi.Models;
|
using Microsoft.OpenApi.Models;
|
||||||
|
using SqlSugar.IOC;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.Admin.WebApi.Middleware;
|
using ZR.Admin.WebApi.Middleware;
|
||||||
@ -116,12 +120,54 @@ namespace ZR.Admin.WebApi
|
|||||||
/// ×¢²áServices·þÎñ
|
/// ×¢²áServices·þÎñ
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="services"></param>
|
/// <param name="services"></param>
|
||||||
private static void InjectRepositories(IServiceCollection services)
|
private void InjectRepositories(IServiceCollection services)
|
||||||
{
|
{
|
||||||
services.AddAppService();
|
services.AddAppService();
|
||||||
|
|
||||||
//¿ªÆô¼Æ»®ÈÎÎñ
|
//¿ªÆô¼Æ»®ÈÎÎñ
|
||||||
services.AddTaskSchedulers();
|
services.AddTaskSchedulers();
|
||||||
|
|
||||||
|
string connStr = Configuration.GetConnectionString(OptionsSetting.ConnAdmin);
|
||||||
|
string connStrBus = Configuration.GetConnectionString(OptionsSetting.ConnBus);
|
||||||
|
string dbKey = Configuration[OptionsSetting.DbKey];
|
||||||
|
int dbType = Convert.ToInt32(Configuration[OptionsSetting.ConnDbType]);
|
||||||
|
int dbType_bus = Convert.ToInt32(Configuration[OptionsSetting.ConnBusDbType]);
|
||||||
|
|
||||||
|
IocConfig db1 = new IocConfig()
|
||||||
|
{
|
||||||
|
ConfigId = "0", //多租户用到
|
||||||
|
ConnectionString = connStr,
|
||||||
|
DbType = (IocDbType)dbType,
|
||||||
|
IsAutoCloseConnection = true//自动释放
|
||||||
|
};
|
||||||
|
IocConfig db2 = new IocConfig()
|
||||||
|
{
|
||||||
|
ConfigId = "1", // 多租户用到
|
||||||
|
ConnectionString = connStrBus,
|
||||||
|
DbType = (IocDbType)dbType_bus,
|
||||||
|
IsAutoCloseConnection = true//自动释放
|
||||||
|
};
|
||||||
|
SugarIocServices.AddSqlSugar(new List<IocConfig>() { db1, db2 });
|
||||||
|
|
||||||
|
//调式代码 用来打印SQL
|
||||||
|
DbScoped.SugarScope.GetConnection(0).Aop.OnLogExecuting = (sql, pars) =>
|
||||||
|
{
|
||||||
|
Console.BackgroundColor = ConsoleColor.Yellow;
|
||||||
|
Console.WriteLine("【SQL语句】" + sql.ToLower() + "\r\n"
|
||||||
|
+ DbScoped.SugarScope.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value)));
|
||||||
|
};
|
||||||
|
//出错打印日志
|
||||||
|
DbScoped.SugarScope.GetConnection(0).Aop.OnError = (e) =>
|
||||||
|
{
|
||||||
|
Console.WriteLine($"[执行Sql出错]{e.Message},SQL={e.Sql}");
|
||||||
|
Console.WriteLine();
|
||||||
|
};
|
||||||
|
//Bus Db错误日志
|
||||||
|
DbScoped.SugarScope.GetConnection(1).Aop.OnError = (e) =>
|
||||||
|
{
|
||||||
|
Console.WriteLine($"[执行Sql出错Bus]{e.Message},SQL={e.Sql}");
|
||||||
|
Console.WriteLine();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,6 +32,7 @@
|
|||||||
<PackageReference Include="NLog" Version="4.7.5" />
|
<PackageReference Include="NLog" Version="4.7.5" />
|
||||||
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.3" />
|
<PackageReference Include="NLog.Web.AspNetCore" Version="4.9.3" />
|
||||||
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
<PackageReference Include="Snowflake.Core" Version="2.0.0" />
|
||||||
|
<PackageReference Include="SqlSugar.IOC" Version="1.7.0" />
|
||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.4" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.1.4" />
|
||||||
<PackageReference Include="UAParser" Version="3.1.46" />
|
<PackageReference Include="UAParser" Version="3.1.46" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@ -7,9 +7,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ConnectionStrings": {
|
"ConnectionStrings": {
|
||||||
"conn_zrAdmin": "server=127.0.0.1;user=zr;pwd=abc;database=admin"
|
"conn_zrAdmin": "server=127.0.0.1;user=zr;pwd=abc;database=admin",
|
||||||
|
"conn_bus": "server=127.0.0.1;user=zr;pwd=abc;database=admin"
|
||||||
},
|
},
|
||||||
"conn_zrAdmin_Type": 0, //MySql = 0, SqlServer = 1
|
"conn_zrAdmin_type": 0, //MySql = 0, SqlServer = 1
|
||||||
|
"conn_bus_type": 0,
|
||||||
"urls": "http://localhost:8888", //项目启动url
|
"urls": "http://localhost:8888", //项目启动url
|
||||||
"sysConfig": {
|
"sysConfig": {
|
||||||
"DBCommandTimeout": 10,
|
"DBCommandTimeout": 10,
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Infrastructure.Model;
|
using Infrastructure.Model;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using SqlSugar.IOC;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Dynamic;
|
using System.Dynamic;
|
||||||
@ -21,46 +22,8 @@ namespace ZR.Repository
|
|||||||
{
|
{
|
||||||
if (dbContext == null)
|
if (dbContext == null)
|
||||||
{
|
{
|
||||||
string connStr = ConfigUtils.Instance.GetConnectionStrings(OptionsSetting.ConnAdmin);
|
//Console.WriteLine("configId:" + configId);
|
||||||
string dbKey = ConfigUtils.Instance.GetAppConfig<string>(OptionsSetting.DbKey);
|
base.Context = DbScoped.SugarScope.GetConnection(configId);//根据类传入的ConfigId自动选择
|
||||||
int dbType = ConfigUtils.Instance.GetAppConfig<int>(OptionsSetting.ConnDbType);
|
|
||||||
if (!string.IsNullOrEmpty(dbKey))
|
|
||||||
{
|
|
||||||
connStr = NETCore.Encrypt.EncryptProvider.DESDecrypt(connStr, dbKey);
|
|
||||||
}
|
|
||||||
|
|
||||||
var Db = new SqlSugarClient(new List<ConnectionConfig>()
|
|
||||||
{
|
|
||||||
new ConnectionConfig(){
|
|
||||||
ConnectionString = connStr,
|
|
||||||
DbType = (DbType)dbType,
|
|
||||||
IsAutoCloseConnection = true,//开启自动释放模式和EF原理一样
|
|
||||||
InitKeyType = InitKeyType.Attribute,//从特性读取主键和自增列信息
|
|
||||||
ConfigId = 0
|
|
||||||
},
|
|
||||||
new ConnectionConfig(){
|
|
||||||
ConnectionString = "",
|
|
||||||
DbType = DbType.SqlServer,
|
|
||||||
IsAutoCloseConnection = true,
|
|
||||||
InitKeyType = InitKeyType.Attribute,//从特性读取主键和自增列信息
|
|
||||||
ConfigId = 1
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
//调式代码 用来打印SQL
|
|
||||||
Db.GetConnection(0).Aop.OnLogExecuting = (sql, pars) =>
|
|
||||||
{
|
|
||||||
Console.BackgroundColor = ConsoleColor.Yellow;
|
|
||||||
Console.WriteLine("【SQL语句】" + sql.ToLower() + "\r\n" + Db.Utilities.SerializeObject(pars.ToDictionary(it => it.ParameterName, it => it.Value)));
|
|
||||||
};
|
|
||||||
//出错打印日志
|
|
||||||
Db.GetConnection(0).Aop.OnError = (e) =>
|
|
||||||
{
|
|
||||||
Console.WriteLine($"[执行Sql出错]{e.Message},SQL={e.Sql}");
|
|
||||||
Console.WriteLine();
|
|
||||||
};
|
|
||||||
|
|
||||||
Context = Db.GetConnection(configId);//根据类传入的ConfigId自动选择
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -87,115 +50,115 @@ namespace ZR.Repository
|
|||||||
return Context.Insertable(t).ExecuteCommand();
|
return Context.Insertable(t).ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int InsertIgnoreNullColumn(T t)
|
//public int InsertIgnoreNullColumn(T t)
|
||||||
{
|
//{
|
||||||
return Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
|
// return Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public int InsertIgnoreNullColumn(T t, params string[] columns)
|
//public int InsertIgnoreNullColumn(T t, params string[] columns)
|
||||||
{
|
//{
|
||||||
return Context.Insertable(t).IgnoreColumns(columns).ExecuteCommand();
|
// return Context.Insertable(t).IgnoreColumns(columns).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
|
|
||||||
//public int Insert(SqlSugarClient client, T t)
|
//public int Insert(SqlSugarClient client, T t)
|
||||||
//{
|
//{
|
||||||
// return client.Insertable(t).ExecuteCommand();
|
// return client.Insertable(t).ExecuteCommand();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public long InsertBigIdentity(T t)
|
//public long InsertBigIdentity(T t)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(t).ExecuteReturnBigIdentity();
|
// return base.Context.Insertable(t).ExecuteReturnBigIdentity();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public int Insert(List<T> t)
|
public int Insert(List<T> t)
|
||||||
{
|
{
|
||||||
return base.Context.Insertable(t).ExecuteCommand();
|
return base.Context.Insertable(t).ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
|
||||||
public int InsertIgnoreNullColumn(List<T> t)
|
//public int InsertIgnoreNullColumn(List<T> t)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
|
// return base.Context.Insertable(t).IgnoreColumns(true).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public int InsertIgnoreNullColumn(List<T> t, params string[] columns)
|
//public int InsertIgnoreNullColumn(List<T> t, params string[] columns)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(t).IgnoreColumns(columns).ExecuteCommand();
|
// return base.Context.Insertable(t).IgnoreColumns(columns).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
public int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true)
|
//public int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(parm).InsertColumns(iClumns).IgnoreColumns(ignoreNullColumn: ignoreNull).ExecuteCommand();
|
// return base.Context.Insertable(parm).InsertColumns(iClumns).IgnoreColumns(ignoreNullColumn: ignoreNull).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
public DbResult<bool> InsertTran(T t)
|
//public DbResult<bool> InsertTran(T t)
|
||||||
{
|
//{
|
||||||
var result = base.Context.Ado.UseTran(() =>
|
// var result = base.Context.Ado.UseTran(() =>
|
||||||
{
|
// {
|
||||||
base.Context.Insertable(t).ExecuteCommand();
|
// base.Context.Insertable(t).ExecuteCommand();
|
||||||
});
|
// });
|
||||||
return result;
|
// return result;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public DbResult<bool> InsertTran(List<T> t)
|
//public DbResult<bool> InsertTran(List<T> t)
|
||||||
{
|
//{
|
||||||
var result = base.Context.Ado.UseTran(() =>
|
// var result = base.Context.Ado.UseTran(() =>
|
||||||
{
|
// {
|
||||||
base.Context.Insertable(t).ExecuteCommand();
|
// base.Context.Insertable(t).ExecuteCommand();
|
||||||
});
|
// });
|
||||||
return result;
|
// return result;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public T InsertReturnEntity(T t)
|
//public T InsertReturnEntity(T t)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(t).ExecuteReturnEntity();
|
// return base.Context.Insertable(t).ExecuteReturnEntity();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public T InsertReturnEntity(T t, string sqlWith = SqlWith.UpdLock)
|
//public T InsertReturnEntity(T t, string sqlWith = SqlWith.UpdLock)
|
||||||
{
|
//{
|
||||||
return base.Context.Insertable(t).With(sqlWith).ExecuteReturnEntity();
|
// return base.Context.Insertable(t).With(sqlWith).ExecuteReturnEntity();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool ExecuteCommand(string sql, object parameters)
|
//public bool ExecuteCommand(string sql, object parameters)
|
||||||
{
|
//{
|
||||||
return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
// return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool ExecuteCommand(string sql, params SugarParameter[] parameters)
|
//public bool ExecuteCommand(string sql, params SugarParameter[] parameters)
|
||||||
{
|
//{
|
||||||
return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
// return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool ExecuteCommand(string sql, List<SugarParameter> parameters)
|
//public bool ExecuteCommand(string sql, List<SugarParameter> parameters)
|
||||||
{
|
//{
|
||||||
return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
// return base.Context.Ado.ExecuteCommand(sql, parameters) > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
#endregion add
|
#endregion add
|
||||||
|
|
||||||
#region update
|
#region update
|
||||||
|
|
||||||
public bool UpdateEntity(T entity, bool ignoreNullColumns = false)
|
//public bool UpdateEntity(T entity, bool ignoreNullColumns = false)
|
||||||
{
|
//{
|
||||||
return base.Context.Updateable(entity).IgnoreColumns(ignoreNullColumns).ExecuteCommand() > 0;
|
// return base.Context.Updateable(entity).IgnoreColumns(ignoreNullColumns).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool Update(T entity, Expression<Func<T, bool>> expression)
|
//public bool Update(T entity, Expression<Func<T, bool>> expression)
|
||||||
{
|
//{
|
||||||
return base.Context.Updateable(entity).Where(expression).ExecuteCommand() > 0;
|
// return base.Context.Updateable(entity).Where(expression).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool Update(T entity, Expression<Func<T, object>> expression, bool ignoreAllNull = false)
|
//public bool Update(T entity, Expression<Func<T, object>> expression, bool ignoreAllNull = false)
|
||||||
{
|
//{
|
||||||
return base.Context.Updateable(entity).UpdateColumns(expression).IgnoreColumns(ignoreAllNull).ExecuteCommand() > 0;
|
// return base.Context.Updateable(entity).UpdateColumns(expression).IgnoreColumns(ignoreAllNull).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool Update(T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where)
|
//public bool Update(T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where)
|
||||||
{
|
//{
|
||||||
return base.Context.Updateable(entity).UpdateColumns(expression).Where(where).ExecuteCommand() > 0;
|
// return base.Context.Updateable(entity).UpdateColumns(expression).Where(where).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
public bool Update(SqlSugarClient client, T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where)
|
//public bool Update(SqlSugarClient client, T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where)
|
||||||
{
|
//{
|
||||||
return client.Updateable(entity).UpdateColumns(expression).Where(where).ExecuteCommand() > 0;
|
// return client.Updateable(entity).UpdateColumns(expression).Where(where).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@ -218,14 +181,14 @@ namespace ZR.Repository
|
|||||||
return base.Context.Updateable(entity).IgnoreColumns(isNull).IgnoreColumns(list.ToArray()).ExecuteCommand() > 0;
|
return base.Context.Updateable(entity).IgnoreColumns(isNull).IgnoreColumns(list.ToArray()).ExecuteCommand() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Update(List<T> entity)
|
//public bool Update(List<T> entity)
|
||||||
{
|
//{
|
||||||
var result = base.Context.Ado.UseTran(() =>
|
// var result = base.Context.Ado.UseTran(() =>
|
||||||
{
|
// {
|
||||||
base.Context.Updateable(entity).ExecuteCommand();
|
// base.Context.Updateable(entity).ExecuteCommand();
|
||||||
});
|
// });
|
||||||
return result.IsSuccess;
|
// return result.IsSuccess;
|
||||||
}
|
//}
|
||||||
public bool Update(Expression<Func<T, bool>> where, Expression<Func<T, T>> columns)
|
public bool Update(Expression<Func<T, bool>> where, Expression<Func<T, T>> columns)
|
||||||
{
|
{
|
||||||
return base.Context.Updateable<T>().SetColumns(columns).Where(where).RemoveDataCache().ExecuteCommand() > 0;
|
return base.Context.Updateable<T>().SetColumns(columns).Where(where).RemoveDataCache().ExecuteCommand() > 0;
|
||||||
@ -252,20 +215,20 @@ namespace ZR.Repository
|
|||||||
|
|
||||||
#region delete
|
#region delete
|
||||||
|
|
||||||
public bool DeleteExp(Expression<Func<T, bool>> expression)
|
//public bool DeleteExp(Expression<Func<T, bool>> expression)
|
||||||
{
|
//{
|
||||||
return Context.Deleteable<T>().Where(expression).ExecuteCommand() > 0;
|
// return Context.Deleteable<T>().Where(expression).ExecuteCommand() > 0;
|
||||||
}
|
//}
|
||||||
|
|
||||||
//public bool Delete<PkType>(PkType[] primaryKeyValues)
|
//public bool Delete<PkType>(PkType[] primaryKeyValues)
|
||||||
//{
|
//{
|
||||||
// return base.Context.Deleteable<T>().In(primaryKeyValues).ExecuteCommand() > 0;
|
// return base.Context.Deleteable<T>().In(primaryKeyValues).ExecuteCommand() > 0;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public int Delete(object[] obj)
|
//public int Delete(object[] obj)
|
||||||
{
|
//{
|
||||||
return Context.Deleteable<T>().In(obj).ExecuteCommand();
|
// return Context.Deleteable<T>().In(obj).ExecuteCommand();
|
||||||
}
|
//}
|
||||||
public int Delete(object id)
|
public int Delete(object id)
|
||||||
{
|
{
|
||||||
return Context.Deleteable<T>(id).ExecuteCommand();
|
return Context.Deleteable<T>(id).ExecuteCommand();
|
||||||
@ -289,20 +252,20 @@ namespace ZR.Repository
|
|||||||
return Context.Queryable<T>();
|
return Context.Queryable<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ISugarQueryable<ExpandoObject> Queryable(string tableName, string shortName)
|
//public ISugarQueryable<ExpandoObject> Queryable(string tableName, string shortName)
|
||||||
{
|
//{
|
||||||
return Context.Queryable(tableName, shortName);
|
// return Context.Queryable(tableName, shortName);
|
||||||
}
|
//}
|
||||||
|
|
||||||
public List<T> QueryableToList(Expression<Func<T, bool>> expression)
|
public List<T> QueryableToList(Expression<Func<T, bool>> expression)
|
||||||
{
|
{
|
||||||
return Context.Queryable<T>().Where(expression).ToList();
|
return Context.Queryable<T>().Where(expression).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public Task<List<T>> QueryableToListAsync(Expression<Func<T, bool>> expression)
|
//public Task<List<T>> QueryableToListAsync(Expression<Func<T, bool>> expression)
|
||||||
{
|
//{
|
||||||
return Context.Queryable<T>().Where(expression).ToListAsync();
|
// return Context.Queryable<T>().Where(expression).ToListAsync();
|
||||||
}
|
//}
|
||||||
|
|
||||||
//public string QueryableToJson(string select, Expression<Func<T, bool>> expressionWhere)
|
//public string QueryableToJson(string select, Expression<Func<T, bool>> expressionWhere)
|
||||||
//{
|
//{
|
||||||
@ -310,45 +273,45 @@ namespace ZR.Repository
|
|||||||
// return query.JilToJson();
|
// return query.JilToJson();
|
||||||
//}
|
//}
|
||||||
|
|
||||||
public List<T> QueryableToList(string tableName)
|
//public List<T> QueryableToList(string tableName)
|
||||||
{
|
//{
|
||||||
return Context.Queryable<T>(tableName).ToList();
|
// return Context.Queryable<T>(tableName).ToList();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public List<T> QueryableToList(string tableName, Expression<Func<T, bool>> expression)
|
//public List<T> QueryableToList(string tableName, Expression<Func<T, bool>> expression)
|
||||||
{
|
//{
|
||||||
return Context.Queryable<T>(tableName).Where(expression).ToList();
|
// return Context.Queryable<T>(tableName).Where(expression).ToList();
|
||||||
}
|
//}
|
||||||
|
|
||||||
public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, int pageIndex = 0, int pageSize = 10)
|
//public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, int pageIndex = 0, int pageSize = 10)
|
||||||
{
|
//{
|
||||||
int totalNumber = 0;
|
// int totalNumber = 0;
|
||||||
var list = Context.Queryable<T>().Where(expression).ToPageList(pageIndex, pageSize, ref totalNumber);
|
// var list = Context.Queryable<T>().Where(expression).ToPageList(pageIndex, pageSize, ref totalNumber);
|
||||||
return (list, totalNumber);
|
// return (list, totalNumber);
|
||||||
}
|
//}
|
||||||
|
|
||||||
public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, string order, int pageIndex = 0, int pageSize = 10)
|
//public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, string order, int pageIndex = 0, int pageSize = 10)
|
||||||
{
|
//{
|
||||||
int totalNumber = 0;
|
// int totalNumber = 0;
|
||||||
var list = Context.Queryable<T>().Where(expression).OrderBy(order).ToPageList(pageIndex, pageSize, ref totalNumber);
|
// var list = Context.Queryable<T>().Where(expression).OrderBy(order).ToPageList(pageIndex, pageSize, ref totalNumber);
|
||||||
return (list, totalNumber);
|
// return (list, totalNumber);
|
||||||
}
|
//}
|
||||||
|
|
||||||
public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Expression<Func<T, object>> orderFiled, string orderBy, int pageIndex = 0, int pageSize = 10)
|
//public (List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Expression<Func<T, object>> orderFiled, string orderBy, int pageIndex = 0, int pageSize = 10)
|
||||||
{
|
//{
|
||||||
int totalNumber = 0;
|
// int totalNumber = 0;
|
||||||
|
|
||||||
if (orderBy.Equals("DESC", StringComparison.OrdinalIgnoreCase))
|
// if (orderBy.Equals("DESC", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
// {
|
||||||
var list = Context.Queryable<T>().Where(expression).OrderBy(orderFiled, OrderByType.Desc).ToPageList(pageIndex, pageSize, ref totalNumber);
|
// var list = Context.Queryable<T>().Where(expression).OrderBy(orderFiled, OrderByType.Desc).ToPageList(pageIndex, pageSize, ref totalNumber);
|
||||||
return (list, totalNumber);
|
// return (list, totalNumber);
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
var list = Context.Queryable<T>().Where(expression).OrderBy(orderFiled, OrderByType.Asc).ToPageList(pageIndex, pageSize, ref totalNumber);
|
// var list = Context.Queryable<T>().Where(expression).OrderBy(orderFiled, OrderByType.Asc).ToPageList(pageIndex, pageSize, ref totalNumber);
|
||||||
return (list, totalNumber);
|
// return (list, totalNumber);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
public List<T> SqlQueryToList(string sql, object obj = null)
|
public List<T> SqlQueryToList(string sql, object obj = null)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -18,42 +18,42 @@ namespace ZR.Repository
|
|||||||
int Add(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
|
int Add(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
|
||||||
int Add(T t);
|
int Add(T t);
|
||||||
|
|
||||||
int InsertIgnoreNullColumn(T t);
|
//int InsertIgnoreNullColumn(T t);
|
||||||
|
|
||||||
int InsertIgnoreNullColumn(T t, params string[] columns);
|
//int InsertIgnoreNullColumn(T t, params string[] columns);
|
||||||
|
|
||||||
//int Insert(SqlSugarClient client, T t);
|
//int Insert(SqlSugarClient client, T t);
|
||||||
|
|
||||||
long InsertBigIdentity(T t);
|
//long InsertBigIdentity(T t);
|
||||||
|
|
||||||
int Insert(List<T> t);
|
int Insert(List<T> t);
|
||||||
int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
|
//int Insert(T parm, Expression<Func<T, object>> iClumns = null, bool ignoreNull = true);
|
||||||
|
|
||||||
int InsertIgnoreNullColumn(List<T> t);
|
//int InsertIgnoreNullColumn(List<T> t);
|
||||||
|
|
||||||
int InsertIgnoreNullColumn(List<T> t, params string[] columns);
|
//int InsertIgnoreNullColumn(List<T> t, params string[] columns);
|
||||||
|
|
||||||
DbResult<bool> InsertTran(T t);
|
//DbResult<bool> InsertTran(T t);
|
||||||
|
|
||||||
DbResult<bool> InsertTran(List<T> t);
|
//DbResult<bool> InsertTran(List<T> t);
|
||||||
|
|
||||||
T InsertReturnEntity(T t);
|
//T InsertReturnEntity(T t);
|
||||||
|
|
||||||
T InsertReturnEntity(T t, string sqlWith = SqlWith.UpdLock);
|
//T InsertReturnEntity(T t, string sqlWith = SqlWith.UpdLock);
|
||||||
|
|
||||||
bool ExecuteCommand(string sql, object parameters);
|
//bool ExecuteCommand(string sql, object parameters);
|
||||||
|
|
||||||
bool ExecuteCommand(string sql, params SugarParameter[] parameters);
|
//bool ExecuteCommand(string sql, params SugarParameter[] parameters);
|
||||||
|
|
||||||
bool ExecuteCommand(string sql, List<SugarParameter> parameters);
|
//bool ExecuteCommand(string sql, List<SugarParameter> parameters);
|
||||||
|
|
||||||
#endregion add
|
#endregion add
|
||||||
|
|
||||||
#region update
|
#region update
|
||||||
|
|
||||||
bool UpdateEntity(T entity, bool ignoreNullColumns = false);
|
//bool UpdateEntity(T entity, bool ignoreNullColumns = false);
|
||||||
|
|
||||||
bool Update(T entity, Expression<Func<T, bool>> expression);
|
//bool Update(T entity, Expression<Func<T, bool>> expression);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 只更新表达式的值
|
/// 只更新表达式的值
|
||||||
@ -61,11 +61,11 @@ namespace ZR.Repository
|
|||||||
/// <param name="entity"></param>
|
/// <param name="entity"></param>
|
||||||
/// <param name="expression"></param>
|
/// <param name="expression"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
bool Update(T entity, Expression<Func<T, object>> expression, bool ignoreAllNull = false);
|
//bool Update(T entity, Expression<Func<T, object>> expression, bool ignoreAllNull = false);
|
||||||
|
|
||||||
bool Update(T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where);
|
//bool Update(T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where);
|
||||||
|
|
||||||
bool Update(SqlSugarClient client, T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where);
|
//bool Update(SqlSugarClient client, T entity, Expression<Func<T, object>> expression, Expression<Func<T, bool>> where);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
@ -76,7 +76,7 @@ namespace ZR.Repository
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
bool Update(T entity, List<string> list = null, bool isNull = true);
|
bool Update(T entity, List<string> list = null, bool isNull = true);
|
||||||
|
|
||||||
bool Update(List<T> entity);
|
//bool Update(List<T> entity);
|
||||||
bool Update(Expression<Func<T, bool>> where, Expression<Func<T, T>> columns);
|
bool Update(Expression<Func<T, bool>> where, Expression<Func<T, T>> columns);
|
||||||
|
|
||||||
#endregion update
|
#endregion update
|
||||||
@ -89,10 +89,10 @@ namespace ZR.Repository
|
|||||||
|
|
||||||
#region delete
|
#region delete
|
||||||
|
|
||||||
bool DeleteExp(Expression<Func<T, bool>> expression);
|
//bool DeleteExp(Expression<Func<T, bool>> expression);
|
||||||
|
|
||||||
//bool Delete<PkType>(PkType[] primaryKeyValues);
|
//bool Delete<PkType>(PkType[] primaryKeyValues);
|
||||||
int Delete(object[] obj);
|
//int Delete(object[] obj);
|
||||||
int Delete(object id);
|
int Delete(object id);
|
||||||
bool DeleteTable();
|
bool DeleteTable();
|
||||||
|
|
||||||
@ -120,19 +120,19 @@ namespace ZR.Repository
|
|||||||
|
|
||||||
List<T> QueryableToList(Expression<Func<T, bool>> expression);
|
List<T> QueryableToList(Expression<Func<T, bool>> expression);
|
||||||
|
|
||||||
Task<List<T>> QueryableToListAsync(Expression<Func<T, bool>> expression);
|
//Task<List<T>> QueryableToListAsync(Expression<Func<T, bool>> expression);
|
||||||
|
|
||||||
//string QueryableToJson(string select, Expression<Func<T, bool>> expressionWhere);
|
//string QueryableToJson(string select, Expression<Func<T, bool>> expressionWhere);
|
||||||
|
|
||||||
List<T> QueryableToList(string tableName);
|
//List<T> QueryableToList(string tableName);
|
||||||
|
|
||||||
List<T> QueryableToList(string tableName, Expression<Func<T, bool>> expression);
|
//List<T> QueryableToList(string tableName, Expression<Func<T, bool>> expression);
|
||||||
|
|
||||||
(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, int pageIndex = 0, int pageSize = 10);
|
//(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, int pageIndex = 0, int pageSize = 10);
|
||||||
|
|
||||||
(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, string order, int pageIndex = 0, int pageSize = 10);
|
//(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, string order, int pageIndex = 0, int pageSize = 10);
|
||||||
|
|
||||||
(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Expression<Func<T, object>> orderFiled, string orderBy, int pageIndex = 0, int pageSize = 10);
|
//(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Expression<Func<T, object>> orderFiled, string orderBy, int pageIndex = 0, int pageSize = 10);
|
||||||
|
|
||||||
//(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Bootstrap.BootstrapParams bootstrap);
|
//(List<T>, int) QueryableToPage(Expression<Func<T, bool>> expression, Bootstrap.BootstrapParams bootstrap);
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,10 @@ namespace ZR.Repository
|
|||||||
[AppService(ServiceLifetime = LifeTime.Transient)]
|
[AppService(ServiceLifetime = LifeTime.Transient)]
|
||||||
public class GendemoRepository : BaseRepository<Gendemo>
|
public class GendemoRepository : BaseRepository<Gendemo>
|
||||||
{
|
{
|
||||||
|
public GendemoRepository() : base(configId: 1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
#region 业务逻辑代码
|
#region 业务逻辑代码
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
|
using Infrastructure.Model;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using ZR.Model;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
|
|
||||||
namespace ZR.Repository.System
|
namespace ZR.Repository.System
|
||||||
@ -14,8 +16,22 @@ namespace ZR.Repository.System
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 根据条件分页查询角色数据
|
/// 根据条件分页查询角色数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
/// <param name="sysRole"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<SysRole> SelectRoleList(SysRole sysRole)
|
public List<SysRole> SelectRoleList()
|
||||||
|
{
|
||||||
|
return Context.Queryable<SysRole>()
|
||||||
|
.Where(role => role.DelFlag == "0")
|
||||||
|
.OrderBy(role => role.RoleSort)
|
||||||
|
.ToList();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// 根据条件分页查询角色数据
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sysRole"></param>
|
||||||
|
/// <param name="pager"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public PagedInfo<SysRole> SelectRoleList(SysRole sysRole, PagerInfo pager)
|
||||||
{
|
{
|
||||||
return Context.Queryable<SysRole>()
|
return Context.Queryable<SysRole>()
|
||||||
.Where(role => role.DelFlag == "0")
|
.Where(role => role.DelFlag == "0")
|
||||||
@ -23,7 +39,7 @@ namespace ZR.Repository.System
|
|||||||
.WhereIF(!string.IsNullOrEmpty(sysRole.Status), role => role.Status == sysRole.Status)
|
.WhereIF(!string.IsNullOrEmpty(sysRole.Status), role => role.Status == sysRole.Status)
|
||||||
.WhereIF(!string.IsNullOrEmpty(sysRole.RoleKey), role => role.RoleKey == sysRole.RoleKey)
|
.WhereIF(!string.IsNullOrEmpty(sysRole.RoleKey), role => role.RoleKey == sysRole.RoleKey)
|
||||||
.OrderBy(role => role.RoleSort)
|
.OrderBy(role => role.RoleSort)
|
||||||
.ToList();
|
.ToPage(pager);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" />
|
||||||
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
<PackageReference Include="MySql.Data" Version="8.0.25" />
|
||||||
<PackageReference Include="NETCore.Encrypt" Version="2.0.9" />
|
<PackageReference Include="NETCore.Encrypt" Version="2.0.9" />
|
||||||
|
<PackageReference Include="SqlSugar.IOC" Version="1.7.0" />
|
||||||
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.4" />
|
<PackageReference Include="SqlSugarCoreNoDrive" Version="5.0.4" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using System;
|
using Infrastructure.Model;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -12,8 +13,9 @@ namespace ZR.Service.System.IService
|
|||||||
/// 根据条件分页查询角色数据
|
/// 根据条件分页查询角色数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="role">角色信息</param>
|
/// <param name="role">角色信息</param>
|
||||||
|
/// <param name="pager"></param>
|
||||||
/// <returns>角色数据集合信息</returns>
|
/// <returns>角色数据集合信息</returns>
|
||||||
public List<SysRole> SelectRoleList(SysRole role);
|
public PagedInfo<SysRole> SelectRoleList(SysRole role, Model.PagerInfo pager);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询所有角色
|
/// 查询所有角色
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
using Infrastructure;
|
using Infrastructure;
|
||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
|
using Infrastructure.Model;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using ZR.Model;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using ZR.Repository.System;
|
using ZR.Repository.System;
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
@ -33,9 +35,9 @@ namespace ZR.Service
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="role">角色信息</param>
|
/// <param name="role">角色信息</param>
|
||||||
/// <returns>角色数据集合信息</returns>
|
/// <returns>角色数据集合信息</returns>
|
||||||
public List<SysRole> SelectRoleList(SysRole role)
|
public PagedInfo<SysRole> SelectRoleList(SysRole role, PagerInfo pager)
|
||||||
{
|
{
|
||||||
return SysRoleRepository.SelectRoleList(role);
|
return SysRoleRepository.SelectRoleList(role, pager);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -45,7 +47,7 @@ namespace ZR.Service
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<SysRole> SelectRoleAll()
|
public List<SysRole> SelectRoleAll()
|
||||||
{
|
{
|
||||||
return SysRoleRepository.SelectRoleList(new SysRole());
|
return SysRoleRepository.SelectRoleList();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@ -255,6 +255,13 @@ aside {
|
|||||||
padding: 10px 20px !important;
|
padding: 10px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* tree border */
|
||||||
|
.tree-border {
|
||||||
|
margin-top: 5px;
|
||||||
|
border: 1px solid #e5e6e7;
|
||||||
|
background: #FFFFFF none;
|
||||||
|
border-radius:4px;
|
||||||
|
}
|
||||||
.pagination-container .el-pagination {
|
.pagination-container .el-pagination {
|
||||||
right: 0;
|
right: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -419,39 +426,6 @@ aside {
|
|||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* text color */
|
|
||||||
.text-navy {
|
|
||||||
color: #1ab394;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-primary {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-success {
|
|
||||||
color: #1c84c6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-info {
|
|
||||||
color: #23c6c8;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-warning {
|
|
||||||
color: #f8ac59;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-danger {
|
|
||||||
color: #ed5565;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-muted {
|
|
||||||
color: #888888;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* image */
|
|
||||||
.img-circle {
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.img-lg {
|
.img-lg {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import logoImg from "@/assets/logo/logo.png";
|
import logoImg from "@/assets/logo/logo.png";
|
||||||
import variables from "@/assets/styles/variables.scss";
|
import variables from "@/assets/styles/variables.scss";
|
||||||
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SidebarLogo",
|
name: "SidebarLogo",
|
||||||
@ -47,7 +48,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: "ZrAdmin.NET",
|
title: defaultSettings.title,
|
||||||
logo: logoImg,
|
logo: logoImg,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
<tags-view v-if="needTagsView" />
|
<tags-view v-if="needTagsView" />
|
||||||
</div>
|
</div>
|
||||||
<app-main />
|
<app-main />
|
||||||
<right-panel v-if="showSettings">
|
<right-panel>
|
||||||
<settings />
|
<settings />
|
||||||
</right-panel>
|
</right-panel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import Cookies from 'js-cookie'
|
|||||||
|
|
||||||
import Element from 'element-ui'
|
import Element from 'element-ui'
|
||||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||||||
import '@/assets/styles/element-variables.scss'
|
import './assets/styles/element-variables.scss'
|
||||||
import '@/assets/styles/index.scss' // global css
|
import '@/assets/styles/index.scss' // global css
|
||||||
|
|
||||||
import App from './App'
|
import App from './App'
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||||
<h3 class="title">ZrAdmin.NET管理系统</h3>
|
<h3 class="title">{{title}}后台管理系统</h3>
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||||
@ -30,7 +30,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<!-- 底部 -->
|
<!-- 底部 -->
|
||||||
<div class="el-login-footer">
|
<div class="el-login-footer">
|
||||||
<span>Copyright ©2021 <a href="https://gitee.com/izory/ZrAdminNetCore" target="_black">ZrAdmin.NET</a> All Rights Reserved.</span>
|
<span>Copyright ©2021 izhaorui.cn All Rights Reserved.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -39,6 +39,7 @@
|
|||||||
import { getCodeImg } from "@/api/system/login";
|
import { getCodeImg } from "@/api/system/login";
|
||||||
import Cookies from "js-cookie";
|
import Cookies from "js-cookie";
|
||||||
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
import { encrypt, decrypt } from "@/utils/jsencrypt";
|
||||||
|
import defaultSettings from '@/settings'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Login",
|
name: "Login",
|
||||||
@ -53,6 +54,7 @@ export default {
|
|||||||
code: "",
|
code: "",
|
||||||
uuid: "",
|
uuid: "",
|
||||||
},
|
},
|
||||||
|
title: defaultSettings.title,
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [
|
username: [
|
||||||
{ required: true, trigger: "blur", message: "用户名不能为空" },
|
{ required: true, trigger: "blur", message: "用户名不能为空" },
|
||||||
|
|||||||
@ -15,16 +15,16 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row class="mb8" :gutter="20">
|
<el-row class="mb8" :gutter="20">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:task:add']" plain type="primary" icon="el-icon-plus" size="mini" @click="handleCreate">新增</el-button>
|
<el-button v-hasPermi="['monitor:job:add']" plain type="primary" icon="el-icon-plus" size="mini" @click="handleCreate">新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['PRIV_TASKS_UPDATE']" plain type="success" icon="el-icon-edit" size="mini" @click="handleRun(null)" :disabled="single">运行一次</el-button>
|
<el-button v-hasPermi="['monitor:job:edit']" plain type="success" icon="el-icon-edit" size="mini" @click="handleRun(null)" :disabled="single">运行一次</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button v-hasPermi="['system:task:delete']" plain type="danger" icon="el-icon-remove" size="mini" @click="handleDelete(null)" :disabled="single">删除</el-button>
|
<el-button v-hasPermi="['monitor:job:delete']" plain type="danger" icon="el-icon-remove" size="mini" @click="handleDelete(null)" :disabled="single">删除</el-button>
|
||||||
</el-col>-->
|
</el-col>-->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="info" icon="el-icon-s-operation" size="mini" @click="handleJobLog({id: 1})">日志</el-button>
|
<el-button v-hasPermi="['monitor:job:query']" type="info" icon="el-icon-s-operation" size="mini" @click="handleJobLog({id: 1})">日志</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="searchToggle" @queryTable="handleQuery"></right-toolbar>
|
<right-toolbar :showSearch.sync="searchToggle" @queryTable="handleQuery"></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -36,7 +36,6 @@
|
|||||||
<el-table-column prop="jobGroup" :show-overflow-tooltip="true" align="center" label="任务分组" />
|
<el-table-column prop="jobGroup" :show-overflow-tooltip="true" align="center" label="任务分组" />
|
||||||
<el-table-column prop="assemblyName" align="center" label="程序集名称" :show-overflow-tooltip="true" />
|
<el-table-column prop="assemblyName" align="center" label="程序集名称" :show-overflow-tooltip="true" />
|
||||||
<el-table-column prop="className" align="center" label="任务类名" :show-overflow-tooltip="true" />
|
<el-table-column prop="className" align="center" label="任务类名" :show-overflow-tooltip="true" />
|
||||||
<!-- <el-table-column prop="runTimes" align="center" label="执行次数" width="120" /> -->
|
|
||||||
<el-table-column prop="cron" align="center" label="运行表达式" />
|
<el-table-column prop="cron" align="center" label="运行表达式" />
|
||||||
<el-table-column sortable prop="isStart" align="center" label="状态" width="90">
|
<el-table-column sortable prop="isStart" align="center" label="状态" width="90">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@ -46,16 +45,16 @@
|
|||||||
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
|
|
||||||
<el-button type="text" size="mini" icon="el-icon-view">
|
<el-button type="text" size="mini" icon="el-icon-view" v-hasPermi="['monitor:job:query']">
|
||||||
<router-link :to="{path: '/job/log', query: {jobId: scope.row.id}}">日志</router-link>
|
<router-link :to="{path: '/job/log', query: {jobId: scope.row.id}}">日志</router-link>
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button type="text" v-if="scope.row.isStart" v-hasPermi="['system:task:run']" size="mini" icon="el-icon-remove" title="运行" @click="handleRun(scope.row)">运行</el-button>
|
<el-button type="text" v-if="scope.row.isStart" v-hasPermi="['monitor:job:run']" size="mini" icon="el-icon-remove" title="运行" @click="handleRun(scope.row)">运行</el-button>
|
||||||
<el-button type="text" v-if="scope.row.isStart" v-hasPermi="['system:task:stop']" size="mini" icon="el-icon-video-pause" style="color:red" title="停止" @click="handleStop(scope.row)">停止</el-button>
|
<el-button type="text" v-if="scope.row.isStart" v-hasPermi="['monitor:job:stop']" size="mini" icon="el-icon-video-pause" style="color:red" title="停止" @click="handleStop(scope.row)">停止</el-button>
|
||||||
|
|
||||||
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['system:task:start']" size="mini" icon="el-icon-video-play" title="启动" @click="handleStart(scope.row)">启动</el-button>
|
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['monitor:job:start']" size="mini" icon="el-icon-video-play" title="启动" @click="handleStart(scope.row)">启动</el-button>
|
||||||
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['system:task:edit']" size="mini" icon="el-icon-edit" style="color:gray" title="编辑" @click="handleUpdate(scope.row)">编辑</el-button>
|
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['monitor:job:edit']" size="mini" icon="el-icon-edit" style="color:gray" title="编辑" @click="handleUpdate(scope.row)">编辑</el-button>
|
||||||
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['system:task:delete']" size="mini" icon="el-icon-delete" style="color:red" title="删除" @click="handleDelete(scope.row)">删除</el-button>
|
<el-button type="text" v-if="!scope.row.isStart" v-hasPermi="['monitor:job:delete']" size="mini" icon="el-icon-delete" style="color:red" title="删除" @click="handleDelete(scope.row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|||||||
@ -119,7 +119,7 @@ import {
|
|||||||
list,
|
list,
|
||||||
delOperlog,
|
delOperlog,
|
||||||
cleanOperlog,
|
cleanOperlog,
|
||||||
exportOperlog,
|
// exportOperlog,
|
||||||
} from "@/api/monitor/operlog";
|
} from "@/api/monitor/operlog";
|
||||||
import DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
|
||||||
@ -253,18 +253,18 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 导出按钮操作 */
|
/** 导出按钮操作 */
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const queryParams = this.queryParams;
|
// const queryParams = this.queryParams;
|
||||||
this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
|
// this.$confirm("是否确认导出所有操作日志数据项?", "警告", {
|
||||||
confirmButtonText: "确定",
|
// confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
// cancelButtonText: "取消",
|
||||||
type: "warning",
|
// type: "warning",
|
||||||
})
|
// })
|
||||||
.then(function () {
|
// .then(function () {
|
||||||
return exportOperlog(queryParams);
|
// return exportOperlog(queryParams);
|
||||||
})
|
// })
|
||||||
.then((response) => {
|
// .then((response) => {
|
||||||
this.download(response.msg);
|
// this.download(response.msg);
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@ -26,43 +26,46 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row :gutter="24" style="display:flex;">
|
<el-row :gutter="24" style="display:flex;">
|
||||||
<el-col :span="17">
|
<el-col :span="15">
|
||||||
<el-table v-loading="loading" :data="roleList" border highlight-current-row @row-click="handleDataScope" @selection-change="handleSelectionChange" >
|
<el-table v-loading="loading" :data="roleList" border @selection-change="handleSelectionChange">
|
||||||
<el-table-column label="编号" prop="roleId" width="80" />
|
<el-table-column label="编号" prop="roleId" width="80" />
|
||||||
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true"/>
|
<el-table-column label="名称" prop="roleName" />
|
||||||
<el-table-column label="权限字符" prop="roleKey" :show-overflow-tooltip="true" />
|
<el-table-column label="权限字符" prop="roleKey"/>
|
||||||
<el-table-column label="状态" align="center" width="100">
|
<el-table-column label="状态" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
<el-switch v-model="scope.row.status" active-value="0" inactive-value="1" @change="handleStatusChange(scope.row)"></el-switch>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="150"/>
|
||||||
<template slot-scope="scope">
|
<el-table-column label="操作" align="center" width="200">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)" v-if="scope.row.roleKey != 'admin'" v-hasPermi="['system:role:edit']">修改</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click.stop="handleUpdate(scope.row)" v-if="scope.row.roleKey != 'admin'" v-hasPermi="['system:role:edit']">修改</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)" v-if="scope.row.roleKey != 'admin'" v-hasPermi="['system:role:remove']">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click.stop="handleDelete(scope.row)" v-if="scope.row.roleKey != 'admin'" v-hasPermi="['system:role:remove']">删除</el-button>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-circle-check" @click.stop="handleDataScope(scope.row)" v-if="scope.row.roleKey != 'admin'" v-hasPermi="['system:role:authorize']">数据权限</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
|
<!-- <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" /> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="9">
|
||||||
<el-form :model="form" v-show="showRoleScope">
|
<el-form :model="form" v-show="showRoleScope" label-width="80px" style="width:90%">
|
||||||
<el-form-item label="菜单权限" style="max-height:400px;overflow:auto;">
|
<el-form-item label="权限字符">
|
||||||
|
{{form.roleKey}}
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="数据权限" style="max-height:350px;overflow:auto;">
|
||||||
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
||||||
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
|
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
|
||||||
|
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
|
||||||
|
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" :check-strictly="!form.menuCheckStrictly" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitDataScope">保存</el-button>
|
<el-button type="primary" @click="submitDataScope" v-hasPermi="['system:role:authorize']">保存</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
|
|
||||||
|
|
||||||
<!-- 添加或修改角色配置对话框 -->
|
<!-- 添加或修改角色配置对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
@ -81,12 +84,6 @@
|
|||||||
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
<el-radio v-for="dict in statusOptions" :key="dict.dictValue" :label="dict.dictValue">{{ dict.dictLabel }}</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="菜单权限" v-show="showMenuTree">
|
|
||||||
<el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
|
|
||||||
<el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
|
|
||||||
<el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')">父子联动</el-checkbox>
|
|
||||||
<el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="备注">
|
<el-form-item label="备注">
|
||||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -398,11 +395,10 @@ export default {
|
|||||||
/** 分配角色权限按钮操作 */
|
/** 分配角色权限按钮操作 */
|
||||||
//新增 和上面代码基本相同
|
//新增 和上面代码基本相同
|
||||||
handleDataScope(row) {
|
handleDataScope(row) {
|
||||||
if(row.roleId == 1){
|
if (row.roleId == 1) {
|
||||||
this.showRoleScope = false;
|
this.showRoleScope = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('分配菜单')
|
|
||||||
this.reset();
|
this.reset();
|
||||||
this.showRoleScope = true;
|
this.showRoleScope = true;
|
||||||
const roleId = row.roleId || this.ids;
|
const roleId = row.roleId || this.ids;
|
||||||
@ -420,6 +416,7 @@ export default {
|
|||||||
roleId: row.roleId,
|
roleId: row.roleId,
|
||||||
roleName: row.roleName,
|
roleName: row.roleName,
|
||||||
roleKey: row.roleKey,
|
roleKey: row.roleKey,
|
||||||
|
menuCheckStrictly: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|||||||
@ -9,8 +9,8 @@
|
|||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form style="display:flex" :inline="true" @submit.native.prevent>
|
<el-form style="display:flex" :inline="true" @submit.native.prevent>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" size="mini" @click="handleGetUserTable" v-hasPermi="['system:roleusers:add']">添加用户</el-button>
|
<el-button type="primary" plain size="mini" icon="el-icon-plus" @click="handleGetUserTable" v-hasPermi="['system:roleusers:add']">添加用户</el-button>
|
||||||
<el-button type="danger" size="mini" @click="handleDelete" v-hasPermi="['system:roleusers:del']">删除用户</el-button>
|
<el-button type="danger" plain size="mini" icon="el-icon-circle-close" @click="cancelAuthUserAll" v-hasPermi="['system:roleusers:del']">批量取消授权</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item style="margin-left:auto">
|
<el-form-item style="margin-left:auto">
|
||||||
<el-input v-model="search" placeholder="请输入用户名称" clearable prefix-icon="el-icon-search" />
|
<el-input v-model="search" placeholder="请输入用户名称" clearable prefix-icon="el-icon-search" />
|
||||||
@ -39,14 +39,14 @@
|
|||||||
|
|
||||||
<!-- 添加或修改菜单对话框 -->
|
<!-- 添加或修改菜单对话框 -->
|
||||||
<el-dialog title="添加用户" :visible.sync="open" append-to-body :close-on-click-modal="false" @close="cancel">
|
<el-dialog title="添加用户" :visible.sync="open" append-to-body :close-on-click-modal="false" @close="cancel">
|
||||||
<el-form style="display:flex" :inline="true" @submit.native.prevent>
|
<!-- <el-form style="display:flex" :inline="true" @submit.native.prevent>
|
||||||
<el-form-item style="margin-left:auto">
|
<el-form-item style="margin-left:auto">
|
||||||
<el-input v-model="search" placeholder="请输入用户名称" clearable prefix-icon="el-icon-search" />
|
<el-input v-model="search" placeholder="请输入用户名称" clearable prefix-icon="el-icon-search" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form> -->
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col>
|
<el-col>
|
||||||
<el-table ref="userTable" v-loading="loadingUser" :data="dataUserTable.filter(data => !search || data.userId.toLowerCase().includes(search.toLowerCase()) || data.userName.toLowerCase().includes(search.toLowerCase()))" row-key="userId" stripe border :height="tableHeight*0.5">
|
<el-table ref="userTable" v-loading="loadingUser" :data="dataUserTable" row-key="userId" stripe border :height="tableHeight*0.5">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column prop="userId" align="center" label="用户编号" width="150" />
|
<el-table-column prop="userId" align="center" label="用户编号" width="150" />
|
||||||
<el-table-column prop="userName" align="center" label="用户名称" width="150" />
|
<el-table-column prop="userName" align="center" label="用户名称" width="150" />
|
||||||
@ -106,7 +106,6 @@ export default {
|
|||||||
// 获取角色列表
|
// 获取角色列表
|
||||||
this.loadingRole = true;
|
this.loadingRole = true;
|
||||||
listRole({ pageSize: 50 }).then((response) => {
|
listRole({ pageSize: 50 }).then((response) => {
|
||||||
console.log(response);
|
|
||||||
this.dataRoleTable = response.data.result;
|
this.dataRoleTable = response.data.result;
|
||||||
this.handleRoleTableSelection(this.dataRoleTable[0]);
|
this.handleRoleTableSelection(this.dataRoleTable[0]);
|
||||||
this.$refs.roleTable.setCurrentRow(this.dataRoleTable[0]);
|
this.$refs.roleTable.setCurrentRow(this.dataRoleTable[0]);
|
||||||
@ -122,13 +121,14 @@ export default {
|
|||||||
this.loadingRoleUser = false;
|
this.loadingRoleUser = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 删除角色用户
|
// 批量删除角色用户
|
||||||
handleDelete() {
|
cancelAuthUserAll() {
|
||||||
this.delSelections = [];
|
this.delSelections = [];
|
||||||
this.$refs.roleUserTable.selection.forEach((element) => {
|
this.$refs.roleUserTable.selection.forEach((element) => {
|
||||||
this.delSelections.push(element.userId);
|
this.delSelections.push(element.userId);
|
||||||
});
|
});
|
||||||
if (this.delSelections.length === 0) {
|
if (this.delSelections.length === 0) {
|
||||||
|
console.log('未选中')
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.$confirm(
|
this.$confirm(
|
||||||
@ -156,6 +156,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
|
// 取消授权
|
||||||
handleCancelPerm(row) {
|
handleCancelPerm(row) {
|
||||||
this.delSelections = [];
|
this.delSelections = [];
|
||||||
this.delSelections.push(row.userId);
|
this.delSelections.push(row.userId);
|
||||||
@ -183,7 +184,6 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.loadingUser = true;
|
this.loadingUser = true;
|
||||||
getExcludeUsers(this.roleId).then((response) => {
|
getExcludeUsers(this.roleId).then((response) => {
|
||||||
console.log(response);
|
|
||||||
this.dataUserTable = response.data;
|
this.dataUserTable = response.data;
|
||||||
this.loadingUser = false;
|
this.loadingUser = false;
|
||||||
});
|
});
|
||||||
|
|||||||
@ -97,8 +97,8 @@ import {
|
|||||||
import { downloadFile } from "@/utils/zipdownload.js";
|
import { downloadFile } from "@/utils/zipdownload.js";
|
||||||
import importTable from "./importTable";
|
import importTable from "./importTable";
|
||||||
import { Loading } from "element-ui";
|
import { Loading } from "element-ui";
|
||||||
import hljs from 'highlight.js'
|
import hljs from "highlight.js";
|
||||||
import 'highlight.js/styles/idea.css' //这里有多个样式,自己可以根据需要切换
|
import "highlight.js/styles/idea.css"; //这里有多个样式,自己可以根据需要切换
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CodeGenerator",
|
name: "CodeGenerator",
|
||||||
@ -159,8 +159,10 @@ export default {
|
|||||||
* 编辑表格
|
* 编辑表格
|
||||||
*/
|
*/
|
||||||
handleEditTable(row) {
|
handleEditTable(row) {
|
||||||
console.log(row);
|
this.$router.push({
|
||||||
this.$router.push("/tool/gen/editTable?tableId=" + row.tableId);
|
path: "/gen/editTable",
|
||||||
|
query: { tableId: row.tableId },
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 代码预览
|
// 代码预览
|
||||||
handlePreview(row) {
|
handlePreview(row) {
|
||||||
|
|||||||
@ -98,7 +98,8 @@ module.exports = {
|
|||||||
inline: /runtime\..*\.js$/
|
inline: /runtime\..*\.js$/
|
||||||
}])
|
}])
|
||||||
.end()
|
.end()
|
||||||
config.optimization.splitChunks({
|
config
|
||||||
|
.optimization.splitChunks({
|
||||||
chunks: 'all',
|
chunks: 'all',
|
||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
libs: {
|
libs: {
|
||||||
@ -123,8 +124,8 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
config.optimization.runtimeChunk('single'),
|
config.optimization.runtimeChunk('single'),
|
||||||
{
|
{
|
||||||
from: path.resolve(__dirname, './public/robots.txt'),//防爬虫文件
|
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
|
||||||
to: './',//到根目录下
|
to: './' //到根目录下
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@ -84,17 +84,17 @@ CREATE TABLE `sys_dept` (
|
|||||||
-- Records of sys_dept
|
-- Records of sys_dept
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_dept` VALUES (100, 0, '0,100,100,100,100', '某上市公司', 0, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:52', 'admin', '2021-07-07 14:59:51', NULL);
|
INSERT INTO `sys_dept` VALUES (100, 0, '0,100,100,100,100', '某上市公司', 0, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:52', 'admin', '2021-07-07 14:59:51', NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (101, 100, '0,100', '深圳总公司', 1, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (101, 100, '0,100', '深圳总公司', 1, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (102, 100, '0,100', '长沙分公司', 2, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (102, 100, '0,100', '长沙分公司', 2, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (103, 101, '0,100,101', '研发部门', 1, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (103, 101, '0,100,101', '研发部门', 1, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (104, 101, '0,100,101', '市场部门', 2, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (104, 101, '0,100,101', '市场部门', 2, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (105, 101, '0,100,101', '测试部门', 3, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (105, 101, '0,100,101', '测试部门', 3, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (106, 101, '0,100,101', '财务部门', 4, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (106, 101, '0,100,101', '财务部门', 4, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (108, 200, '0,100,102,108,108,108', '市场部门', 1, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', 'admin', '2021-07-07 14:58:40', NULL);
|
INSERT INTO `sys_dept` VALUES (108, 200, '0,100,102,108,108,108', '市场部门', 1, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', 'admin', '2021-07-07 14:58:40', NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (109, 102, '0,100,102', '财务部门', 2, 'tom', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (109, 102, '0,100,102', '财务部门', 2, 'zr', '', '', '0', '0', 'admin', '2021-04-20 20:45:53', '', NULL, NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (200, 100, '0,100,101', '湖北总公司', 3, 'zrr', NULL, NULL, '0', '0', 'admin', '2021-04-21 13:39:13', 'admin', '2021-07-07 15:00:03', NULL);
|
INSERT INTO `sys_dept` VALUES (200, 100, '0,100,101', '湖北总公司', 3, 'zr', NULL, NULL, '0', '0', 'admin', '2021-04-21 13:39:13', 'admin', '2021-07-07 15:00:03', NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (201, 102, '0,100,102,108', '研发部门', 1, 'zzzz', NULL, NULL, '0', '0', 'admin', '2021-04-21 13:46:43', 'admin', '2021-04-21 15:55:17', NULL);
|
INSERT INTO `sys_dept` VALUES (201, 102, '0,100,102,108', '研发部门', 1, 'zr', NULL, NULL, '0', '0', 'admin', '2021-04-21 13:46:43', 'admin', '2021-04-21 15:55:17', NULL);
|
||||||
INSERT INTO `sys_dept` VALUES (203, 200, '0,100,101,200', '研发部门', 1, NULL, NULL, NULL, '0', '0', 'admin', '2021-07-07 15:00:23', '', NULL, NULL);
|
INSERT INTO `sys_dept` VALUES (203, 200, '0,100,101,200', '研发部门', 1, 'zr', NULL, NULL, '0', '0', 'admin', '2021-07-07 15:00:23', '', NULL, NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_dict_data
|
-- Table structure for sys_dict_data
|
||||||
@ -231,7 +231,7 @@ CREATE TABLE `sys_menu` (
|
|||||||
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
`update_time` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
|
||||||
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
|
`remark` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注',
|
||||||
PRIMARY KEY (`menuId`) USING BTREE
|
PRIMARY KEY (`menuId`) USING BTREE
|
||||||
) ENGINE = InnoDB AUTO_INCREMENT = 2055 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB AUTO_INCREMENT = 2000 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单权限表' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_menu
|
-- Records of sys_menu
|
||||||
@ -240,96 +240,99 @@ CREATE TABLE `sys_menu` (
|
|||||||
INSERT INTO sys_menu VALUES (1, '系统管理', 0, 1, 'system', NULL, 0, 0, 'M', '0', '0', '', 'system', '', SYSDATE(), '', NULL, '系统管理目录');
|
INSERT INTO sys_menu VALUES (1, '系统管理', 0, 1, 'system', NULL, 0, 0, 'M', '0', '0', '', 'system', '', SYSDATE(), '', NULL, '系统管理目录');
|
||||||
INSERT INTO sys_menu VALUES (2, '系统监控', 0, 2, 'monitor', NULL, 0, 0, 'M', '0', '0', '', 'monitor', '', SYSDATE(), '', NULL, '系统监控目录');
|
INSERT INTO sys_menu VALUES (2, '系统监控', 0, 2, 'monitor', NULL, 0, 0, 'M', '0', '0', '', 'monitor', '', SYSDATE(), '', NULL, '系统监控目录');
|
||||||
INSERT INTO sys_menu VALUES (3, '系统工具', 0, 3, 'tool', NULL, 0, 0, 'M', '0', '0', '', 'tool', '', SYSDATE(), '', NULL, '系统工具目录');
|
INSERT INTO sys_menu VALUES (3, '系统工具', 0, 3, 'tool', NULL, 0, 0, 'M', '0', '0', '', 'tool', '', SYSDATE(), '', NULL, '系统工具目录');
|
||||||
INSERT INTO sys_menu VALUES (5, '文章管理', 0, 4, 'article', NULL, 0, 0, 'M', '0', '0', NULL, 'documentation', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (4, '文章管理', 0, 4, 'article', NULL, 0, 0, 'M', '0', '0', NULL, 'documentation', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (4, '外部打开', 0, 5, 'http://www.izhaorui.cn', NULL, 1, 0, 'M', '0', '0', '', 'link', '', SYSDATE(), '', NULL, 'Zr官网地址');
|
INSERT INTO sys_menu VALUES (5, '外部打开', 0, 5, 'http://www.izhaorui.cn', NULL, 1, 0, 'M', '0', '0', '', 'link', '', SYSDATE(), '', NULL, 'Zr官网地址');
|
||||||
|
INSERT INTO sys_menu VALUES (6, '控制台', 0, 0, 'dashboard', 'index_v1', 0, 0, 'C', '0', '0', '', 'dashboard', '', SYSDATE(), '', NULL, '');
|
||||||
|
|
||||||
-- 一级菜单 系统管理
|
-- 二级菜单
|
||||||
INSERT INTO sys_menu VALUES (100, '用户管理', 1, 2, 'user', 'system/user/index', 0, 0, 'C', '0', '0', 'system:user:list', 'user', '', SYSDATE(), '', NULL, '用户管理菜单');
|
INSERT INTO sys_menu VALUES (100, '用户管理', 1, 1, 'user', 'system/user/index', 0, 0, 'C', '0', '0', 'system:user:list', 'user', '', SYSDATE(), '', NULL, '用户管理菜单');
|
||||||
INSERT INTO sys_menu VALUES (101, '权限管理', 1, 2, 'role', 'system/role/index', 0, 0, 'C', '0', '0', 'system:role:list', 'peoples', '', SYSDATE(), '', NULL, '角色管理菜单');
|
INSERT INTO sys_menu VALUES (101, '角色管理', 1, 2, 'role', 'system/role/index', 0, 0, 'C', '0', '0', 'system:role:list', 'peoples', '', SYSDATE(), '', NULL, '角色管理菜单');
|
||||||
INSERT INTO sys_menu VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', 0, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', '', SYSDATE(), '', NULL, '菜单管理菜单');
|
INSERT INTO sys_menu VALUES (102, '菜单管理', 1, 3, 'menu', 'system/menu/index', 0, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', '', SYSDATE(), '', NULL, '菜单管理菜单');
|
||||||
INSERT INTO sys_menu VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', 0, 0, 'C', '0', '0', 'system:dept:list', 'tree', '', SYSDATE(), '', NULL, '部门管理菜单');
|
INSERT INTO sys_menu VALUES (103, '部门管理', 1, 4, 'dept', 'system/dept/index', 0, 0, 'C', '0', '0', 'system:dept:list', 'tree', '', SYSDATE(), '', NULL, '部门管理菜单');
|
||||||
INSERT INTO sys_menu VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', 0, 0, 'C', '0', '0', 'system:post:list', 'post', '', SYSDATE(), '', NULL, '岗位管理菜单');
|
INSERT INTO sys_menu VALUES (104, '岗位管理', 1, 5, 'post', 'system/post/index', 0, 0, 'C', '0', '0', 'system:post:list', 'post', '', SYSDATE(), '', NULL, '岗位管理菜单');
|
||||||
INSERT INTO sys_menu VALUES (108, '日志管理', 1, 9, 'log', '', 0, 0, 'M', '0', '0', '', 'log', '', SYSDATE(), '', NULL, '日志管理菜单');
|
INSERT INTO sys_menu VALUES (105, '字典管理', 1, 6, 'dict', 'system/dict/index', 0, 0, 'C', '0', '0', 'system:dict:list', 'dict', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (105, '字典管理', 1, 5, 'dict', 'system/dict/index', 0, 0, 'C', '0', '0', 'system:dict:list', 'dict', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (106, '角色分配', 1, 2, 'roleusers', 'system/roleusers/index', 0, 0, 'C', '0', '0', 'system:role:list', 'people', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (106, '权限分配', 1, 3, 'roleusers', 'system/roleusers/index', 0, 0, 'C', '0', '0', 'system:role:list', 'people', '', SYSDATE(), '', NULL, NULL);
|
INSERT into sys_menu VALUES (107, '参数设置', 1, 8, 'config','system/config/index', 0, 0, 'C', '0', '0', 'system:config:list','edit', '', SYSDATE(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (108, '日志管理', 1, 9, 'log', '' , 0, 0, 'M', '0', '0', '', 'log', '', SYSDATE(), '', NULL, '日志管理菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (110, '定时任务', 2, 10, 'job', 'monitor/job/index', 0, 0, 'C', '0', '0', '', 'job', '', SYSDATE(), '', NULL, '定时任务菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (112, '服务监控', 2, 11, 'server', 'monitor/server/index', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', '', SYSDATE(), '', NULL, '服务监控菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (113, '缓存监控', 2, 12, 'cache', 'monitor/cache/index', 0, 0, 'C', '1', '1', 'monitor:cache:list', 'redis', '', SYSDATE(), '', NULL, '缓存监控菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (114, '表单构建', 3, 13, 'build', 'tool/build/index', 0, 0, 'C', '0', '0', 'tool:build:list', 'build', '', SYSDATE(), '', NULL, '表单构建菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (115, '代码生成', 3, 14, 'gen', 'tool/gen/index', 0, 0, 'C', '0', '0', 'tool:gen:list', 'code', '', SYSDATE(), '', NULL, '代码生成菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (116, '系统接口', 3, 15, 'swagger', 'tool/swagger/index', 0, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', '', SYSDATE(), '', NULL, '系统接口菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (117, '发送邮件', 3, 16, '/sendEmail', 'tool/email/sendEmail', 0, 0, 'C', '0', '0', 'tool:email:send', 'message', '', SYSDATE(), '', NULL, '发送邮件菜单');
|
||||||
|
INSERT INTO sys_menu VALUES (118, '文章列表', 4, 1, 'index', 'system/article/manager', 0, 0, 'C', '0', '0', 'system:article:list', 'list', '', SYSDATE(), '', NULL, NULL);
|
||||||
|
|
||||||
-- 一级菜单 缓存监控
|
-- 三级菜单日志管理
|
||||||
INSERT INTO sys_menu VALUES (113, '缓存监控', 2, 5, 'cache', 'monitor/cache/index', 0, 0, 'C', '1', '1', 'monitor:cache:list', 'redis', '', SYSDATE(), '', NULL, '缓存监控菜单');
|
|
||||||
|
|
||||||
-- 一级菜单 系统工具
|
|
||||||
INSERT INTO sys_menu VALUES (114, '表单构建', 3, 1, 'build', 'tool/build/index', 0, 0, 'C', '0', '0', 'tool:build:list', 'build', '', SYSDATE(), '', NULL, '表单构建菜单');
|
|
||||||
INSERT INTO sys_menu VALUES (115, '代码生成', 3, 1, 'gen', 'tool/gen/index', 0, 0, 'C', '0', '0', 'tool:gen:list', 'code', '', SYSDATE(), '', NULL, '代码生成菜单');
|
|
||||||
INSERT INTO sys_menu VALUES (116, '系统接口', 3, 3, 'swagger', 'tool/swagger/index', 0, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', '', SYSDATE(), '', NULL, '系统接口菜单');
|
|
||||||
INSERT INTO sys_menu VALUES (117, '发送邮件', 3, 4, '/sendEmail', 'tool/email/sendEmail', 0, 0, 'C', '0', '0', 'tool:email:send', 'message', '', SYSDATE(), '', NULL, '发送邮件菜单');
|
|
||||||
INSERT INTO sys_menu VALUES (118, '编辑表格', 3, 5, '/tool/gen/editTable', 'tool/gen/editTable', 0, 0, 'C', '1', '0', 'tool:gen:edit', '', '', SYSDATE(), '', NULL, '');
|
|
||||||
|
|
||||||
-- 日志管理
|
|
||||||
INSERT INTO sys_menu VALUES (500, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', 0, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', '', SYSDATE(), '', NULL, '操作日志菜单');
|
INSERT INTO sys_menu VALUES (500, '操作日志', 108, 1, 'operlog', 'monitor/operlog/index', 0, 0, 'C', '0', '0', 'monitor:operlog:list', 'form', '', SYSDATE(), '', NULL, '操作日志菜单');
|
||||||
INSERT INTO sys_menu VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', 0, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', '', SYSDATE(), '', NULL, '登录日志菜单');
|
INSERT INTO sys_menu VALUES (501, '登录日志', 108, 2, 'logininfor', 'monitor/logininfor/index', 0, 0, 'C', '0', '0', 'monitor:logininfor:list', 'logininfor', '', SYSDATE(), '', NULL, '登录日志菜单');
|
||||||
|
|
||||||
INSERT INTO sys_menu VALUES (110, '定时任务', 2, 1, 'job', 'monitor/job/index', 0, 0, 'C', '0', '0', '', 'job', '', SYSDATE(), '', NULL, '定时任务菜单');
|
|
||||||
INSERT INTO sys_menu VALUES (112, '服务监控', 2, 4, 'server', 'monitor/server/index', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', '', SYSDATE(), '', NULL, '服务监控菜单');
|
|
||||||
|
|
||||||
|
|
||||||
|
-- 用户管理 按钮
|
||||||
|
INSERT INTO sys_menu VALUES (1001, '用户查询', 100, 1, '', '', 0, 0, 'F', '0', '0', 'system:user:query', '', '', SYSDATE(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1002, '用户添加', 100, 2, '', '', 0, 0, 'F', '0', '0', 'system:user:add', '', '', SYSDATE(), '', NULL, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1003, '用户修改', 100, 3, '', '', 0, 0, 'F', '0', '0', 'system:user:edit', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
|
INSERT INTO sys_menu VALUES (1004, '用户删除', 100, 4, '', '', 0, 0, 'F', '0', '0', 'system:user:delete', '', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1005, '用户导出', 100, 5, '', '', 0, 0, 'F', '0', '0', 'system:user:export', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1005, '用户导出', 100, 5, '', '', 0, 0, 'F', '0', '0', 'system:user:export', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1006, '用户导入', 100, 6, '', '', 0, 0, 'F', '0', '0', 'system:user:import', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1006, '用户导入', 100, 6, '', '', 0, 0, 'F', '0', '0', 'system:user:import', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1007, '重置密码', 100, 7, '', '', 0, 0, 'F', '0', '0', 'system:user:resetPwd', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1007, '重置密码', 100, 7, '', '', 0, 0, 'F', '0', '0', 'system:user:resetPwd', '#', '', SYSDATE(), '', NULL, '');
|
||||||
|
-- 权限管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (1008, '角色查询', 101, 1, '', '', 0, 0, 'F', '0', '0', 'system:role:query', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1008, '角色查询', 101, 1, '', '', 0, 0, 'F', '0', '0', 'system:role:query', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1009, '角色新增', 101, 2, '', '', 0, 0, 'F', '0', '0', 'system:role:add', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1009, '角色新增', 101, 2, '', '', 0, 0, 'F', '0', '0', 'system:role:add', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1010, '角色修改', 101, 3, '', '', 0, 0, 'F', '0', '0', 'system:role:edit', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1010, '角色修改', 101, 3, '', '', 0, 0, 'F', '0', '0', 'system:role:edit', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1011, '角色删除', 101, 4, '', '', 0, 0, 'F', '0', '0', 'system:role:remove', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1011, '角色删除', 101, 4, '', '', 0, 0, 'F', '0', '0', 'system:role:remove', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1012, '角色导出', 101, 5, '', '', 0, 0, 'F', '0', '0', 'system:role:export', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1012, '角色导出', 101, 5, '', '', 0, 0, 'F', '0', '0', 'system:role:export', '#', '', SYSDATE(), '', NULL, '');
|
||||||
|
-- 菜单管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (1013, '菜单查询', 102, 1, '', '', 0, 0, 'F', '0', '0', 'system:menu:query', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1013, '菜单查询', 102, 1, '', '', 0, 0, 'F', '0', '0', 'system:menu:query', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1014, '菜单新增', 102, 2, '', '', 0, 0, 'F', '0', '0', 'system:menu:add', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1014, '菜单新增', 102, 2, '', '', 0, 0, 'F', '0', '0', 'system:menu:add', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1015, '菜单修改', 102, 3, '', '', 0, 0, 'F', '0', '0', 'system:menu:edit', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1015, '菜单修改', 102, 3, '', '', 0, 0, 'F', '0', '0', 'system:menu:edit', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (1016, '菜单删除', 102, 4, '', '', 0, 0, 'F', '0', '0', 'system:menu:remove', '#', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1016, '菜单删除', 102, 4, '', '', 0, 0, 'F', '0', '0', 'system:menu:remove', '#', '', SYSDATE(), '', NULL, '');
|
||||||
INSERT INTO sys_menu VALUES (2013, '控制台', 0, 0, 'dashboard', 'index_v1', 0, 0, 'C', '0', '0', '', 'dashboard', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1017, '修改排序', 102, 5, '', '', 0, 0, 'F', '0', '0', 'system:menu:changeSort', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2018, '用户添加', 100, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:user:add', '', '', SYSDATE(), '', NULL, '');
|
-- 部门管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (2019, '用户查询', 100, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:user:query', '', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1018, '部门查询', 103, 1, '', '', 0, 0, 'F', '0', '0', 'system:dept:query', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2020, '用户删除', 100, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:user:delete', '', '', SYSDATE(), '', NULL, '');
|
INSERT INTO sys_menu VALUES (1019, '部门新增', 103, 2, '', '', 0, 0, 'F', '0', '0', 'system:dept:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2030, '修改排序', 102, 999, '#', NULL, 0, 0, 'F', '0', '0', 'system:menu:changeSort', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1020, '部门修改', 103, 3, '', '', 0, 0, 'F', '0', '0', 'system:dept:update', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
-- 分配用户菜单 权限
|
INSERT INTO sys_menu VALUES (1021, '部门删除', 103, 4, '', '', 0, 0, 'F', '0', '0', 'system:dept:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2031, '新增用户', 106, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:roleusers:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
-- 岗位管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (2032, '删除用户', 106, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:roleusers:del', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1022, '岗位查询', 104, 1, '', '', 0, 0, 'F', '0', '0', 'system:post:list', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2053, '查询', 106, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:roleusers:query', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1023, '岗位添加', 104, 2, '', '', 0, 0, 'F', '0', '0', 'system:post:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
|
INSERT INTO sys_menu VALUES (1024, '岗位删除', 104, 3, '', '', 0, 0, 'F', '0', '0', 'system:post:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2033, '新增', 110, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:add', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1025, '岗位编辑', 104, 4, '', '', 0, 0, 'F', '0', '0', 'system:post:edit', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2034, '删除', 110, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:delete', '', '', SYSDATE(), '', NULL, NULL);
|
-- 字典管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (2035, '修改', 110, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:edit', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1026, '字典新增', 105, 1, '', '', 0, 0, 'F', '0', '0', 'system:dict:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2036, '启动', 110, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:start', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1027, '字典修改', 105, 2, '', '', 0, 0, 'F', '0', '0', 'system:dict:edit', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2037, '查询', 110, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:list', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1028, '字典删除', 105, 3, '', '', 0, 0, 'F', '0', '0', 'system:dict:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2038, '运行', 110, 5, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:run', NULL, '', SYSDATE(), '', NULL, NULL);
|
-- 分配用户 按钮
|
||||||
INSERT INTO sys_menu VALUES (2039, '停止', 110, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:task:stop', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1029, '新增用户', 106, 1, '', '', 0, 0, 'F', '0', '0', 'system:roleusers:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2040, '查询', 103, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:dept:query', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1030, '删除用户', 106, 2, '', '', 0, 0, 'F', '0', '0', 'system:roleusers:del', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2041, '新增', 103, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:dept:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1031, '查询用户', 106, 3, '', '', 0, 0, 'F', '0', '0', 'system:roleusers:query', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2042, '修改', 103, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:dept:update', NULL, '', SYSDATE(), '', NULL, NULL);
|
-- 定时任务 按钮
|
||||||
INSERT INTO sys_menu VALUES (2043, '删除', 103, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:dept:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu values (1032, '任务查询', 110, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:list', '#', 'admin', sysdate(), '', null, '');
|
||||||
INSERT INTO sys_menu VALUES (2044, '查询', 104, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:post:list', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1033, '任务新增', 110, 2, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:add', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2045, '添加', 104, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:post:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1034, '任务删除', 110, 3, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:delete', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2046, '岗位删除', 104, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:post:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1035, '任务修改', 110, 4, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:edit', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2047, '岗位编辑', 104, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:post:edit', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1036, '任务启动', 110, 5, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:start', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2048, '删除日志', 500, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:operlog:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1037, '任务运行', 110, 7, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:run', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2049, '删除日志', 501, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:logininfor:remove', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1038, '任务停止', 110, 8, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:job:stop', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
-- 字典管理页面-权限
|
INSERT INTO sys_menu VALUES (1039, '任务日志', 2, 0, '/job/log', 'monitor/job/log', 0, 0, 'C', '1', '0', 'monitor:job:query', 'log', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2050, '新增', 105, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:dict:add', NULL, '', SYSDATE(), '', NULL, NULL);
|
-- 操作日志 按钮
|
||||||
INSERT INTO sys_menu VALUES (2051, '修改', 105, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:dict:edit', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu values (1041, '操作查询', 500, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:operlog:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
INSERT INTO sys_menu VALUES (2052, '删除', 105, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:dict:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1042, '操作删除', 500, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:operlog:remove', NULL, '', SYSDATE(), '', NULL, NULL);
|
||||||
|
-- 登录日志 按钮
|
||||||
INSERT INTO sys_menu VALUES (2054, '用户修改', 100, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:user:edit', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu values (1044, '登录查询', 501, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:logininfor:query', '#', 'admin', sysdate(), '', null, '');
|
||||||
|
INSERT INTO sys_menu VALUES (1045, '登录删除', 501, 1, '#', NULL, 0, 0, 'F', '0', '0', 'monitor:logininfor:remove', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2056, '创建文章', 5, 999, 'publish', 'system/article/publish', 0, 0, 'C', '1', '0', 'system:article:publish', 'log', '', SYSDATE(), '', NULL, NULL);
|
-- 文章管理 按钮
|
||||||
INSERT INTO sys_menu VALUES (2057, '文章列表', 5, 999, 'manager', 'system/article/manager', 0, 0, 'C', '0', '0', 'system:article:list', 'documentation', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1047, '发布文章', 4, 1, 'publish', 'system/article/publish', 0, 0, 'C', '1', '0', 'system:article:publish', 'log', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2060, '任务日志', 2, 2, '/job/log', 'monitor/job/log', 0, 0, 'C', '0', '0', NULL, 'log', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1048, '文章新增', 118, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:add', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2062, '新增', 2057, 1, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:add', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1049, '文章修改', 118, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:update', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2063, '修改', 2057, 2, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:update', '', '', SYSDATE(), '', NULL, NULL);
|
INSERT INTO sys_menu VALUES (1050, '文章删除', 118, 4, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:delete', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu VALUES (2064, '删除', 2057, 3, '#', NULL, 0, 0, 'F', '0', '0', 'system:article:delete', '', '', SYSDATE(), '', NULL, NULL);
|
-- 代码生成 按钮
|
||||||
|
INSERT INTO sys_menu VALUES (1060, '生成修改', 3, 1, '/gen/editTable', 'tool/gen/editTable', 0, 0, 'C', '1', '0', 'tool:gen:edit', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
--代码生成页面权限
|
insert into sys_menu VALUES (1061, '生成查询', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:query', '', '', sysdate(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu(menuId, menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES (2071, '预览', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:preview', '', '', SYSDATE());
|
INSERT INTO sys_menu VALUES (1062, '生成删除', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:remove', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu(menuId, menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES (2072, '删除', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:remove', '', '', SYSDATE());
|
INSERT INTO sys_menu VALUES (1063, '导入代码', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:import', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu(menuId, menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES (2073, '导入', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:import', '', '', SYSDATE());
|
INSERT INTO sys_menu VALUES (1064, '生成代码', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:code', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
INSERT INTO sys_menu(menuId, menuName, parentId, orderNum, path, component, isFrame, isCache, menuType, visible, status, perms, icon, create_by,create_time) VALUES (2074, '生成代码', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:code', '', '', SYSDATE());
|
INSERT INTO sys_menu VALUES (1065, '预览代码', 115, 1, '#', NULL, 0, 0, 'F', '0', '0', 'tool:gen:preview', '', '', SYSDATE(), '', NULL, NULL);
|
||||||
|
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_oper_log
|
-- Table structure for sys_oper_log
|
||||||
@ -452,37 +455,36 @@ CREATE TABLE `sys_role_menu` (
|
|||||||
-- Records of sys_role_menu
|
-- Records of sys_role_menu
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 1, NULL, '2021-07-07 16:32:32');
|
INSERT INTO `sys_role_menu` VALUES (2, 1, NULL, SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2, NULL, '2021-07-07 16:32:32');
|
INSERT INTO `sys_role_menu` VALUES (2, 2, NULL, SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 3, NULL, '2021-07-07 16:32:32');
|
INSERT INTO `sys_role_menu` VALUES (2, 3, NULL, SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 4, NULL, '2021-07-07 16:32:32');
|
INSERT INTO `sys_role_menu` VALUES (2, 5, NULL, SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 100, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 101, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 102, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 103, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 104, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 106, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 108, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 110, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 112, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 113, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 114, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 500, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 501, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 1008, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 1013, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2013, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2019, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2037, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2040, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2044, NULL, '2021-07-07 16:32:32');
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (2, 2053, NULL, '2021-07-07 16:32:32');
|
|
||||||
|
|
||||||
INSERT INTO `sys_role_menu` VALUES (3, 2056, 'admin', '2021-08-23 14:32:06');
|
INSERT INTO `sys_role_menu` VALUES (2, 100, 'admin', SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (3, 2057, 'admin', '2021-08-23 14:32:06');
|
INSERT INTO `sys_role_menu` VALUES (2, 101, 'admin', SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (3, 2062, 'admin', '2021-08-23 14:32:06');
|
INSERT INTO `sys_role_menu` VALUES (2, 102, 'admin', SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (3, 2063, 'admin', '2021-08-23 14:32:06');
|
INSERT INTO `sys_role_menu` VALUES (2, 103, 'admin', SYSDATE());
|
||||||
INSERT INTO `sys_role_menu` VALUES (3, 2064, 'admin', '2021-08-23 14:32:06');
|
INSERT INTO `sys_role_menu` VALUES (2, 104, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 105, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 106, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 107, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 110, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 112, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 113, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 114, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 117, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 1001, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 1008, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 1013, 'admin', SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (2, 1018, 'admin', SYSDATE());
|
||||||
|
|
||||||
|
-- 编辑者
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 4 , NULL, SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 118 , NULL, SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 1047, NULL, SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 1048, NULL, SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 1049, NULL, SYSDATE());
|
||||||
|
INSERT INTO `sys_role_menu` VALUES (3, 1050, NULL, SYSDATE());
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
@ -608,6 +610,29 @@ INSERT INTO `articleCategory` VALUES (8, 'sqlserver', '2021-08-19 00:00:00.00000
|
|||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 13、参数配置表
|
||||||
|
-- ----------------------------
|
||||||
|
drop table if exists sys_config;
|
||||||
|
create table sys_config (
|
||||||
|
configId int(5) not null auto_increment comment '参数主键',
|
||||||
|
configName varchar(100) default '' comment '参数名称',
|
||||||
|
configKey varchar(100) default '' comment '参数键名',
|
||||||
|
configValue varchar(500) default '' comment '参数键值',
|
||||||
|
configType char(1) default 'N' comment '系统内置(Y是 N否)',
|
||||||
|
create_by varchar(64) default '' comment '创建者',
|
||||||
|
create_time datetime comment '创建时间',
|
||||||
|
update_by varchar(64) default '' comment '更新者',
|
||||||
|
update_time datetime comment '更新时间',
|
||||||
|
remark varchar(500) default null comment '备注',
|
||||||
|
primary key (configId)
|
||||||
|
) engine=innodb auto_increment=100 comment = '参数配置表';
|
||||||
|
|
||||||
|
insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' );
|
||||||
|
insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' );
|
||||||
|
insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' );
|
||||||
|
insert into sys_config values(4, '账号自助-验证码开关', 'sys.account.captchaOnOff', 'true', 'Y', 'admin', sysdate(), '', null, '是否开启验证码功能(true开启,false关闭)');
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- 18、代码生成业务表
|
-- 18、代码生成业务表
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
@ -670,3 +695,21 @@ CREATE TABLE `gen_table_column` (
|
|||||||
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic;
|
) ENGINE = InnoDB AUTO_INCREMENT = 63 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '代码生成业务表字段' ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
SET FOREIGN_KEY_CHECKS = 1;
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|
||||||
|
-- ----------------------------
|
||||||
|
-- 代码生成测试
|
||||||
|
-- Table structure for gen_demo
|
||||||
|
-- ----------------------------
|
||||||
|
DROP TABLE IF EXISTS `gen_demo`;
|
||||||
|
CREATE TABLE `gen_demo` (
|
||||||
|
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增id',
|
||||||
|
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名称',
|
||||||
|
`icon` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图片',
|
||||||
|
`showStatus` int(4) NOT NULL COMMENT '显示状态',
|
||||||
|
`addTime` datetime(0) NULL DEFAULT NULL COMMENT '添加时间',
|
||||||
|
`sex` int(4) NULL DEFAULT NULL COMMENT '用户性别',
|
||||||
|
`sort` int(4) NULL DEFAULT 0 COMMENT '排序',
|
||||||
|
PRIMARY KEY (`id`) USING BTREE
|
||||||
|
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
|
||||||
|
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user