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
25a131f7
Commit
25a131f7
authored
Sep 24, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
455a4f4b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
143 additions
and
12 deletions
+143
-12
RB_Manager_ViewModel.cs
Edu.Model/ViewModel/User/RB_Manager_ViewModel.cs
+19
-0
CourseCategoryModule.cs
Edu.Module.Course/CourseCategoryModule.cs
+2
-0
ManagerModule.cs
Edu.Module.User/ManagerModule.cs
+3
-3
RB_AccountRepository.cs
Edu.Repository/User/RB_AccountRepository.cs
+1
-1
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+101
-0
PublicController.cs
Edu.WebApi/Controllers/Public/PublicController.cs
+1
-5
UserController.cs
Edu.WebApi/Controllers/User/UserController.cs
+16
-3
No files found.
Edu.Model/ViewModel/User/RB_Manager_ViewModel.cs
View file @
25a131f7
...
...
@@ -10,5 +10,24 @@ namespace Edu.Model.ViewModel.User
[
Serializable
]
public
class
RB_Manager_ViewModel
:
Model
.
Entity
.
User
.
RB_Manager
{
/// <summary>
/// 创建人
/// </summary>
public
string
CreateByName
{
get
;
set
;
}
/// <summary>
/// 创建时间字符串
/// </summary>
public
string
CreateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
CreateTime
);
}
}
/// <summary>
/// 更新人
/// </summary>
public
string
UpdateByName
{
get
;
set
;
}
/// <summary>
/// 更新时间
/// </summary>
public
string
UpdateTimeStr
{
get
{
return
Common
.
ConvertHelper
.
FormatTime
(
this
.
UpdateTime
);
}
}
}
}
Edu.Module.Course/CourseCategoryModule.cs
View file @
25a131f7
...
...
@@ -66,6 +66,8 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_Category_ViewModel
.
ParentId
),
model
.
ParentId
},
{
nameof
(
RB_Course_Category_ViewModel
.
CateName
),
model
.
CateName
.
Trim
()
},
{
nameof
(
RB_Course_Category_ViewModel
.
SortNum
),
model
.
SortNum
},
{
nameof
(
RB_Course_Category_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Course_Category_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
flag
=
categoryRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Category_ViewModel
.
CateId
),
model
.
CateId
));
}
...
...
Edu.Module.User/ManagerModule.cs
View file @
25a131f7
...
...
@@ -80,15 +80,15 @@ namespace Edu.Module.User
/// <summary>
/// 删除管理者
/// </summary>
/// <param name="M
i
d"></param>
/// <param name="M
I
d"></param>
/// <returns></returns>
public
bool
RemoveManagerModule
(
int
M
i
d
)
public
bool
RemoveManagerModule
(
int
M
I
d
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Manager_ViewModel
.
Status
),
(
int
)
DateStateEnum
.
Delete
}
};
bool
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
M
i
d
));
bool
flag
=
managerRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Manager_ViewModel
.
MId
),
M
I
d
));
return
flag
;
}
}
...
...
Edu.Repository/User/RB_AccountRepository.cs
View file @
25a131f7
...
...
@@ -116,7 +116,7 @@ WHERE 1=1
}
if
(
query
.
AccountType
>
0
)
{
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountType
),
query
.
AccountType
);
where
.
AppendFormat
(
" AND A.{0}={1} "
,
nameof
(
RB_Account_ViewModel
.
AccountType
),
(
int
)
query
.
AccountType
);
}
if
(
query
.
Id
>
0
)
{
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
0 → 100644
View file @
25a131f7
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.Course
;
using
Edu.Module.Course
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
namespace
Edu.WebApi.Controllers.Course
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
CourseController
:
BaseController
{
/// <summary>
/// 课程分类处理类
/// </summary>
private
readonly
CourseCategoryModule
categoryModule
=
new
CourseCategoryModule
();
#
region
课程管理
/// <summary>
/// 获取课程分类分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCourseCategoryPageList
()
{
var
pageModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
ResultPageModel
>(
RequestParm
.
Msg
.
ToString
());
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Category_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
categoryModule
.
GetCourseCategoryPageListModule
(
pageModel
.
PageIndex
,
pageModel
.
PageSize
,
out
long
rowsCount
,
query
);
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取课程分类列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCourseCategoryList
()
{
var
query
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Category_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
query
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
query
.
School_Id
=
base
.
UserInfo
.
School_Id
;
var
list
=
categoryModule
.
GetCourseCategoryListModule
(
query
);
return
ApiResult
.
Success
(
data
:
list
);
}
/// <summary>
/// 添加修改课程分类
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCourseCategory
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Category_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
categoryModule
.
SetCourseCategoryModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 获取课程分类
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetCourseCategory
()
{
var
CateId
=
base
.
ParmJObj
.
GetInt
(
"CateId"
,
0
);
var
extModel
=
categoryModule
.
GetCourseCategoryModule
(
CateId
);
return
ApiResult
.
Success
(
data
:
extModel
);
}
/// <summary>
/// 删除课程分类
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveCourseCategory
()
{
var
CateId
=
base
.
ParmJObj
.
GetInt
(
"CateId"
,
0
);
var
flag
=
categoryModule
.
RemoveCourseCategoryModule
(
CateId
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
}
}
Edu.WebApi/Controllers/Public/PublicController.cs
View file @
25a131f7
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Edu.Common.API
;
using
Edu.Common.Plugin
;
using
Edu.Model.ViewModel.System
;
using
Edu.Module.System
;
using
Edu.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.AspNetCore.Mvc
;
namespace
Edu.WebApi.Controllers.Public
...
...
@@ -120,7 +116,7 @@ namespace Edu.WebApi.Controllers.Public
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveStudent
()
public
ApiResult
SetMenuStatus
()
{
var
MenuId
=
base
.
ParmJObj
.
GetInt
(
"MenuId"
,
0
);
int
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
,
0
);
...
...
Edu.WebApi/Controllers/User/UserController.cs
View file @
25a131f7
...
...
@@ -529,9 +529,20 @@ namespace Edu.WebApi.Controllers.User
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
);
foreach
(
var
item
in
list
)
{
if
(
item
.
CreateBy
>
0
)
{
item
.
CreateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
CreateBy
)?.
AccountName
??
""
;
}
if
(
item
.
UpdateBy
>
0
)
{
item
.
UpdateByName
=
UserReidsCache
.
GetUserLoginInfo
(
item
.
UpdateBy
)?.
AccountName
??
""
;
}
}
pageModel
.
Count
=
rowsCount
;
pageModel
.
PageData
=
list
;
return
ApiResult
.
Success
(
data
:
list
);
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
...
...
@@ -560,6 +571,8 @@ namespace Edu.WebApi.Controllers.User
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Group_Id
=
base
.
UserInfo
.
Group_Id
;
extModel
.
School_Id
=
base
.
UserInfo
.
School_Id
;
bool
flag
=
managerModule
.
SetManagerModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
@@ -583,8 +596,8 @@ namespace Edu.WebApi.Controllers.User
[
HttpPost
]
public
ApiResult
RemoveManager
()
{
var
M
id
=
base
.
ParmJObj
.
GetInt
(
"Mi
d"
,
0
);
var
flag
=
managerModule
.
RemoveManagerModule
(
M
i
d
);
var
M
Id
=
base
.
ParmJObj
.
GetInt
(
"MI
d"
,
0
);
var
flag
=
managerModule
.
RemoveManagerModule
(
M
I
d
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
...
...
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