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
5eae33fe
Commit
5eae33fe
authored
Feb 03, 2023
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d6ad33c8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
3 additions
and
155 deletions
+3
-155
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+0
-77
Edu.Module.Goods.csproj
Edu.Module.Goods/Edu.Module.Goods.csproj
+1
-0
ScrollController.cs
Edu.WebApi/Controllers/Course/ScrollController.cs
+1
-0
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+1
-78
No files found.
Edu.Module.Course/CourseModule.cs
View file @
5eae33fe
...
...
@@ -1070,83 +1070,6 @@ namespace Edu.Module.Course
}
/// <summary>
/// 重新更新课程单词URL
/// </summary>
public
void
RunWordsUrlModule
(
List
<
RB_Course_Chapter_ViewModel
>
n5CourseList
,
List
<
RB_Course_Chapter_ViewModel
>
n4CourseList
,
List
<
RB_Course_Chapter_ViewModel
>
n3CourseList
)
{
var
wordsList
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
{
CourseId
=
1
});
//var n5WordsList = wordsList.Where(qitem => qitem.ChapterId < 43).ToList();
//int n5ChapterId = 6;
//var tempN5Words = n5WordsList.GroupBy(qitem => new { qitem.ChapterId }).OrderBy(qitem=>qitem.Key.ChapterId).Select(qitem => new { qitem.Key.ChapterId });
//foreach (var item in tempN5Words)
//{
// var tempList = n5WordsList.Where(qitem => qitem.ChapterId == item.ChapterId).ToList();
// foreach (var subItem in tempList)
// {
// subItem.CourseId = n5CourseList.FirstOrDefault().CourseId;
// subItem.ChapterId = n5ChapterId;
// }
// n5ChapterId++;
//}
//if (n5CourseList != null && n5CourseList.Count > 0)
//{
// chapterRepository.SetBatchInsertCourseChapterRepository(n5CourseList);
//}
//if (n5WordsList != null && n5WordsList.Count > 0)
//{
// course_WordsRepository.BatchInsertCourseWordsRepository(n5WordsList);
//}
var
n4WordsList
=
wordsList
.
Where
(
qitem
=>
qitem
.
ChapterId
>=
43
&&
qitem
.
ChapterId
<
79
).
ToList
();
var
tempN4Words
=
n4WordsList
.
GroupBy
(
qitem
=>
new
{
qitem
.
ChapterId
}).
OrderBy
(
qitem
=>
qitem
.
Key
.
ChapterId
).
Select
(
qitem
=>
new
{
qitem
.
Key
.
ChapterId
});
int
n4ChapterId
=
1
;
foreach
(
var
item
in
tempN4Words
)
{
var
tempList
=
n4WordsList
.
Where
(
qitem
=>
qitem
.
ChapterId
==
item
.
ChapterId
).
ToList
();
foreach
(
var
subItem
in
tempList
)
{
subItem
.
CourseId
=
n4CourseList
.
FirstOrDefault
().
CourseId
;
subItem
.
ChapterId
=
n4ChapterId
;
}
n4ChapterId
++;
}
if
(
n4CourseList
!=
null
&&
n4CourseList
.
Count
>
0
)
{
chapterRepository
.
SetBatchInsertCourseChapterRepository
(
n4CourseList
);
}
if
(
n4WordsList
!=
null
&&
n4WordsList
.
Count
>
0
)
{
course_WordsRepository
.
BatchInsertCourseWordsRepository
(
n4WordsList
);
}
var
n3WordsList
=
wordsList
.
Where
(
qitem
=>
qitem
.
ChapterId
>=
79
).
ToList
();
var
tempN3Words
=
n3WordsList
.
GroupBy
(
qitem
=>
new
{
qitem
.
ChapterId
}).
OrderBy
(
qitem
=>
qitem
.
Key
.
ChapterId
).
Select
(
qitem
=>
new
{
qitem
.
Key
.
ChapterId
});
int
n3ChapterId
=
1
;
foreach
(
var
item
in
tempN3Words
)
{
var
tempList
=
n3WordsList
.
Where
(
qitem
=>
qitem
.
ChapterId
==
item
.
ChapterId
).
ToList
();
foreach
(
var
subItem
in
tempList
)
{
subItem
.
CourseId
=
n3CourseList
.
FirstOrDefault
().
CourseId
;
subItem
.
ChapterId
=
n3ChapterId
;
}
n3ChapterId
++;
}
if
(
n3CourseList
!=
null
&&
n3CourseList
.
Count
>
0
)
{
chapterRepository
.
SetBatchInsertCourseChapterRepository
(
n3CourseList
);
}
if
(
n3WordsList
!=
null
&&
n3WordsList
.
Count
>
0
)
{
course_WordsRepository
.
BatchInsertCourseWordsRepository
(
n3WordsList
);
}
string
str
=
""
;
}
/// <summary>
/// 获取课程章节列表
/// </summary>
...
...
Edu.Module.Goods/Edu.Module.Goods.csproj
View file @
5eae33fe
...
...
@@ -2,6 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
</PropertyGroup>
<ItemGroup>
...
...
Edu.WebApi/Controllers/Course/ScrollController.cs
View file @
5eae33fe
...
...
@@ -1255,6 +1255,7 @@ namespace Edu.WebApi.Controllers.Course
/// <returns></returns>
[
HttpPost
]
[
Obsolete
]
public
FileContentResult
DownLoadStuLearnChapterStatic
()
{
var
userInfo
=
base
.
UserInfo
;
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
5eae33fe
...
...
@@ -54,10 +54,7 @@ namespace Edu.WebApi.Controllers.User
/// 部门处理类对象
/// </summary>
private
readonly
DepartmentModule
departmentModule
=
new
DepartmentModule
();
private
readonly
CourseModule
courseModule
=
new
CourseModule
();
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
...
...
@@ -66,81 +63,7 @@ namespace Edu.WebApi.Controllers.User
new
OrderModule
().
GetClassNameList
(
"1337"
);
return
ApiResult
.
Success
();
}
private
void
TestMethod
()
{
var
n4File
=
@"G:/HKFile/n4.xlsx"
;
var
n3File
=
@"G:/HKFile/n3.xlsx"
;
List
<
RB_Course_Chapter_ViewModel
>
n4ChapterList
=
new
List
<
RB_Course_Chapter_ViewModel
>();
List
<
RB_Course_Chapter_ViewModel
>
n3ChapterList
=
new
List
<
RB_Course_Chapter_ViewModel
>();
var
n4List
=
Common
.
Data
.
CourseChapterHelper
.
GetXlsCourseChapterData
(
n4File
);
int
n4ChapterNo
=
1
;
foreach
(
var
item
in
n4List
)
{
n4ChapterList
.
Add
(
new
RB_Course_Chapter_ViewModel
()
{
ChapterId
=
0
,
CourseId
=
332
,
ChapterNo
=
n4ChapterNo
.
ToString
(),
ChapterName
=
item
.
ChapterName
,
ChapterContent
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
item
.
ChapterContent
),
ParentId
=
0
,
OpenStatus
=
1
,
CreateBy
=
1
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
1
,
UpdateTime
=
DateTime
.
Now
,
Progress
=
0
,
Status
=
0
,
Group_Id
=
100000
,
SortNum
=
n4ChapterNo
,
StudyHours
=
item
.
StudyHours
,
StudyMinutes
=
item
.
StudyMinutes
,
Objectives
=
""
,
Requirement
=
""
,
CourseRate
=
Common
.
Enum
.
Course
.
CourseRateEnum
.
N4
,
CurrentHours
=(
n4ChapterNo
-
1
)*
2
,
ChapterGradeNo
=
n4ChapterNo
,
});
n4ChapterNo
++;
}
var
n3List
=
Common
.
Data
.
CourseChapterHelper
.
GetXlsCourseChapterData
(
n3File
);
int
n3ChapterNo
=
1
;
foreach
(
var
item
in
n3List
)
{
n3ChapterList
.
Add
(
new
RB_Course_Chapter_ViewModel
()
{
ChapterId
=
0
,
CourseId
=
333
,
ChapterNo
=
n3ChapterNo
.
ToString
(),
ChapterName
=
item
.
ChapterName
,
ChapterContent
=
System
.
Web
.
HttpUtility
.
UrlEncode
(
item
.
ChapterContent
),
ParentId
=
0
,
OpenStatus
=
1
,
CreateBy
=
1
,
CreateTime
=
DateTime
.
Now
,
UpdateBy
=
1
,
UpdateTime
=
DateTime
.
Now
,
Progress
=
0
,
Status
=
0
,
Group_Id
=
100000
,
SortNum
=
n3ChapterNo
,
StudyHours
=
item
.
StudyHours
,
StudyMinutes
=
item
.
StudyMinutes
,
Objectives
=
""
,
Requirement
=
""
,
CourseRate
=
Common
.
Enum
.
Course
.
CourseRateEnum
.
N3
,
CurrentHours
=
(
n3ChapterNo
-
1
)
*
2
,
ChapterGradeNo
=
n3ChapterNo
,
});
n3ChapterNo
++;
}
courseModule
.
RunWordsUrlModule
(
new
List
<
Model
.
ViewModel
.
Course
.
RB_Course_Chapter_ViewModel
>(),
n4ChapterList
,
n3ChapterList
);
}
/// <summary>
/// 用户登录
/// </summary>
...
...
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