暂存字段权限更改
This commit is contained in:
parent
38eda262d6
commit
c592925096
@ -2,8 +2,10 @@
|
|||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using ZR.Admin.WebApi.Extensions;
|
using ZR.Admin.WebApi.Extensions;
|
||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
|
using ZR.Model;
|
||||||
using ZR.Model.System;
|
using ZR.Model.System;
|
||||||
using ZR.Service.System.IService;
|
using ZR.Service.System.IService;
|
||||||
|
using ZR.ServiceCore.Filters;
|
||||||
using ZR.ServiceCore.Model;
|
using ZR.ServiceCore.Model;
|
||||||
using ZR.ServiceCore.Model.Dto;
|
using ZR.ServiceCore.Model.Dto;
|
||||||
|
|
||||||
@ -34,7 +36,8 @@ namespace ZR.Admin.WebApi.Controllers
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpGet("list")]
|
[HttpGet("list")]
|
||||||
[ActionPermissionFilter(RolePermi = "admin")]
|
// [ActionPermissionFilter(RolePermi = "admin")]
|
||||||
|
[DataFieldFilter(typeof(PagedInfo<ArticleDto>))]
|
||||||
public IActionResult Query([FromQuery] ArticleQueryDto parm)
|
public IActionResult Query([FromQuery] ArticleQueryDto parm)
|
||||||
{
|
{
|
||||||
var response = _ArticleService.GetList(parm);
|
var response = _ArticleService.GetList(parm);
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
using ZR.Admin.WebApi.Filters;
|
using ZR.Admin.WebApi.Filters;
|
||||||
using ZR.ServiceCore.Model;
|
|
||||||
using ZR.ServiceCore.Model.Dto;
|
using ZR.ServiceCore.Model.Dto;
|
||||||
using ZR.ServiceCore.Services.IService;
|
using ZR.ServiceCore.Services.IService;
|
||||||
|
|
||||||
@ -19,7 +18,7 @@ public class SysFieldController : BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpGet("getModelList")]
|
[HttpGet("getModelList")]
|
||||||
public async Task<IActionResult> GetModelList()
|
public IActionResult GetModelList()
|
||||||
{
|
{
|
||||||
var serviceCoreModels = AppDomain.CurrentDomain
|
var serviceCoreModels = AppDomain.CurrentDomain
|
||||||
.GetAssemblies()
|
.GetAssemblies()
|
||||||
@ -37,98 +36,15 @@ public class SysFieldController : BaseController
|
|||||||
|
|
||||||
[HttpGet("getFields")]
|
[HttpGet("getFields")]
|
||||||
public async Task<IActionResult> GetFields([FromQuery] string fullName, long roleId)
|
public async Task<IActionResult> GetFields([FromQuery] string fullName, long roleId)
|
||||||
{
|
=> SUCCESS(await _sysFieldService.GetFields(fullName, roleId));
|
||||||
var fields = await _sysFieldService.Queryable()
|
|
||||||
.Where(it => it.FullName == fullName)
|
|
||||||
.ToListAsync();
|
|
||||||
var roleFields = await _sysRoleFieldService
|
|
||||||
.Queryable()
|
|
||||||
.Where(it => it.RoleId == roleId)
|
|
||||||
.Select(it => it.FieldId)
|
|
||||||
.ToListAsync();
|
|
||||||
var list = new List<SysFieldDto>();
|
|
||||||
list = fields.Select(it => new SysFieldDto
|
|
||||||
{
|
|
||||||
FieldName = it.FieldName,
|
|
||||||
FieldType = it.FieldType,
|
|
||||||
FullName = it.FullName,
|
|
||||||
Id = it.Id,
|
|
||||||
IsClass = it.IsClass,
|
|
||||||
IsPermission = roleFields.Contains(it.Id)
|
|
||||||
}).ToList();
|
|
||||||
// fields.ForEach(it =>
|
|
||||||
// {
|
|
||||||
// if (it.Id != 0 && roleFields.Contains(it.Id))
|
|
||||||
// {
|
|
||||||
// list.Add(new SysFieldDto
|
|
||||||
// {
|
|
||||||
// FieldName = it.FieldName,
|
|
||||||
// FieldType = it.FieldType,
|
|
||||||
// FullName = it.FullName,
|
|
||||||
// Id = it.Id,
|
|
||||||
// IsClass = it.IsClass,
|
|
||||||
// IsPermission = true
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// list.Add(new SysFieldDto
|
|
||||||
// {
|
|
||||||
// FieldName = it.FieldName,
|
|
||||||
// FieldType = it.FieldType,
|
|
||||||
// FullName = it.FullName,
|
|
||||||
// Id = it.Id,
|
|
||||||
// IsClass = it.IsClass,
|
|
||||||
// IsPermission = false
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
return SUCCESS(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost("initFields")]
|
[HttpPost("initFields")]
|
||||||
public async Task<IActionResult> InitFields()
|
public async Task<IActionResult> InitFields()
|
||||||
{
|
=> SUCCESS(await _sysFieldService.InitFields());
|
||||||
var serviceCoreModels = AppDomain.CurrentDomain
|
|
||||||
.GetAssemblies()
|
[HttpPut("addOrUpdateSysRoleField/{roleId}")]
|
||||||
.First(it => it.FullName.Contains("ZR.ServiceCore"))
|
public async Task<IActionResult> AddOrUpdateSysRoleField([FromBody] List<SysFieldDto> sysFieldDtos,
|
||||||
.ExportedTypes
|
[FromRoute] long roleId)
|
||||||
.Where(p => p.FullName.StartsWith("ZR.ServiceCore.Model"))
|
=> SUCCESS(await _sysRoleFieldService.InsertOrUpdateSysRoleField(sysFieldDtos, roleId));
|
||||||
.Select(it => new
|
|
||||||
{
|
|
||||||
FullName = it.FullName,
|
|
||||||
Properties = it.GetProperties().Select(pt => new
|
|
||||||
{
|
|
||||||
FieldName = pt.Name,
|
|
||||||
FieldType = pt.PropertyType.FullName,
|
|
||||||
IsClass = pt.PropertyType.IsClass,
|
|
||||||
IsArray = pt.PropertyType.IsArray,
|
|
||||||
// IsList = pt.PropertyType.IsClass ? pt.DeclaringType.FullName : string.Empty
|
|
||||||
}).ToList()
|
|
||||||
// Properties = it.GetProperties()
|
|
||||||
})
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
foreach (var serviceCoreModel in serviceCoreModels)
|
|
||||||
{
|
|
||||||
var sysFields = new List<SysField>();
|
|
||||||
foreach (var property in serviceCoreModel.Properties)
|
|
||||||
{
|
|
||||||
var sysField = new SysField
|
|
||||||
{
|
|
||||||
FieldName = property.FieldName,
|
|
||||||
FullName = serviceCoreModel.FullName,
|
|
||||||
FieldType = property.FieldType,
|
|
||||||
IsClass = property.IsClass ? "1" : "0"
|
|
||||||
};
|
|
||||||
sysFields.Add(sysField);
|
|
||||||
}
|
|
||||||
await _sysFieldService.Insertable(sysFields).ExecuteReturnSnowflakeIdListAsync();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return SUCCESS(serviceCoreModels);
|
|
||||||
}
|
|
||||||
|
|
||||||
public async Task<IActionResult> AddOrUpdateSysRoleField([FromBody] List<SysFieldDto> sysFieldDtos){}
|
|
||||||
}
|
}
|
||||||
@ -215,7 +215,8 @@ var article = new Article
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var json = JsonConvert.SerializeObject(article, new JsonSerializerSettings
|
var apiResult = new ApiResult(200, "SUCCESS", article);
|
||||||
|
var json = JsonConvert.SerializeObject(apiResult, new JsonSerializerSettings
|
||||||
{
|
{
|
||||||
ContractResolver = new JsonPropertyContractResolver(props)
|
ContractResolver = new JsonPropertyContractResolver(props)
|
||||||
});
|
});
|
||||||
|
|||||||
@ -3,8 +3,12 @@ using Infrastructure;
|
|||||||
using Infrastructure.Model;
|
using Infrastructure.Model;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc.Filters;
|
using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using Newtonsoft.Json.Serialization;
|
using Newtonsoft.Json.Serialization;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
using SqlSugar.IOC;
|
||||||
|
using ZR.Infrastructure.Resolver;
|
||||||
|
using ZR.ServiceCore.Model;
|
||||||
|
|
||||||
namespace ZR.ServiceCore.Filters;
|
namespace ZR.ServiceCore.Filters;
|
||||||
public class DataFieldFilter : ActionFilterAttribute
|
public class DataFieldFilter : ActionFilterAttribute
|
||||||
@ -15,42 +19,50 @@ public class DataFieldFilter : ActionFilterAttribute
|
|||||||
{
|
{
|
||||||
ResultType = resultType;
|
ResultType = resultType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DataFieldFilter()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public Type ResultType { get; set; }
|
public Type ResultType { get; set; }
|
||||||
|
|
||||||
public string RulePath { get; set; }
|
public string RulePath { get; set; }
|
||||||
|
|
||||||
public override void OnResultExecuting(ResultExecutingContext context)
|
public override void OnResultExecuting(ResultExecutingContext context)
|
||||||
{
|
{
|
||||||
// var list = DbScoped.SugarScope.Queryable<PoRequirement>().ToList();
|
// var url = httpContext.Request.Path;
|
||||||
// var list = DbScoped.SugarScope.Queryable<S>()
|
|
||||||
var httpContext = context.HttpContext;
|
|
||||||
var url = httpContext.Request.Path;
|
|
||||||
var info = JwtUtil.GetLoginUser(context.HttpContext);
|
var info = JwtUtil.GetLoginUser(context.HttpContext);
|
||||||
|
var roleIds = info.Roles.Select(it => it.RoleId).ToList();
|
||||||
|
// var list = DbScoped.SugarScope.Queryable<PoRequirement>().ToList();
|
||||||
|
var list = DbScoped.SugarScope.Queryable<SysField>()
|
||||||
|
.LeftJoin<SysRoleField>((sf, srf) => sf.Id == srf.FieldId)
|
||||||
|
.Where((sf, srf) => roleIds.Contains(srf.RoleId))
|
||||||
|
.ToList();
|
||||||
|
|
||||||
// 获取原始的结果
|
// 获取原始的结果
|
||||||
var originalResult = context.Result as ContentResult;
|
var originalResult = context.Result as ContentResult;
|
||||||
var apiResult = (JsonConvert.DeserializeObject<ApiResult>(originalResult?.Content!)) as ApiResult;
|
var apiResult = (JsonConvert.DeserializeObject<ApiResult>(originalResult?.Content!)) as ApiResult;
|
||||||
// 创建泛型类型
|
// 创建泛型类型
|
||||||
// var resObj = typeof(JObject).GetMethod("ToObject", Type.EmptyTypes)?
|
var resObj = typeof(JObject).GetMethod("ToObject", Type.EmptyTypes)?
|
||||||
// .MakeGenericMethod(ResultType).Invoke(apiResult?.Data, null)!;
|
.MakeGenericMethod(ResultType).Invoke(apiResult?["data"], null)!;
|
||||||
// SetPropertiesToNull(resObj, new List<string>
|
SetPropertiesToNull(resObj, list.Select(it => it.FieldName).ToList());
|
||||||
// {
|
|
||||||
// "Reqno"
|
|
||||||
// });
|
|
||||||
// var json = JsonConvert.SerializeObject(resObj, new JsonSerializerSettings
|
// var json = JsonConvert.SerializeObject(resObj, new JsonSerializerSettings
|
||||||
// {
|
// {
|
||||||
// ContractResolver = new CamelCasePropertyNamesContractResolver()
|
// ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||||
// });
|
// });
|
||||||
// var jObject = JObject.Parse(json);
|
// var jObject = JObject.Parse(json);
|
||||||
// jObject.Add(new JProperty("props", new List<string>
|
apiResult["data"] = resObj;
|
||||||
|
var jsonRes = JsonConvert.SerializeObject(apiResult, new JsonSerializerSettings
|
||||||
|
{
|
||||||
|
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
||||||
|
});
|
||||||
|
// JsonConvert.SerializeObject(apiResult, new JsonSerializerSettings
|
||||||
// {
|
// {
|
||||||
// "Reqno"
|
// ContractResolver = new JsonPropertyContractResolver(
|
||||||
// }.Select(ToLowerFirstLetter).ToList()));
|
// list.Select(it => ToLowerFirstLetter(it.FieldName)).ToList()
|
||||||
// apiResult.Data = jObject;
|
// )
|
||||||
context.Result = new ContentResult{ Content = JsonConvert.SerializeObject(apiResult, new JsonSerializerSettings
|
// })
|
||||||
{
|
context.Result = new ContentResult{ Content = jsonRes,
|
||||||
ContractResolver = new CamelCasePropertyNamesContractResolver()
|
|
||||||
}),
|
|
||||||
ContentType = "application/json"} ;
|
ContentType = "application/json"} ;
|
||||||
base.OnResultExecuting(context);
|
base.OnResultExecuting(context);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,5 +79,7 @@ namespace ZR.ServiceCore.Model
|
|||||||
|
|
||||||
[Navigate(NavigateType.OneToOne, nameof(CategoryId), nameof(ArticleCategory.CategoryId))] //自定义关系映射
|
[Navigate(NavigateType.OneToOne, nameof(CategoryId), nameof(ArticleCategory.CategoryId))] //自定义关系映射
|
||||||
public ArticleCategory ArticleCategoryNav { get; set; }
|
public ArticleCategory ArticleCategoryNav { get; set; }
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string IsPaa { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
using ZR.Service;
|
using ZR.Service;
|
||||||
using ZR.ServiceCore.Model;
|
using ZR.ServiceCore.Model;
|
||||||
|
using ZR.ServiceCore.Model.Dto;
|
||||||
|
|
||||||
namespace ZR.ServiceCore.Services.IService;
|
namespace ZR.ServiceCore.Services.IService;
|
||||||
|
|
||||||
public interface ISysFieldService : IBaseService<SysField>
|
public interface ISysFieldService : IBaseService<SysField>
|
||||||
{
|
{
|
||||||
|
Task<List<SysFieldDto>> GetFields(string fullName, long roleId);
|
||||||
}
|
Task<bool> InitFields();
|
||||||
|
|
||||||
public interface ISysRoleFieldService : IBaseService<SysRoleField>
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1,6 +1,10 @@
|
|||||||
namespace ZR.ServiceCore.Services.IService;
|
using ZR.Service;
|
||||||
|
using ZR.ServiceCore.Model;
|
||||||
|
using ZR.ServiceCore.Model.Dto;
|
||||||
|
|
||||||
public class ISysRoleFieldService
|
namespace ZR.ServiceCore.Services.IService;
|
||||||
|
|
||||||
|
public interface ISysRoleFieldService : IBaseService<SysRoleField>
|
||||||
{
|
{
|
||||||
|
Task<bool> InsertOrUpdateSysRoleField(List<SysFieldDto> sysFieldDtos, long roleId);
|
||||||
}
|
}
|
||||||
@ -1,12 +1,93 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
using ZR.Service;
|
using ZR.Service;
|
||||||
using ZR.ServiceCore.Model;
|
using ZR.ServiceCore.Model;
|
||||||
|
using ZR.ServiceCore.Model.Dto;
|
||||||
using ZR.ServiceCore.Services.IService;
|
using ZR.ServiceCore.Services.IService;
|
||||||
|
|
||||||
namespace ZR.ServiceCore.Services;
|
namespace ZR.ServiceCore.Services;
|
||||||
[AppService(ServiceType = typeof(ISysFieldService), ServiceLifetime = LifeTime.Transient)]
|
[AppService(ServiceType = typeof(ISysFieldService), ServiceLifetime = LifeTime.Transient)]
|
||||||
public class SysFieldService : BaseService<SysField>, ISysFieldService
|
public class SysFieldService : BaseService<SysField>, ISysFieldService
|
||||||
{
|
{
|
||||||
|
private readonly ISysRoleFieldService _sysRoleFieldService;
|
||||||
|
|
||||||
|
public SysFieldService(ISysRoleFieldService sysRoleFieldService)
|
||||||
|
{
|
||||||
|
_sysRoleFieldService = sysRoleFieldService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<List<SysFieldDto>> GetFields(string fullName, long roleId)
|
||||||
|
{
|
||||||
|
var fields = await Queryable()
|
||||||
|
.Where(it => it.FullName == fullName)
|
||||||
|
.ToListAsync();
|
||||||
|
var roleFields = await _sysRoleFieldService
|
||||||
|
.Queryable()
|
||||||
|
.Where(it => it.RoleId == roleId)
|
||||||
|
.Select(it => it.FieldId)
|
||||||
|
.ToListAsync();
|
||||||
|
var list = fields.Select(it => new SysFieldDto
|
||||||
|
{
|
||||||
|
FieldName = it.FieldName,
|
||||||
|
FieldType = it.FieldType,
|
||||||
|
FullName = it.FullName,
|
||||||
|
Id = it.Id,
|
||||||
|
IsClass = it.IsClass,
|
||||||
|
IsPermission = !roleFields.Contains(it.Id)
|
||||||
|
}).ToList();
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> InitFields()
|
||||||
|
{
|
||||||
|
var serviceCoreModels = AppDomain.CurrentDomain
|
||||||
|
.GetAssemblies()
|
||||||
|
.First(it => it.FullName.Contains("ZR.ServiceCore"))
|
||||||
|
.ExportedTypes
|
||||||
|
.Where(p => p.FullName.StartsWith("ZR.ServiceCore.Model"))
|
||||||
|
.Select(it => new
|
||||||
|
{
|
||||||
|
it.FullName,
|
||||||
|
Properties = it.GetProperties().Select(pt => new
|
||||||
|
{
|
||||||
|
FieldName = pt.Name,
|
||||||
|
FieldType = pt.PropertyType.FullName,
|
||||||
|
IsClass = pt.PropertyType.IsClass,
|
||||||
|
IsArray = pt.PropertyType.IsArray,
|
||||||
|
// IsList = pt.PropertyType.IsClass ? pt.DeclaringType.FullName : string.Empty
|
||||||
|
}).ToList()
|
||||||
|
// Properties = it.GetProperties()
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
|
||||||
|
foreach (var serviceCoreModel in serviceCoreModels)
|
||||||
|
{
|
||||||
|
var sysFields = serviceCoreModel.Properties
|
||||||
|
.Select(property => new SysField
|
||||||
|
{
|
||||||
|
FieldName = property.FieldName,
|
||||||
|
FullName = serviceCoreModel.FullName,
|
||||||
|
FieldType = property.FieldType,
|
||||||
|
IsClass = property.IsClass ? "1" : "0"
|
||||||
|
}).ToList();
|
||||||
|
await Deleteable()
|
||||||
|
.Where(it =>
|
||||||
|
!sysFields.Select(sf => sf.FieldName)
|
||||||
|
.ToArray().Contains(it.FieldName))
|
||||||
|
.Where(it => it.FullName == serviceCoreModel.FullName)
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
var sysFieldStore = await Storageable(sysFields)
|
||||||
|
.WhereColumns(it => new { it.FieldName, it.FullName })
|
||||||
|
.ToStorageAsync();
|
||||||
|
await sysFieldStore
|
||||||
|
.AsInsertable
|
||||||
|
.ExecuteReturnSnowflakeIdListAsync();
|
||||||
|
await sysFieldStore
|
||||||
|
.AsUpdateable
|
||||||
|
.IgnoreColumns(it => it.Id)
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,57 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
using ZR.Service;
|
using ZR.Service;
|
||||||
using ZR.ServiceCore.Model;
|
using ZR.ServiceCore.Model;
|
||||||
|
using ZR.ServiceCore.Model.Dto;
|
||||||
using ZR.ServiceCore.Services.IService;
|
using ZR.ServiceCore.Services.IService;
|
||||||
|
|
||||||
namespace ZR.ServiceCore.Services;
|
namespace ZR.ServiceCore.Services;
|
||||||
[AppService(ServiceType = typeof(ISysRoleFieldService), ServiceLifetime = LifeTime.Transient)]
|
[AppService(ServiceType = typeof(ISysRoleFieldService), ServiceLifetime = LifeTime.Transient)]
|
||||||
public class SysRoleFieldService : BaseService<SysRoleField>, ISysRoleFieldService
|
public class SysRoleFieldService : BaseService<SysRoleField>, ISysRoleFieldService
|
||||||
{
|
{
|
||||||
|
public async Task<bool> InsertOrUpdateSysRoleField(List<SysFieldDto> sysFieldDtos, long roleId)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Context.Ado.BeginTranAsync();
|
||||||
|
await Deleteable()
|
||||||
|
.Where(it => it.RoleId == roleId)
|
||||||
|
.Where(it => sysFieldDtos.Select(sf => sf.Id).ToArray()
|
||||||
|
.Contains(it.FieldId))
|
||||||
|
.ExecuteCommandAsync();
|
||||||
|
var ids = sysFieldDtos
|
||||||
|
.Where(it => it.IsPermission != true)
|
||||||
|
.Select(it => new SysRoleField
|
||||||
|
{
|
||||||
|
FieldId = it.Id,
|
||||||
|
RoleId = roleId
|
||||||
|
})
|
||||||
|
.ToList();
|
||||||
|
await Insertable(ids).ExecuteCommandAsync();
|
||||||
|
await Context.Ado.CommitTranAsync();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Console.WriteLine(e);
|
||||||
|
await Context.Ado.RollbackTranAsync();
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
// var list = await
|
||||||
|
// Queryable()
|
||||||
|
// .LeftJoin<SysField>((rf, f) => rf.FieldId == f.Id)
|
||||||
|
// .Where((rf, f) => rf.RoleId == roleId && f.FullName == sysFieldDtos[0].FullName)
|
||||||
|
// .ToListAsync();
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// list.AddRange(ids);
|
||||||
|
// list = list.Distinct().ToList();
|
||||||
|
// var sysRoleFieldStore = await
|
||||||
|
// Storageable(ids)
|
||||||
|
// .WhereColumns(it => new { it.FieldId, it.RoleId })
|
||||||
|
// .ToStorageAsync();
|
||||||
|
// await sysRoleFieldStore.AsInsertable.ExecuteCommandAsync();
|
||||||
|
// await sysRoleFieldStore.AsUpdateable.ExecuteCommandAsync();
|
||||||
|
// await sysRoleFieldStore.AsDeleteable.ExecuteCommandAsync();
|
||||||
|
// return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user