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
a6c3b3d1
Commit
a6c3b3d1
authored
Jul 02, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b9d89f22
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
RB_Course_Chapter.cs
Edu.Model/Entity/Course/RB_Course_Chapter.cs
+1
-1
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+1
-1
RB_Course_ChapterRepository.cs
Edu.Repository/Course/RB_Course_ChapterRepository.cs
+5
-3
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+0
-1
No files found.
Edu.Model/Entity/Course/RB_Course_Chapter.cs
View file @
a6c3b3d1
...
...
@@ -100,7 +100,7 @@ namespace Edu.Model.Entity.Course
/// <summary>
/// 排序
/// </summary>
public
int
SortNum
{
get
;
set
;
}
public
double
SortNum
{
get
;
set
;
}
/// <summary>
/// 学习课时
...
...
Edu.Module.Course/CourseModule.cs
View file @
a6c3b3d1
...
...
@@ -485,7 +485,7 @@ namespace Edu.Module.Course
{
List
<
ChapterTree_ViewModel
>
resultList
=
new
List
<
ChapterTree_ViewModel
>();
//获取下级节点
var
subList
=
sourceList
?.
Where
(
qItem
=>
qItem
.
ParentId
==
parentId
).
OrderBy
(
qitem
=>
qitem
.
OrderFileds
).
ToList
();
var
subList
=
sourceList
?.
Where
(
qItem
=>
qItem
.
ParentId
==
parentId
).
OrderBy
(
qitem
=>
qitem
.
SortNum
).
ToList
();
//如果存在下级节点
if
(
subList
!=
null
&&
subList
.
Count
>
0
)
{
...
...
Edu.Repository/Course/RB_Course_ChapterRepository.cs
View file @
a6c3b3d1
...
...
@@ -54,12 +54,14 @@ namespace Edu.Repository.Course
public
bool
SetBatchUpdateChapterNoRepository
(
List
<
RB_Course_Chapter_ViewModel
>
param
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
"INSERT INTO rb_course_chapter (ChapterId, ChapterNo, ParentId) VALUES"
);
builder
.
Append
(
"INSERT INTO rb_course_chapter (ChapterId, ChapterNo, ParentId
,SortNum
) VALUES"
);
param
.
ForEach
(
x
=>
{
builder
.
Append
(
$"(
{
x
.
ChapterId
}
,'
{
x
.
ChapterNo
}
',
{
x
.
ParentId
}
),"
);
var
newChapterNo
=
x
.
ChapterNo
.
Replace
(
"."
,
""
);
double
.
TryParse
(
newChapterNo
,
out
double
SortNum
);
builder
.
Append
(
$"(
{
x
.
ChapterId
}
,'
{
x
.
ChapterNo
}
',
{
x
.
ParentId
}
,
{
SortNum
}
),"
);
});
builder
=
builder
.
Remove
(
builder
.
Length
-
1
,
1
);
builder
.
Append
(
"ON DUPLICATE KEY UPDATE ChapterNo=VALUES(ChapterNo),
ParentId=VALUES(ParentId
);"
);
builder
.
Append
(
"ON DUPLICATE KEY UPDATE ChapterNo=VALUES(ChapterNo),
ParentId=VALUES(ParentId),SortNum=VALUES(SortNum
);"
);
return
Execute
(
builder
.
ToString
())
>
0
;
}
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
a6c3b3d1
...
...
@@ -430,7 +430,6 @@ namespace Edu.WebApi.Controllers.Course
ParentId
=
base
.
ParmJObj
.
GetInt
(
"ParentId"
),
OpenStatus
=
base
.
ParmJObj
.
GetInt
(
"OpenStatus"
),
Progress
=
base
.
ParmJObj
.
GetInt
(
"Progress"
),
SortNum
=
base
.
ParmJObj
.
GetInt
(
"SortNum"
),
StudyHours
=
base
.
ParmJObj
.
GetInt
(
"StudyHours"
),
StudyMinutes
=
base
.
ParmJObj
.
GetInt
(
"StudyMinutes"
),
Objectives
=
base
.
ParmJObj
.
GetStringValue
(
"Objectives"
),
...
...
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