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
5d3bfb1f
Commit
5d3bfb1f
authored
Feb 23, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8143c125
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
17 deletions
+22
-17
FileHelper.cs
Edu.Common/Plugin/FileHelper.cs
+6
-5
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+9
-6
Program.cs
Edu.Test/Program.cs
+6
-6
appsettings.json
Edu.WebApi/appsettings.json
+1
-0
No files found.
Edu.Common/Plugin/FileHelper.cs
View file @
5d3bfb1f
...
...
@@ -24,15 +24,16 @@ namespace Edu.Common.Plugin
GetDirectoryAndFile
(
path
,
leval
,
fileList
);
foreach
(
var
item
in
fileList
)
{
string
str
=
@"录音
[0123456789]*
"
;
string
str
=
@"录音"
;
Regex
reg
=
new
Regex
(
str
);
var
fileNameArray
=
Regex
.
Split
(
item
.
FileName
,
str
);
string
newFileName
=
item
.
FileName
;
string
newFileName
=
Regex
.
Replace
(
item
.
FileName
,
@"\d"
,
""
);
var
fileNameArray
=
Regex
.
Split
(
newFileName
,
str
)
;
if
(
fileNameArray
!=
null
&&
fileNameArray
.
Length
>
0
)
{
newFileName
=
fileNameArray
.
Length
>
1
?
fileNameArray
[
1
]
:
fileNameArray
[
0
]
;
newFileName
=
(
fileNameArray
.
Length
>
1
?
fileNameArray
[
1
]
:
fileNameArray
[
0
]).
TrimStart
().
TrimEnd
()
;
}
string
newPathFileName
=
savePath
+
@"\"
+
newFileName
.
TrimStart
().
TrimEnd
();
string
newPathFileName
=
savePath
+
@"\"
+
newFileName
.
TrimStart
(
'.'
)+
"3"
;
File
.
Copy
(
item
.
FileUrl
,
newPathFileName
,
true
);
item
.
FileUrl
=
newPathFileName
;
}
...
...
Edu.Module.Course/CourseModule.cs
View file @
5d3bfb1f
...
...
@@ -1209,9 +1209,11 @@ namespace Edu.Module.Course
if
(
list
!=
null
&&
list
.
Count
>
0
&&
fileList
!=
null
&&
fileList
.
Count
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>();
foreach
(
var
item
in
list
)
foreach
(
var
item
in
list
.
Where
(
qitem
=>
string
.
IsNullOrEmpty
(
qitem
.
FileUrl
)))
{
if
(
string
.
IsNullOrEmpty
(
item
.
FileUrl
))
{
var
tempWords
=
fileList
.
Where
(
qitem
=>
qitem
.
FileName
==
item
.
WordContent
+
".mp3"
)?.
FirstOrDefault
();
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
)
{
fileds
.
Clear
();
...
...
@@ -1221,6 +1223,7 @@ namespace Edu.Module.Course
}
}
}
}
/// <summary>
/// 获取课程章节列表
...
...
Edu.Test/Program.cs
View file @
5d3bfb1f
...
...
@@ -13,11 +13,11 @@ namespace Edu.Test
//filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc";
//var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath);
//
string newPath = @"G:\NewWords";
//
string filePath = @"G:\Words";
//
var list = Common.Plugin.FileHelper.GetFileAllPath(filePath, newPath);
//
string str = Common.Plugin.JsonHelper.Serialize(list);
//
Console.WriteLine(str);
string
newPath
=
@"G:\NewWords"
;
string
filePath
=
@"G:\Words"
;
var
list
=
Common
.
Plugin
.
FileHelper
.
GetFileAllPath
(
filePath
,
newPath
);
string
str
=
Common
.
Plugin
.
JsonHelper
.
Serialize
(
list
);
Console
.
WriteLine
(
str
);
Console
.
ReadKey
();
}
}
...
...
Edu.WebApi/appsettings.json
View file @
5d3bfb1f
...
...
@@ -38,6 +38,7 @@
"IncomeFinanceApi"
:
"http://192.168.10.65:8083/api/Mall/InsertFinanceBatchForMallIn"
,
"sTenpayNotifyUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/WxPayCallback"
,
//下单回调地址
"sTenpayNotifyRefundUrl"
:
"http://eduapi.oytour.com/api/WeChatPay/Refunds"
,
//退款回调地址
"SellFinanceApi"
:
"http://127.0.0.1/api/Mall/InsertFinanceBatchForEduOut"
,
"FinanceDateBase"
:
"reborn_finance"
,
"EduDateBase"
:
"reborn_edu"
,
"JHTenantId"
:
"15"
,
...
...
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