Commit f7264eb4 authored by 黄奎's avatar 黄奎

页面修改

parent 9ca29b2e
......@@ -35,6 +35,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public string GroupName { get; set; }
/// <summary>
/// 校区名称
/// </summary>
public string SchoolName { get; set; }
/// <summary>
/// 部门编号【逗号分隔,查询使用】
/// </summary>
......
......@@ -26,8 +26,9 @@ namespace Edu.Repository.User
DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*,IFNULL(B.GroupName,'') AS GroupName
SELECT A.*,IFNULL(B.GroupName,'') AS GroupName,IFNULL(C.SName,'') AS SchoolName
FROM rb_department AS A LEFT JOIN rb_group AS B ON A.Group_Id=B.GId
LEFT JOIN rb_school AS C ON A.School_Id=C.SId
WHERE 1=1
");
if (query != null)
......@@ -61,6 +62,7 @@ WHERE 1=1
{
builder.Append($" AND A.{nameof(RB_Department_ViewModel.Status)}={(int)query.Status} ");
}
builder.Append($" ORDER BY A.{nameof(RB_Department_ViewModel.DeptSort)} ASC ");
return GetPage<RB_Department_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
else
......
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