忽略dll文件git
This commit is contained in:
@@ -1,82 +1,82 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Pass.Manage.Request;
|
||||
using Hncore.Infrastructure.EntitiesExtension;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
|
||||
namespace Hncore.Pass.Manage.Response.ManagerToPermission
|
||||
{
|
||||
public class QueryPermissionByManagerIdResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// <summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属物业ID
|
||||
/// <summary>
|
||||
public int OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员数据库ID
|
||||
/// </summary>
|
||||
public int ManagerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目编码
|
||||
/// </summary>
|
||||
public int ProjectCode { get; set; }
|
||||
/// <summary>
|
||||
/// 小区名称
|
||||
/// </summary>
|
||||
public string ProjectName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员与权限对应表
|
||||
/// </summary>
|
||||
/// <param name="domainQueryable"></param>
|
||||
/// <param name="managerId"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<QueryPermissionByManagerIdResponse>> GetByManageId(
|
||||
IQueryable<Domain.AuthorityManagerDataDomain> domainQueryable,
|
||||
IQueryable<Domain.etor_property_estate> projects,
|
||||
IQueryable<Domain.Manager> manages ,
|
||||
int managerId)
|
||||
{
|
||||
List<QueryPermissionByManagerIdResponse> result = new List<QueryPermissionByManagerIdResponse>();
|
||||
var manage = await manages.FirstOrDefaultAsync(p=>p.Id== managerId);
|
||||
if (manage.IsRoot)
|
||||
{
|
||||
result = await projects.Where(p => p.owner_id == manage.TenantId && p.DeleteTag == 0).Select(r => new QueryPermissionByManagerIdResponse()
|
||||
{
|
||||
Id = 0,
|
||||
ManagerId = managerId,
|
||||
OwnerId = r.owner_id,
|
||||
ProjectCode = r.projectcode,
|
||||
ProjectName = r.name
|
||||
}).ToListAsync();
|
||||
}
|
||||
else {
|
||||
result = await (from domain in domainQueryable.Where(p => p.ManagerId == managerId && p.DeleteTag == 0)
|
||||
join pro in projects
|
||||
on domain.ProjectCode equals pro.projectcode
|
||||
select new QueryPermissionByManagerIdResponse()
|
||||
{
|
||||
Id = domain.Id,
|
||||
ManagerId = domain.ManagerId,
|
||||
OwnerId = domain.TenantId,
|
||||
ProjectCode = domain.ProjectCode,
|
||||
ProjectName = pro.name
|
||||
}).ToListAsync();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Pass.Manage.Request;
|
||||
using Hncore.Infrastructure.EntitiesExtension;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
|
||||
namespace Hncore.Pass.Manage.Response.ManagerToPermission
|
||||
{
|
||||
public class QueryPermissionByManagerIdResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// <summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所属物业ID
|
||||
/// <summary>
|
||||
public int OwnerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员数据库ID
|
||||
/// </summary>
|
||||
public int ManagerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目编码
|
||||
/// </summary>
|
||||
public int ProjectCode { get; set; }
|
||||
/// <summary>
|
||||
/// 小区名称
|
||||
/// </summary>
|
||||
public string ProjectName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员与权限对应表
|
||||
/// </summary>
|
||||
/// <param name="domainQueryable"></param>
|
||||
/// <param name="managerId"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<List<QueryPermissionByManagerIdResponse>> GetByManageId(
|
||||
IQueryable<Domain.AuthorityManagerDataDomain> domainQueryable,
|
||||
IQueryable<Domain.etor_property_estate> projects,
|
||||
IQueryable<Domain.Manager> manages ,
|
||||
int managerId)
|
||||
{
|
||||
List<QueryPermissionByManagerIdResponse> result = new List<QueryPermissionByManagerIdResponse>();
|
||||
var manage = await manages.FirstOrDefaultAsync(p=>p.Id== managerId);
|
||||
if (manage.IsRoot)
|
||||
{
|
||||
result = await projects.Where(p => p.owner_id == manage.TenantId && p.DeleteTag == 0).Select(r => new QueryPermissionByManagerIdResponse()
|
||||
{
|
||||
Id = 0,
|
||||
ManagerId = managerId,
|
||||
OwnerId = r.owner_id,
|
||||
ProjectCode = r.projectcode,
|
||||
ProjectName = r.name
|
||||
}).ToListAsync();
|
||||
}
|
||||
else {
|
||||
result = await (from domain in domainQueryable.Where(p => p.ManagerId == managerId && p.DeleteTag == 0)
|
||||
join pro in projects
|
||||
on domain.ProjectCode equals pro.projectcode
|
||||
select new QueryPermissionByManagerIdResponse()
|
||||
{
|
||||
Id = domain.Id,
|
||||
ManagerId = domain.ManagerId,
|
||||
OwnerId = domain.TenantId,
|
||||
ProjectCode = domain.ProjectCode,
|
||||
ProjectName = pro.name
|
||||
}).ToListAsync();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,130 +1,130 @@
|
||||
using Hncore.Infrastructure.Data;
|
||||
using Hncore.Infrastructure.DDD;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Pass.Manage.Request;
|
||||
using Hncore.Infrastructure.EntitiesExtension;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
|
||||
|
||||
namespace Hncore.Pass.Manage.Response
|
||||
{
|
||||
public class QueryPermissionResponse
|
||||
|
||||
{
|
||||
|
||||
/// 用户数据库ID
|
||||
/// <summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// <summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// <summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// <summary>
|
||||
public int CreatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人ID
|
||||
/// <summary>
|
||||
public int UpdatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 软删除标记,0.代表正常,1.代表已删除
|
||||
/// <summary>
|
||||
public int DeleteTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员id
|
||||
/// <summary>
|
||||
public int ManagerId { get; set; }
|
||||
/// <summary>
|
||||
/// 权限编码
|
||||
/// <summary>
|
||||
public string Permissioncode { get; set; }
|
||||
|
||||
|
||||
public string Parentcode { get; set; }
|
||||
|
||||
public string Permissionlabel { get; set; }
|
||||
|
||||
public string Permissionurl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标[50]
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
/// <summary>
|
||||
/// 激活图标
|
||||
/// </summary>
|
||||
public string Iconactivate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否查看
|
||||
/// </summary>
|
||||
public Boolean AllowView { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否添加
|
||||
/// </summary>
|
||||
public Boolean AllowAdd { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改
|
||||
/// </summary>
|
||||
public Boolean AllowEdit { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
/// </summary>
|
||||
public Boolean AllowDel { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 显示排序
|
||||
/// </summary>
|
||||
public int Sortorder { get; set; }
|
||||
/// <summary>
|
||||
/// 是否收费
|
||||
/// </summary>
|
||||
public bool Ischarge { get; set; }
|
||||
/// <summary>
|
||||
/// 模块编码
|
||||
/// </summary>
|
||||
public string Nodecode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否新功能
|
||||
/// </summary>
|
||||
public bool isnew { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 系统标识
|
||||
/// </summary>
|
||||
public int Systemid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Appcodes { get; set; }
|
||||
|
||||
public IList<QueryPermissionResponse> Children { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
using Hncore.Infrastructure.Data;
|
||||
using Hncore.Infrastructure.DDD;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data;
|
||||
using System.Linq.Expressions;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Hncore.Infrastructure.WebApi;
|
||||
using Hncore.Pass.Manage.Request;
|
||||
using Hncore.Infrastructure.EntitiesExtension;
|
||||
using Hncore.Infrastructure.Extension;
|
||||
|
||||
|
||||
namespace Hncore.Pass.Manage.Response
|
||||
{
|
||||
public class QueryPermissionResponse
|
||||
|
||||
{
|
||||
|
||||
/// 用户数据库ID
|
||||
/// <summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// <summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// <summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人ID
|
||||
/// <summary>
|
||||
public int CreatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人ID
|
||||
/// <summary>
|
||||
public int UpdatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 软删除标记,0.代表正常,1.代表已删除
|
||||
/// <summary>
|
||||
public int DeleteTag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 管理员id
|
||||
/// <summary>
|
||||
public int ManagerId { get; set; }
|
||||
/// <summary>
|
||||
/// 权限编码
|
||||
/// <summary>
|
||||
public string Permissioncode { get; set; }
|
||||
|
||||
|
||||
public string Parentcode { get; set; }
|
||||
|
||||
public string Permissionlabel { get; set; }
|
||||
|
||||
public string Permissionurl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图标[50]
|
||||
/// </summary>
|
||||
public string Icon { get; set; }
|
||||
/// <summary>
|
||||
/// 激活图标
|
||||
/// </summary>
|
||||
public string Iconactivate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否查看
|
||||
/// </summary>
|
||||
public Boolean AllowView { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否添加
|
||||
/// </summary>
|
||||
public Boolean AllowAdd { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改
|
||||
/// </summary>
|
||||
public Boolean AllowEdit { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否删除
|
||||
/// </summary>
|
||||
public Boolean AllowDel { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 显示排序
|
||||
/// </summary>
|
||||
public int Sortorder { get; set; }
|
||||
/// <summary>
|
||||
/// 是否收费
|
||||
/// </summary>
|
||||
public bool Ischarge { get; set; }
|
||||
/// <summary>
|
||||
/// 模块编码
|
||||
/// </summary>
|
||||
public string Nodecode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否新功能
|
||||
/// </summary>
|
||||
public bool isnew { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 系统标识
|
||||
/// </summary>
|
||||
public int Systemid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Appcodes { get; set; }
|
||||
|
||||
public IList<QueryPermissionResponse> Children { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user