--修改逻辑

master
程志刚 1 year ago
parent 87668b7e65
commit f7c5ab7365

@ -88,7 +88,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="data">修改数据</param>
[HttpPost, Route("UpdateAuthority")]
public RequestEntity UpdateAuthority(IList<MinioAuthority> data)
public RequestEntity UpdateAuthority(List<MinioAuthority> data)
{
RequestEntity request = new RequestEntity();
try
@ -128,7 +128,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="master">需要删除的数据</param>
[HttpPost, Route("RemoveAuthority")]
public RequestEntity RemoveAuthority(IList<MinioAuthority> master)
public RequestEntity RemoveAuthority(List<MinioAuthority> master)
{
RequestEntity request = new RequestEntity();
try
@ -222,7 +222,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="data">修改数据</param>
[HttpPost, Route("UpdateUSER")]
public RequestEntity UpdateUSER(IList<MinioUser> data)
public RequestEntity UpdateUSER(List<MinioUser> data)
{
RequestEntity request = new RequestEntity();
try
@ -262,7 +262,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="master">需要删除的数据</param>
[HttpPost, Route("RemoveUSER")]
public RequestEntity RemoveUSER(IList<MinioUser> master)
public RequestEntity RemoveUSER(List<MinioUser> master)
{
RequestEntity request = new RequestEntity();
try
@ -322,7 +322,7 @@ namespace IBKLinker_Minio.Controller.MinioController
#region minio文件关联表
/// <summary>
/// 添加minio角色
/// 添加minio文件关联
/// </summary>
/// <param name="minioFileassociation">文件关联表</param>
[HttpPost, Route("AddFileassociation")]
@ -352,11 +352,11 @@ namespace IBKLinker_Minio.Controller.MinioController
return request;
}
/// <summary>
/// 修改minio角色
/// 修改minio文件关联
/// </summary>
/// <param name="data">修改数据</param>
[HttpPost, Route("UpdateFileassociation")]
public RequestEntity UpdateFileassociation(IList<MinioFileassociation> data)
public RequestEntity UpdateFileassociation(List<MinioFileassociation> data)
{
RequestEntity request = new RequestEntity();
try
@ -392,11 +392,11 @@ namespace IBKLinker_Minio.Controller.MinioController
}
/// <summary>
/// 删除minio角色
/// 删除minio文件关联
/// </summary>
/// <param name="master">需要删除的数据</param>
[HttpPost, Route("RemoveFileassociation")]
public RequestEntity RemoveFileassociation(IList<MinioFileassociation> master)
public RequestEntity RemoveFileassociation(List<MinioFileassociation> master)
{
RequestEntity request = new RequestEntity();
try
@ -422,7 +422,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// <summary>
/// 查询minio角色
/// 查询minio文件关联
/// </summary>
/// <returns></returns>
[HttpPost, Route("GetFileassociation")]
@ -490,7 +490,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="data">修改数据</param>
[HttpPost, Route("UpdateRolePermission")]
public RequestEntity UpdateRolePermission(IList<MinioRolePermission> data)
public RequestEntity UpdateRolePermission(List<MinioRolePermission> data)
{
RequestEntity request = new RequestEntity();
try
@ -530,7 +530,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="master">需要删除的数据</param>
[HttpPost, Route("RemoveRolePermission")]
public RequestEntity RemoveRolePermission(IList<MinioRolePermission> master)
public RequestEntity RemoveRolePermission(List<MinioRolePermission> master)
{
RequestEntity request = new RequestEntity();
try
@ -693,7 +693,7 @@ namespace IBKLinker_Minio.Controller.MinioController
/// </summary>
/// <param name="data">修改数据</param>
[HttpPost, Route("UpdateStoragePath")]
public RequestEntity UpdateStoragePath(IList<MinioStoragePath> data)
public RequestEntity UpdateStoragePath(List<MinioStoragePath> data)
{
RequestEntity request = new RequestEntity();
try
@ -915,9 +915,40 @@ namespace IBKLinker_Minio.Controller.MinioController
{
sql += "d.File_Name='" + FileName + "'";
}
if (!string.IsNullOrEmpty(FileName))
if (!string.IsNullOrEmpty(EmpowerType))
{
sql += "b." + EmpowerType + "=1";
if (EmpowerType == "打印")
{
sql += "b.PRINT_FLAG=1";
}
if (EmpowerType == "查看")
{
sql += "b.VIEW_FLAG=1";
}
if (EmpowerType == "上传")
{
sql += "b.UPLOAD_FLAG=1";
}
if (EmpowerType == "编辑")
{
sql += "b.EDIT_FLAG=1";
}
if (EmpowerType == "移动")
{
sql += "b.MOVE_FLAG=1";
}
if (EmpowerType == "删除")
{
sql += "b.DELETE_FLAG=1";
}
if (EmpowerType == "文件夹查看")
{
sql += "b.FILE_VIEW_PERMISSIONS=1";
}
if (EmpowerType == "文件夹控制")
{
sql += "b.FILE_CONTROL_PERMISSIONS=1";
}
}
request.data = db.Query<retqustUser>("select b.*d.FILE_NAME,d.FILE_PATH from minio_user a left join minio_role_permission b on a.role_id=b.id left join minio_authority c on b.limits_authority_id=c.limits_authority_id left join minio_storage_path d on c.file_id=d.pk where 1=1 " + sql + " ORDER BY a.creator_time").ToList();

Loading…
Cancel
Save