Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
Education
Commits
f7264eb4
Commit
f7264eb4
authored
Nov 19, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
9ca29b2e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
RB_Department_ViewModel.cs
Edu.Model/ViewModel/User/RB_Department_ViewModel.cs
+5
-0
RB_DepartmentRepository.cs
Edu.Repository/User/RB_DepartmentRepository.cs
+3
-1
No files found.
Edu.Model/ViewModel/User/RB_Department_ViewModel.cs
View file @
f7264eb4
...
...
@@ -35,6 +35,11 @@ namespace Edu.Model.ViewModel.User
/// </summary>
public
string
GroupName
{
get
;
set
;
}
/// <summary>
/// 校区名称
/// </summary>
public
string
SchoolName
{
get
;
set
;
}
/// <summary>
/// 部门编号【逗号分隔,查询使用】
/// </summary>
...
...
Edu.Repository/User/RB_DepartmentRepository.cs
View file @
f7264eb4
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment