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
9af65dff
Commit
9af65dff
authored
Mar 22, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
4f4a93ab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
13 deletions
+24
-13
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+23
-12
LoginController.cs
Edu.WebApi/Controllers/User/LoginController.cs
+1
-1
No files found.
Edu.Module.Course/CourseModule.cs
View file @
9af65dff
...
...
@@ -20,6 +20,7 @@ using System.Text.RegularExpressions;
using
VT.FW.DB
;
using
Edu.Repository.Grade
;
using
Edu.Common.Enum.Question
;
using
System.Threading.Tasks
;
namespace
Edu.Module.Course
{
...
...
@@ -1165,26 +1166,36 @@ namespace Edu.Module.Course
/// </summary>
public
void
RunWordsUrlModule
()
{
var
list
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
{}
);
var
list
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
{
}).
Where
(
qitem
=>
string
.
IsNullOrEmpty
(
qitem
.
FileUrl
)).
ToList
(
);
string
newPath
=
@"G:\WebFile\EduSystem\CourseWords"
;
var
fileList
=
Common
.
Plugin
.
FileHelper
.
GetFileList
(
newPath
);
if
(
list
!=
null
&&
list
.
Count
>
0
&&
fileList
!=
null
&&
fileList
.
Count
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>();
foreach
(
var
item
in
list
.
Where
(
qitem
=>
string
.
IsNullOrEmpty
(
qitem
.
FileUrl
)))
{
if
(
string
.
IsNullOrEmpty
(
item
.
FileUrl
))
//Task.Run(() =>
//{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>();
foreach
(
var
item
in
list
.
Where
(
qitem
=>
string
.
IsNullOrEmpty
(
qitem
.
FileUrl
)
))
{
var
tempWords
=
fileList
.
Where
(
qitem
=>
(
qitem
.
FileName
.
Replace
(
"。"
,
""
)
==
item
.
WordContent
.
ToUpper
()
+
".mp3"
)
||
(
qitem
.
FileName
.
Replace
(
"。"
,
""
)
==
item
.
WordContent
.
ToLower
()
+
".mp3"
)
||
(
qitem
.
FileName
.
Replace
(
"。"
,
""
)
==
item
.
WordWrite
+
".mp3"
)
||
(
qitem
.
FileName
.
Replace
(
"。"
,
""
)
==
item
.
ChineseMean
+
".mp3"
))?.
FirstOrDefault
();
if
(
tempWords
!=
null
)
if
(
string
.
IsNullOrEmpty
(
item
.
FileUrl
))
{
fileds
.
Clear
();
string
newFileUrl
=
@"/EduSystem/CourseWords/"
+
tempWords
.
FileName
;
fileds
.
Add
(
nameof
(
RB_Course_Words_Extend
.
FileUrl
),
newFileUrl
);
bool
flag
=
course_WordsRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Words_Extend
.
Id
),
item
.
Id
));
var
tempWords
=
fileList
.
Where
(
qitem
=>
(
qitem
.
FileName
.
ToLower
()
==
item
.
WordContent
.
ToLower
()
.
Replace
(
"("
,
"("
)
.
Replace
(
")"
,
")"
)
.
Replace
(
"~"
,
"〜"
)
.
Replace
(
"。"
,
""
)
.
Replace
(
@"\n"
,
""
)
+
".mp3"
)
)?.
FirstOrDefault
();
if
(
tempWords
!=
null
)
{
fileds
.
Clear
();
string
newFileUrl
=
@"/EduSystem/CourseWords/"
+
tempWords
.
FileName
;
fileds
.
Add
(
nameof
(
RB_Course_Words_Extend
.
FileUrl
),
newFileUrl
);
bool
flag
=
course_WordsRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Words_Extend
.
Id
),
item
.
Id
));
}
}
}
}
//});
}
}
...
...
Edu.WebApi/Controllers/User/LoginController.cs
View file @
9af65dff
...
...
@@ -68,7 +68,7 @@ namespace Edu.WebApi.Controllers.User
[
AllowAnonymous
]
public
ApiResult
Test
()
{
//new OrderModule().RunStudentadvisorModule();
return
ApiResult
.
Success
();
}
...
...
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