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
5a283ce9
Commit
5a283ce9
authored
Sep 21, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
fbfab839
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
389 additions
and
23 deletions
+389
-23
RB_Assist.cs
Edu.Model/Entity/User/RB_Assist.cs
+20
-0
RB_Manager.cs
Edu.Model/Entity/User/RB_Manager.cs
+10
-0
RB_Student.cs
Edu.Model/Entity/User/RB_Student.cs
+20
-0
RB_Teacher.cs
Edu.Model/Entity/User/RB_Teacher.cs
+10
-0
AssistModule.cs
Edu.Module.User/AssistModule.cs
+2
-0
StudentModule.cs
Edu.Module.User/StudentModule.cs
+1
-1
TeacherModule.cs
Edu.Module.User/TeacherModule.cs
+1
-0
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+325
-22
No files found.
Edu.Model/Entity/User/RB_Assist.cs
View file @
5a283ce9
...
...
@@ -62,6 +62,26 @@ namespace Edu.Model.Entity.User
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
/// <summary>
/// 集团编号
/// </summary>
...
...
Edu.Model/Entity/User/RB_Manager.cs
View file @
5a283ce9
...
...
@@ -33,11 +33,21 @@ namespace Edu.Model.Entity.User
/// </summary>
public
string
MHead
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
...
...
Edu.Model/Entity/User/RB_Student.cs
View file @
5a283ce9
...
...
@@ -76,5 +76,25 @@ namespace Edu.Model.Entity.User
/// 删除状态
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
DateTime
UpdateTime
{
get
;
set
;
}
}
}
Edu.Model/Entity/User/RB_Teacher.cs
View file @
5a283ce9
...
...
@@ -76,11 +76,21 @@ namespace Edu.Model.Entity.User
/// </summary>
public
int
SortNum
{
get
;
set
;
}
/// <summary>
/// 创建人
/// </summary>
public
int
CreateBy
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
CreateTime
{
get
;
set
;
}
/// <summary>
/// 修改人
/// </summary>
public
int
UpdateBy
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
...
...
Edu.Module.User/AssistModule.cs
View file @
5a283ce9
...
...
@@ -61,6 +61,8 @@ namespace Edu.Module.User
{
nameof
(
RB_Assist
.
AssistTel
),
model
.
AssistTel
},
{
nameof
(
RB_Assist
.
AssistIcon
),
model
.
AssistIcon
},
{
nameof
(
RB_Assist
.
AssistIntro
),
model
.
AssistIntro
},
{
nameof
(
RB_Assist
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Assist
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
assistRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Assist
.
AId
),
model
.
AId
));
}
...
...
Edu.Module.User/StudentModule.cs
View file @
5a283ce9
...
...
@@ -46,7 +46,7 @@ namespace Edu.Module.User
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
Set
Teacher
Module
(
RB_Student_ViewModel
model
)
public
bool
Set
Student
Module
(
RB_Student_ViewModel
model
)
{
bool
flag
;
if
(
model
.
StuId
>
0
)
...
...
Edu.Module.User/TeacherModule.cs
View file @
5a283ce9
...
...
@@ -61,6 +61,7 @@ namespace Edu.Module.User
{
nameof
(
RB_Teacher_ViewModel
.
IsShow
),
model
.
IsShow
},
{
nameof
(
RB_Teacher_ViewModel
.
IsRecommend
),
model
.
IsRecommend
},
{
nameof
(
RB_Teacher_ViewModel
.
SortNum
),
model
.
SortNum
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Teacher_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
teacherRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Teacher_ViewModel
.
TId
),
model
.
TId
));
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
5a283ce9
...
...
@@ -2,6 +2,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Edu.AOP
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.User
;
...
...
@@ -21,35 +22,35 @@ namespace Edu.WebApi.Controllers.User
[
EnableCors
(
"AllowCors"
)]
public
class
UserController
:
BaseController
{
/// <summary>
/// 账号管理处理类
/// </summary>
private
readonly
AccountModule
accountModule
=
new
AccountModule
();
/// <summary>
/// 助教处理类对象
/// </summary>
private
readonly
AssistModule
assistModule
=
new
AssistModule
();
private
readonly
AssistModule
assistModule
=
AOPHelper
.
CreateAOPObject
<
AssistModule
>
();
/// <summary>
/// 集团处理类对象
/// </summary>
private
readonly
GroupModule
groupModule
=
new
GroupModule
();
private
readonly
GroupModule
groupModule
=
AOPHelper
.
CreateAOPObject
<
GroupModule
>
();
/// <summary>
/// 学校处理类对象
/// </summary>
private
readonly
SchoolModule
schoolModule
=
new
SchoolModule
();
private
readonly
SchoolModule
schoolModule
=
AOPHelper
.
CreateAOPObject
<
SchoolModule
>
();
/// <summary>
/// 学生处理类对象
/// </summary>
private
readonly
StudentModule
studentModule
=
new
StudentModule
();
private
readonly
StudentModule
studentModule
=
AOPHelper
.
CreateAOPObject
<
StudentModule
>
();
/// <summary>
/// 讲师处理类对象
/// </summary>
private
readonly
TeacherModule
teacherModule
=
new
TeacherModule
();
private
readonly
TeacherModule
teacherModule
=
AOPHelper
.
CreateAOPObject
<
TeacherModule
>();
/// <summary>
/// 系统管理人员处理类对象
/// </summary>
private
readonly
ManagerModule
managerModule
=
AOPHelper
.
CreateAOPObject
<
ManagerModule
>();
#
region
集团管理
...
...
@@ -69,6 +70,7 @@ namespace Edu.WebApi.Controllers.User
/// 获取集团分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGroupPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
...
...
@@ -83,12 +85,13 @@ namespace Edu.WebApi.Controllers.User
/// 新增修改
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGroup
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Group_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
0
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
0
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
groupModule
.
SetGroupModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
@@ -98,10 +101,10 @@ namespace Edu.WebApi.Controllers.User
/// 获取集团列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGroup
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
var
GId
=
jobj
.
GetInt
(
"GId"
,
0
);
var
GId
=
base
.
ParmJObj
.
GetInt
(
"GId"
,
0
);
var
extModel
=
groupModule
.
GetGroupEntityModule
(
GId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
...
...
@@ -110,10 +113,10 @@ namespace Edu.WebApi.Controllers.User
/// 删除集团
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveGroup
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
var
GId
=
jobj
.
GetInt
(
"GId"
,
0
);
var
GId
=
base
.
ParmJObj
.
GetInt
(
"GId"
,
0
);
var
flag
=
groupModule
.
RemoveGroupModule
(
GId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -126,6 +129,7 @@ namespace Edu.WebApi.Controllers.User
/// 获取学校列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSchoolList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_School_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
...
...
@@ -138,10 +142,12 @@ namespace Edu.WebApi.Controllers.User
/// 获取学校分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSchoolPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_School_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
var
list
=
schoolModule
.
GetSchoolPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
...
...
@@ -152,12 +158,13 @@ namespace Edu.WebApi.Controllers.User
/// 添加修改学校
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetSchool
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_School_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
0
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
0
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
schoolModule
.
SetSchoolModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
...
...
@@ -167,10 +174,10 @@ namespace Edu.WebApi.Controllers.User
/// 获取学校实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetSchool
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
var
SId
=
jobj
.
GetInt
(
"SId"
,
0
);
var
SId
=
base
.
ParmJObj
.
GetInt
(
"SId"
,
0
);
var
extModel
=
schoolModule
.
GetSchoolEntityModule
(
SId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
...
...
@@ -179,13 +186,309 @@ namespace Edu.WebApi.Controllers.User
/// 删除学校
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveSchool
()
{
JObject
jobj
=
JObject
.
Parse
(
RequestParm
.
Msg
.
ToString
());
var
SId
=
jobj
.
GetInt
(
"SId"
,
0
);
var
SId
=
base
.
ParmJObj
.
GetInt
(
"SId"
,
0
);
var
flag
=
schoolModule
.
RemoveSchoolModule
(
SId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
讲师管理
/// <summary>
/// 获取讲师分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetTeacherPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Teacher_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
teacherModule
.
GetTeacherPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取讲师列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetTeacherList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Teacher_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
teacherModule
.
GetTeacherListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 添加修改讲师
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetTeacher
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Teacher_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
teacherModule
.
SetTeacherModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取讲师实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetTeacher
()
{
var
TId
=
base
.
ParmJObj
.
GetInt
(
"TId"
,
0
);
var
extModel
=
teacherModule
.
GetTeacherModule
(
TId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除讲师
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveTeacher
()
{
var
TId
=
base
.
ParmJObj
.
GetInt
(
"TId"
,
0
);
var
flag
=
teacherModule
.
RemoveTeacherModule
(
TId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
助教管理
/// <summary>
/// 获取助教分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAssistPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Assist_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
assistModule
.
GetAssistPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取助教列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAssistList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Assist_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
assistModule
.
GetAssistListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 添加修改助教
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAssist
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Assist_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
assistModule
.
SetAssistModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取助教实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAssist
()
{
var
AId
=
base
.
ParmJObj
.
GetInt
(
"AId"
,
0
);
var
extModel
=
assistModule
.
GetAssistModule
(
AId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除讲师
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveAssist
()
{
var
AId
=
base
.
ParmJObj
.
GetInt
(
"AId"
,
0
);
var
flag
=
assistModule
.
RemoveAssistModule
(
AId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
学生管理
/// <summary>
/// 获取学生分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Student_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
studentModule
.
GetStudentPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 获取学生列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudentList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Student_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
studentModule
.
GetStudentListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 添加修改学生
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetStudent
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Student_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
studentModule
.
SetStudentModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取学生实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetStudent
()
{
var
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
);
var
extModel
=
studentModule
.
GetStudentModule
(
StuId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除学生
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudent
()
{
var
StuId
=
base
.
ParmJObj
.
GetInt
(
"StuId"
,
0
);
var
flag
=
studentModule
.
RemoveStudentModule
(
StuId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
管理者管理
/// <summary>
/// 获取系统管理者分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetManagerPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Manager_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
managerModule
.
GetManagerPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 系统管理者
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetManagerList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Manager_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
managerModule
.
GetManagerListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 添加修改管理者
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetManager
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Manager_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
managerModule
.
SetManagerModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取管理者实体
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetManager
()
{
var
MId
=
base
.
ParmJObj
.
GetInt
(
"MId"
,
0
);
var
extModel
=
managerModule
.
GetManagerModule
(
MId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除管理者
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveManager
()
{
var
Mid
=
base
.
ParmJObj
.
GetInt
(
"Mid"
,
0
);
var
flag
=
managerModule
.
RemoveManagerModule
(
Mid
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
\ No newline at end of file
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