Commit 8c5dcb30 authored by 黄奎's avatar 黄奎

新增权限实体类

parent bf363bff
using Edu.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Common.Enum
{
/// <summary>
/// 权限枚举
/// </summary>
public enum PermissionEnum
{
/// <summary>
/// 系统级别权限【比如超级管理员-10001】
/// </summary>
[EnumField("系统级权限")]
System =10000,
/// <summary>
/// 订单相关权限【订单修改-20001】
/// </summary>
[EnumField("订单相关权限")]
Order =20000,
}
}
using Edu.Common.Enum;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.System
{
/// <summary>
/// 权限控制表实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_ActionMenu
{
/// <summary>
/// 主键
/// </summary>
public int Id { get; set; }
/// <summary>
/// 菜单名称
/// </summary>
public string ActionName { get; set; }
/// <summary>
/// 菜单URL
/// </summary>
public string MenuUrl { get; set; }
/// <summary>
/// 状态(参考枚举)
/// </summary>
public DateStateEnum Status { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 权限编码
/// </summary>
public string ActionCode { get; set; }
/// <summary>
/// 权限备注
/// </summary>
public string Remarks { get; set; }
}
}
\ No newline at end of file
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.System
{
/// <summary>
/// 岗位角色表实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Post_Role
{
/// <summary>
/// 主键编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 岗位编号
/// </summary>
public int PostId { get; set; }
/// <summary>
/// 角色编号
/// </summary>
public int RoleId { get; set; }
}
}
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.System
{
/// <summary>
/// 角色功能菜单表实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Role_ActionMenu
{
/// <summary>
/// 主键编号
/// </summary>
public int ID { get; set; }
/// <summary>
/// 角色id
/// </summary>
public int Role_Id { get; set; }
/// <summary>
/// 功能菜单id
/// </summary>
public int Action_Id { get; set; }
}
}
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.System
{
/// <summary>
/// 角色权限表实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Role_Permission
{
/// <summary>
/// 主键编号
/// </summary>
public int ID { get; set; }
/// <summary>
/// 角色编号
/// </summary>
public int Role_Id { get; set; }
/// <summary>
/// 菜单编号
/// </summary>
public int Menu_Id { get; set; }
}
}
\ No newline at end of file
......@@ -26,10 +26,6 @@ namespace Edu.Model.Entity.User
/// </summary>
public string SAddress { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string SLinkMan { get; set; }
/// <summary>
/// 联系电话
......@@ -85,5 +81,10 @@ namespace Edu.Model.Entity.User
/// 部门编号
/// </summary>
public int Dept_Id { get; set; }
/// <summary>
/// 负责人编号
/// </summary>
public int ManagerId { get; set; }
}
}
\ No newline at end of file
using Edu.Model.Entity.System;
namespace Edu.Model.ViewModel.System
{
/// <summary>
/// 权限控制表视图实体类
/// </summary>
public class RB_ActionMenu_ViewModel : RB_ActionMenu
{
}
}
\ No newline at end of file
using Edu.Model.Entity.System;
namespace Edu.Model.ViewModel.System
{
/// <summary>
/// 岗位角色表视图实体类
/// </summary>
public class RB_Post_Role_ViewModel : RB_Post_Role
{
}
}
using Edu.Model.Entity.System;
namespace Edu.Model.ViewModel.System
{
/// <summary>
/// 角色功能菜单表视图实体类
/// </summary>
public class RB_Role_ActionMenu_ViewModel : RB_Role_ActionMenu
{
}
}
\ No newline at end of file
using Edu.Model.Entity.System;
namespace Edu.Model.ViewModel.System
{
/// <summary>
/// 角色权限表视图实体类
/// </summary>
public class RB_Role_Permission_ViewModel : RB_Role_Permission
{
}
}
\ No newline at end of file
......@@ -63,5 +63,10 @@ namespace Edu.Model.ViewModel.User
/// 人员类型【查询使用,逗号分隔】
/// </summary>
public string AccountTypeStr { get; set; }
/// <summary>
/// 员工编号【查询使用,逗号分隔】
/// </summary>
public string QIds { get; set; }
}
}
......@@ -32,5 +32,25 @@ namespace Edu.Model.ViewModel.User
/// 用户头像
/// </summary>
public string UserIcon { get; set; }
/// <summary>
/// 部门编号
/// </summary>
public int Dept_Id { get; set; }
/// <summary>
/// 岗位编号
/// </summary>
public int Post_Id { get; set; }
/// <summary>
/// 部门名称
/// </summary>
public string DeptName { get; set; }
/// <summary>
/// 岗位名称
/// </summary>
public string PostName { get; set; }
}
}
\ No newline at end of file
......@@ -50,5 +50,10 @@ namespace Edu.Model.ViewModel.User
/// 部门名称
/// </summary>
public string DeptName { get; set; }
/// <summary>
/// 管理者姓名
/// </summary>
public string ManagerName { get; set; }
}
}
......@@ -22,6 +22,11 @@ namespace Edu.Module.User
/// </summary>
private readonly RB_DepartmentRepository departmentRepository = new RB_DepartmentRepository();
/// <summary>
/// 账号管理仓储层对象
/// </summary>
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
/// <summary>
/// 获取学校列表
/// </summary>
......@@ -46,7 +51,9 @@ namespace Edu.Module.User
if (list != null && list.Count > 0)
{
List<RB_Department_ViewModel> deptList = new List<RB_Department_ViewModel>();
List<Employee_ViewModel> empList = new List<Employee_ViewModel>();
string deptIds = string.Join(",", list.Where(qitem => qitem.Dept_Id > 0).Select(qitem => qitem.Dept_Id));
string empIds = string.Join(",", list.Where(qitem => qitem.ManagerId > 0).Select(qitem => qitem.ManagerId));
if (!string.IsNullOrEmpty(deptIds))
{
deptList = departmentRepository.GetDepartmentListRepository(new RB_Department_ViewModel()
......@@ -54,9 +61,14 @@ namespace Edu.Module.User
QDeptIds = deptIds
});
}
if (!string.IsNullOrEmpty(empIds))
{
empList= accountRepository.GetEmployeeListRepository(new Employee_ViewModel() { QIds = empIds });
}
foreach (var item in list)
{
item.DeptName = deptList?.Where(qitem => qitem.DeptId == item.Dept_Id)?.FirstOrDefault()?.DeptName ?? "";
item.ManagerName = empList?.Where(qitem => qitem.Id == item.ManagerId)?.FirstOrDefault()?.EmployeeName ?? "";
}
}
return list;
......@@ -86,7 +98,6 @@ namespace Edu.Module.User
{
{nameof(RB_School_ViewModel.SName),model.SName.Trim() },
{nameof(RB_School_ViewModel.SAddress),model.SAddress},
{nameof(RB_School_ViewModel.SLinkMan),model.SLinkMan.Trim() },
{nameof(RB_School_ViewModel.SLinkTel),model.SLinkTel.Trim() },
{nameof(RB_School_ViewModel.SDomain),model.SDomain },
{nameof(RB_School_ViewModel.SLogo),model.SLogo },
......@@ -94,7 +105,8 @@ namespace Edu.Module.User
{nameof(RB_School_ViewModel.UpdateBy),model.UpdateBy },
{nameof(RB_School_ViewModel.UpdateTime),model.UpdateTime },
{nameof(RB_School_ViewModel.Status),model.Status },
{nameof(RB_School_ViewModel.Dept_Id),model.Dept_Id }
{nameof(RB_School_ViewModel.Dept_Id),model.Dept_Id },
{nameof(RB_School_ViewModel.ManagerId),model.ManagerId },
};
flag = schoolRepository.Update(fileds, new WhereHelper(nameof(RB_School_ViewModel.SId), model.SId));
}
......
using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.System
{
/// <summary>
/// 权限控制表仓储层
/// </summary>
public class RB_ActionMenuRepository : BaseRepository<RB_ActionMenu>
{
/// <summary>
/// 获取权限控制分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_ActionMenu_ViewModel> GetActionMenuPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_ActionMenu_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_ActionMenu
WHERE 1=1
");
if (query != null)
{
if (!string.IsNullOrEmpty(query.ActionCode))
{
builder.AppendFormat(" AND {0} LIKE @ActionCode ", nameof(RB_ActionMenu_ViewModel.ActionCode));
parameters.Add("ActionCode", "%" + query.ActionCode.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.ActionName))
{
builder.AppendFormat(" AND {0} LIKE @ActionName ", nameof(RB_ActionMenu_ViewModel.ActionName));
parameters.Add("ActionName", "%" + query.ActionName.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.MenuUrl))
{
builder.AppendFormat(" AND {0} LIKE @MenuUrl ", nameof(RB_ActionMenu_ViewModel.MenuUrl));
parameters.Add("MenuUrl", "%" + query.MenuUrl.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.Remarks))
{
builder.AppendFormat(" AND {0} LIKE @Remarks ", nameof(RB_ActionMenu_ViewModel.Remarks));
parameters.Add("Remarks", "%" + query.Remarks.Trim() + "%");
}
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_ActionMenu_ViewModel.Id), query.Id);
}
}
return GetPage<RB_ActionMenu_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
/// <summary>
/// 获取权限控制列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_ActionMenu_ViewModel> GetActionMenuListRepository(RB_ActionMenu_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_ActionMenu
WHERE 1=1
");
if (query != null)
{
if (!string.IsNullOrEmpty(query.ActionCode))
{
builder.AppendFormat(" AND {0} LIKE @ActionCode ", nameof(RB_ActionMenu_ViewModel.ActionCode));
parameters.Add("ActionCode", "%" + query.ActionCode.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.ActionName))
{
builder.AppendFormat(" AND {0} LIKE @ActionName ", nameof(RB_ActionMenu_ViewModel.ActionName));
parameters.Add("ActionName", "%" + query.ActionName.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.MenuUrl))
{
builder.AppendFormat(" AND {0} LIKE @MenuUrl ", nameof(RB_ActionMenu_ViewModel.MenuUrl));
parameters.Add("MenuUrl", "%" + query.MenuUrl.Trim() + "%");
}
if (!string.IsNullOrEmpty(query.Remarks))
{
builder.AppendFormat(" AND {0} LIKE @Remarks ", nameof(RB_ActionMenu_ViewModel.Remarks));
parameters.Add("Remarks", "%" + query.Remarks.Trim() + "%");
}
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_ActionMenu_ViewModel.Id), query.Id);
}
}
return Get<RB_ActionMenu_ViewModel>(builder.ToString(), parameters).ToList();
}
}
}
using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.System
{
/// <summary>
/// 岗位角色表仓储层
/// </summary>
public class RB_Post_RoleRepository : BaseRepository<RB_Post_Role>
{
/// <summary>
/// 获取岗位角色分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Post_Role_ViewModel> GetPostRolePageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Post_Role_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Post_Role
WHERE 1=1
");
if (query != null)
{
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.Id), query.Id);
}
if (query.PostId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.PostId), query.PostId);
}
if (query.RoleId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.RoleId), query.RoleId);
}
}
return GetPage<RB_Post_Role_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取岗位角色列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Post_Role_ViewModel> GetPostRoleListRepository(RB_Post_Role_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Post_Role
WHERE 1=1
");
if (query != null)
{
if (query.Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.Id), query.Id);
}
if (query.PostId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.PostId), query.PostId);
}
if (query.RoleId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Post_Role_ViewModel.RoleId), query.RoleId);
}
}
return Get<RB_Post_Role_ViewModel>(builder.ToString()).ToList();
}
}
}
using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.System
{
/// <summary>
/// 角色功能菜单表仓储层
/// </summary>
public class RB_Role_ActionMenuRepository : BaseRepository<RB_Role_ActionMenu>
{
/// <summary>
/// 获取角色功能菜单分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_ActionMenu_ViewModel> GetRoleActionMenuPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Role_ActionMenu_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_ActionMenu
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.ID), query.ID);
}
if (query.Action_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.Action_Id), query.Action_Id);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.Role_Id), query.Role_Id);
}
}
return GetPage<RB_Role_ActionMenu_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取角色功能菜单列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_ActionMenu_ViewModel> GetRoleActionMenuListRepository(RB_Role_ActionMenu_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_ActionMenu
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.ID), query.ID);
}
if (query.Action_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.Action_Id), query.Action_Id);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_ActionMenu_ViewModel.Role_Id), query.Role_Id);
}
}
return Get<RB_Role_ActionMenu_ViewModel>(builder.ToString()).ToList();
}
}
}
using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Edu.Repository.System
{
/// <summary>
/// 角色权限表仓储层
/// </summary>
public class RB_Role_PermissionRepository : BaseRepository<RB_Role_Permission>
{
/// <summary>
/// 获取角色权限分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_Permission_ViewModel> GetRolePermissionPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Role_Permission_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_Permission
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.ID), query.ID);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Role_Id), query.Role_Id);
}
if (query.Menu_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Menu_Id), query.Menu_Id);
}
}
return GetPage<RB_Role_Permission_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString()).ToList();
}
/// <summary>
/// 获取角色权限列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Role_Permission_ViewModel> GetRolePermissionListRepository(RB_Role_Permission_ViewModel query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Role_Permission
WHERE 1=1
");
if (query != null)
{
if (query.ID > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.ID), query.ID);
}
if (query.Role_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Role_Id), query.Role_Id);
}
if (query.Menu_Id > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Role_Permission_ViewModel.Menu_Id), query.Menu_Id);
}
}
return Get<RB_Role_Permission_ViewModel>(builder.ToString()).ToList();
}
}
}
\ No newline at end of file
......@@ -130,25 +130,28 @@ WHERE 1=1
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(G.GroupName,'') AS GroupName,IFNULL(s.SName,'') AS SchoolName,IFNULL(G.Logo,'') AS GroupLogo
,IFNULL(d.DeptName,'') AS DeptName,IFNULL(p.PostName,'') AS PostName
FROM
(
SELECT A.*,IFNULL(B.MName,'') AS AccountName,B.MHead AS UserIcon
SELECT A.*,IFNULL(B.MName,'') AS AccountName,B.MHead AS UserIcon,B.Dept_Id,B.Post_Id
FROM rb_account AS A INNER JOIN rb_manager AS B ON A.AccountId=B.MId AND A.AccountType=1
WHERE 1=1 {0}
UNION ALL
SELECT A.*,IFNULL(B.TeacherName,'') AS AccountName,B.TeacherIcon AS UserIcon
SELECT A.*,IFNULL(B.TeacherName,'') AS AccountName,B.TeacherIcon AS UserIcon,B.Dept_Id,B.Post_Id
FROM rb_account AS A INNER JOIN rb_teacher AS B ON A.AccountId=B.TId AND A.AccountType=2
WHERE 1=1 {0}
UNION ALL
SELECT A.*,IFNULL(B.AssistName,'') AS AccountName,B.AssistIcon AS UserIcon
SELECT A.*,IFNULL(B.AssistName,'') AS AccountName,B.AssistIcon AS UserIcon,B.Dept_Id,B.Post_Id
FROM rb_account AS A INNER JOIN rb_assist AS B ON A.AccountId=B.AId AND A.AccountType=3
WHERE 1=1 {0}
UNION ALL
SELECT A.*,IFNULL(B.StuName,'') AS AccountName,B.StuIcon AS UserIcon
SELECT A.*,IFNULL(B.StuName,'') AS AccountName,B.StuIcon AS UserIcon,0 AS Dept_Id,0 AS Post_Id
FROM rb_account AS A INNER JOIN rb_student AS B ON A.AccountId=B.StuId AND A.AccountType=4
WHERE 1=1 {0}
) AS A LEFT JOIN rb_group AS g ON A.Group_Id=g.GId
LEFT JOIN rb_school AS s ON A.School_Id=s.SId
LEFT JOIN rb_department AS d ON A.Dept_Id=d.DeptId
LEFT JOIN rb_post AS p ON A.Post_Id=p.PostId
", where.ToString());
var list = Get<RB_Account_ViewModel>(builder.ToString()).ToList();
return list;
......@@ -187,6 +190,10 @@ FROM
{
where.AppendFormat(" AND A.{0}={1} ", nameof(Employee_ViewModel.Id), query.Id);
}
if (!string.IsNullOrEmpty(query.QIds))
{
where.AppendFormat(" AND A.{0} IN({1}) ", nameof(Employee_ViewModel.Id), query.QIds);
}
if (query.AccountId > 0)
{
where.AppendFormat(" AND A.{0}={1} ", nameof(Employee_ViewModel.AccountId), query.AccountId);
......@@ -221,7 +228,7 @@ FROM
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.Id,A.Account,A.Group_Id,A.School_Id,IFNULL(G.GroupName,'') AS GroupName,IFNULL(s.SName,'') AS SchoolName
SELECT A.Id,A.Account,A.Group_Id,A.School_Id,A.EmployeeName,IFNULL(G.GroupName,'') AS GroupName,IFNULL(s.SName,'') AS SchoolName
,IFNULL(d.DeptName,'') AS DeptName,IFNULL(p.PostName,'') AS PostName
FROM
(
......
......@@ -39,11 +39,6 @@ WHERE 1=1
builder.AppendFormat(" AND s.{0} LIKE @SAddress ", nameof(RB_School_ViewModel.SAddress));
parameters.Add("SAddress", "%" + query.SAddress.Trim() + "%");
}
if (!string.IsNullOrWhiteSpace(query.SLinkMan))
{
builder.AppendFormat(" AND s.{0} LIKE @SLinkMan ", nameof(RB_School_ViewModel.SLinkMan));
parameters.Add("SLinkMan", "%" + query.SLinkMan.Trim() + "%");
}
if (!string.IsNullOrWhiteSpace(query.SLinkTel))
{
builder.AppendFormat(" AND s.{0} LIKE @SLinkTel ", nameof(RB_School_ViewModel.SLinkTel));
......@@ -100,11 +95,6 @@ WHERE 1=1
builder.AppendFormat(" AND s.{0} LIKE @SAddress ", nameof(RB_School_ViewModel.SAddress));
parameters.Add("SAddress", "%" + query.SAddress.Trim() + "%");
}
if (!string.IsNullOrWhiteSpace(query.SLinkMan))
{
builder.AppendFormat(" AND s.{0} LIKE @SLinkMan ", nameof(RB_School_ViewModel.SLinkMan));
parameters.Add("SLinkMan", "%" + query.SLinkMan.Trim() + "%");
}
if (!string.IsNullOrWhiteSpace(query.SLinkTel))
{
builder.AppendFormat(" AND s.{0} LIKE @SLinkTel ", nameof(RB_School_ViewModel.SLinkTel));
......
......@@ -101,11 +101,15 @@ namespace Edu.WebApi.Controllers.User
AccountName = model.AccountName,
SchoolName = model.SchoolName,
Token = token,
ErpToken=erpToken,
ErpToken = erpToken,
MenuList = treeList,
GroupLogo = model.GroupLogo,
UserIcon = model.UserIcon,
ApiRequestFromEnum= Common.Enum.ApiRequestFromEnum.WebAdmin
ApiRequestFromEnum = Common.Enum.ApiRequestFromEnum.WebAdmin,
DeptId = model.Dept_Id,
DeptName = model.DeptName,
PostId = model.Post_Id,
PostName = model.PostName,
};
UserReidsCache.UserInfoSet(Cache.CacheKey.User_Login_Key + model.Id, obj, Common.Config.JwtExpirTime);
return ApiResult.Success(data: obj);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment