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
ac578bf7
Commit
ac578bf7
authored
Dec 07, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
6bc6f98c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
ConvertHelper.cs
Edu.Common/Plugin/ConvertHelper.cs
+12
-0
ClassModule.cs
Edu.Module.Course/ClassModule.cs
+10
-0
ClassController.cs
Edu.WebApi/Controllers/Course/ClassController.cs
+19
-0
No files found.
Edu.Common/Plugin/ConvertHelper.cs
View file @
ac578bf7
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Reflection
;
using
System.Text
;
using
System.Text.RegularExpressions
;
using
System.Threading.Tasks
;
namespace
Edu.Common
...
...
@@ -187,5 +188,16 @@ namespace Edu.Common
}
return
weekDay
;
}
/// <summary>
/// 是否为时间型字符串
/// </summary>
/// <param name="source">时间字符串(15:00:00)</param>
/// <returns></returns>
public
static
bool
IsTime
(
string
StrSource
)
{
return
Regex
.
IsMatch
(
StrSource
,
@"^((20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d)$"
);
}
}
}
\ No newline at end of file
Edu.Module.Course/ClassModule.cs
View file @
ac578bf7
...
...
@@ -64,6 +64,15 @@ namespace Edu.Module.Course
public
List
<
RB_Class_ViewModel
>
GetClassPageListModule
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Class_ViewModel
query
)
{
var
list
=
classRepository
.
GetClassPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
qitem
=>
qitem
.
CouseId
));
foreach
(
var
item
in
list
)
{
}
}
return
list
;
}
...
...
@@ -553,6 +562,7 @@ namespace Edu.Module.Course
{
list
.
Add
(
new
{
UserIcon
=
""
,
item
.
Id
,
SexStr
=
item
.
Sex
==
1
?
"男"
:
"女"
,
item
.
GuestName
,
...
...
Edu.WebApi/Controllers/Course/ClassController.cs
View file @
ac578bf7
...
...
@@ -161,6 +161,25 @@ namespace Edu.WebApi.Controllers.Course
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetClass_DefaultPlanTimeList"
);
}
if
(
extModel
.
DefaultPlanTimeList
!=
null
&&
extModel
.
DefaultPlanTimeList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
DefaultPlanTimeList
)
{
string
message
=
""
;
if
(!
Common
.
ConvertHelper
.
IsTime
(
item
.
StartTime
+
":00"
))
{
message
=
"【"
+
item
.
StartTime
+
"】格式不正确!(格式参考 11:30)"
;
}
if
(!
Common
.
ConvertHelper
.
IsTime
(
item
.
EndTime
+
":00"
))
{
message
+=
",【"
+
item
.
EndTime
+
"】格式不正确!(格式参考 08:10)"
;
}
if
(!
string
.
IsNullOrEmpty
(
message
))
{
return
ApiResult
.
ParamIsNull
(
message
:
message
);
}
}
}
bool
flag
=
classModule
.
SetClassModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
...
...
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