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
bd91a5c0
Commit
bd91a5c0
authored
Jan 11, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
df421e0d
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
7 deletions
+52
-7
RB_StuWords_Prep.cs
Edu.Model/Entity/Exam/RB_StuWords_Prep.cs
+10
-0
RB_StuWords_Prep_Extend.cs
Edu.Model/ViewModel/Exam/RB_StuWords_Prep_Extend.cs
+10
-0
RB_StuWords_Review_Extend.cs
Edu.Model/ViewModel/Exam/RB_StuWords_Review_Extend.cs
+15
-1
CourseExamModule.cs
Edu.Module.Exam/CourseExamModule.cs
+4
-3
RB_StuWords_ReviewRepository.cs
Edu.Repository/Exam/RB_StuWords_ReviewRepository.cs
+1
-1
AppletWordsController.cs
Edu.WebApi/Controllers/Applet/AppletWordsController.cs
+4
-1
ApiFilterAttribute.cs
Edu.WebApi/Filter/ApiFilterAttribute.cs
+8
-1
No files found.
Edu.Model/Entity/Exam/RB_StuWords_Prep.cs
View file @
bd91a5c0
...
@@ -63,6 +63,16 @@ namespace Edu.Model.Entity.Exam
...
@@ -63,6 +63,16 @@ namespace Edu.Model.Entity.Exam
/// </summary>
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
public
DateStateEnum
Status
{
get
;
set
;
}
/// <summary>
/// 当前章节单词学习数量
/// </summary>
public
int
PrepNum
{
get
;
set
;
}
/// <summary>
/// 上一章节复习单词数量
/// </summary>
public
int
ReviewNum
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 学习单词数量
/// 学习单词数量
/// </summary>
/// </summary>
...
...
Edu.Model/ViewModel/Exam/RB_StuWords_Prep_Extend.cs
View file @
bd91a5c0
...
@@ -11,6 +11,16 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -11,6 +11,16 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
/// </summary>
public
class
RB_StuWords_Prep_Extend
:
RB_StuWords_Prep
public
class
RB_StuWords_Prep_Extend
:
RB_StuWords_Prep
{
{
/// <summary>
/// 复习章节编号
/// </summary>
public
int
ReviewCourseChapterId
{
get
;
set
;
}
/// <summary>
/// 学习类型(1-预习,2-复习)
/// </summary>
public
int
StudyType
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 学习分钟数
/// 学习分钟数
/// </summary>
/// </summary>
...
...
Edu.Model/ViewModel/Exam/RB_StuWords_Review_Extend.cs
View file @
bd91a5c0
...
@@ -10,6 +10,20 @@ namespace Edu.Model.ViewModel.Exam
...
@@ -10,6 +10,20 @@ namespace Edu.Model.ViewModel.Exam
/// </summary>
/// </summary>
public
class
RB_StuWords_Review_Extend
:
RB_StuWords_Review
public
class
RB_StuWords_Review_Extend
:
RB_StuWords_Review
{
{
/// <summary>
/// 学习分钟数
/// </summary>
public
string
StartMinutes
{
get
{
string
str
=
""
;
if
(
this
.
StartTime
!=
null
&&
this
.
EndTime
!=
null
)
{
str
=
Common
.
ConvertHelper
.
CalcMinutes
(
Convert
.
ToDateTime
(
this
.
StartTime
),
Convert
.
ToDateTime
(
this
.
EndTime
)).
ToString
();
}
return
str
;
}
}
}
}
}
}
Edu.Module.Exam/CourseExamModule.cs
View file @
bd91a5c0
...
@@ -366,7 +366,7 @@ namespace Edu.Module.Exam
...
@@ -366,7 +366,7 @@ namespace Edu.Module.Exam
var
wordsList
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
var
wordsList
=
course_WordsRepository
.
GetCourseWordsListRepository
(
new
RB_Course_Words_Extend
()
{
{
CourseId
=
model
.
CourseId
,
CourseId
=
model
.
CourseId
,
ChapterId
=
model
.
ChapterId
QChapterIds
=
model
.
ChapterId
+
","
+
model
.
ReviewCourse
ChapterId
});
});
var
oldModel
=
GetStuWordsPrepListModule
(
new
RB_StuWords_Prep_Extend
()
var
oldModel
=
GetStuWordsPrepListModule
(
new
RB_StuWords_Prep_Extend
()
{
{
...
@@ -464,10 +464,11 @@ namespace Edu.Module.Exam
...
@@ -464,10 +464,11 @@ namespace Edu.Module.Exam
{
{
{
nameof
(
RB_StuWords_Review_Extend
.
ReviewNum
),
model
.
ReviewNum
},
{
nameof
(
RB_StuWords_Review_Extend
.
ReviewNum
),
model
.
ReviewNum
},
};
};
model
.
TotalNum
=
oldModel
?.
TotalNum
??
(
wordsList
?.
Count
??
0
);
if
(
model
.
ReviewNum
==
(
wordsList
?.
Count
??
0
))
if
(
model
.
ReviewNum
==
(
wordsList
?.
Count
??
0
))
{
{
fileds
.
Add
(
nameof
(
RB_StuWords_Prep_Extend
.
EndTime
),
DateTime
.
Now
);
model
.
EndTime
=
DateTime
.
Now
;
fileds
.
Add
(
nameof
(
RB_StuWords_Review_Extend
.
EndTime
),
DateTime
.
Now
);
}
}
flag
=
stuWords_ReviewRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StuWords_Review_Extend
.
Id
),
model
.
Id
));
flag
=
stuWords_ReviewRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_StuWords_Review_Extend
.
Id
),
model
.
Id
));
}
}
...
...
Edu.Repository/Exam/RB_StuWords_ReviewRepository.cs
View file @
bd91a5c0
...
@@ -20,7 +20,7 @@ namespace Edu.Repository.Exam
...
@@ -20,7 +20,7 @@ namespace Edu.Repository.Exam
public
List
<
RB_StuWords_Review_Extend
>
GetStuWordsReviewListRepository
(
RB_StuWords_Review_Extend
query
)
public
List
<
RB_StuWords_Review_Extend
>
GetStuWordsReviewListRepository
(
RB_StuWords_Review_Extend
query
)
{
{
StringBuilder
builder
=
new
StringBuilder
();
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT A.* FROM RB_StuWords_
Prep
AS A WHERE 1=1 "
);
builder
.
AppendFormat
(
@" SELECT A.* FROM RB_StuWords_
Review
AS A WHERE 1=1 "
);
if
(
query
!=
null
)
if
(
query
!=
null
)
{
{
if
(
query
.
Group_Id
>
0
)
if
(
query
.
Group_Id
>
0
)
...
...
Edu.WebApi/Controllers/Applet/AppletWordsController.cs
View file @
bd91a5c0
...
@@ -49,7 +49,10 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -49,7 +49,10 @@ namespace Edu.WebApi.Controllers.Applet
CourseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
CourseId
=
base
.
ParmJObj
.
GetInt
(
"CourseId"
),
Stu_Account_Id
=
base
.
ParmJObj
.
GetInt
(
"Stu_Account_Id"
),
Stu_Account_Id
=
base
.
ParmJObj
.
GetInt
(
"Stu_Account_Id"
),
ChapterId
=
base
.
ParmJObj
.
GetInt
(
"ChapterId"
),
ChapterId
=
base
.
ParmJObj
.
GetInt
(
"ChapterId"
),
PrepNum
=
base
.
ParmJObj
.
GetInt
(
"PrepNum"
),
ReviewNum
=
base
.
ParmJObj
.
GetInt
(
"ReviewNum"
),
StudyNum
=
base
.
ParmJObj
.
GetInt
(
"StudyNum"
),
StudyNum
=
base
.
ParmJObj
.
GetInt
(
"StudyNum"
),
ReviewCourseChapterId
=
base
.
ParmJObj
.
GetInt
(
"ReviewCourseChapterId"
),
};
};
model
.
CreateBy
=
base
.
AppletUserInfo
.
Id
;
model
.
CreateBy
=
base
.
AppletUserInfo
.
Id
;
model
.
CreateTime
=
DateTime
.
Now
;
model
.
CreateTime
=
DateTime
.
Now
;
...
@@ -82,7 +85,7 @@ namespace Edu.WebApi.Controllers.Applet
...
@@ -82,7 +85,7 @@ namespace Edu.WebApi.Controllers.Applet
model
.
Group_Id
=
base
.
AppletUserInfo
.
Group_Id
;
model
.
Group_Id
=
base
.
AppletUserInfo
.
Group_Id
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
model
.
Status
=
Common
.
Enum
.
DateStateEnum
.
Normal
;
bool
flag
=
courseExamModule
.
SetStuWordsReviewModule
(
model
);
bool
flag
=
courseExamModule
.
SetStuWordsReviewModule
(
model
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
(
data
:
model
)
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// <summary>
...
...
Edu.WebApi/Filter/ApiFilterAttribute.cs
View file @
bd91a5c0
...
@@ -13,6 +13,7 @@ using Edu.Common.API;
...
@@ -13,6 +13,7 @@ using Edu.Common.API;
using
Edu.Cache.User
;
using
Edu.Cache.User
;
using
Edu.WebApi.Helper
;
using
Edu.WebApi.Helper
;
using
System.Reflection
;
using
System.Reflection
;
using
System.Collections.Generic
;
namespace
Edu.WebApi.Filter
namespace
Edu.WebApi.Filter
{
{
...
@@ -58,9 +59,15 @@ namespace Edu.WebApi.Filter
...
@@ -58,9 +59,15 @@ namespace Edu.WebApi.Filter
string
cachedKey
=
SecurityHelper
.
MD5
(
string
.
Format
(
"cmd={0}&token={1}"
,
actionUrl
,
token
));
string
cachedKey
=
SecurityHelper
.
MD5
(
string
.
Format
(
"cmd={0}&token={1}"
,
actionUrl
,
token
));
try
try
{
{
//不验证重复提交的方法名称
List
<
string
>
notValidateList
=
new
List
<
string
>()
{
"course/setchapter"
,
"appletwords/setstuwordsprep"
,
};
if
(
UserReidsCache
.
Exists
(
cachedKey
))
//判断表单是否重复提交
if
(
UserReidsCache
.
Exists
(
cachedKey
))
//判断表单是否重复提交
{
{
if
(
actionUrl
!=
"course/setchapter"
)
if
(
!
notValidateList
.
Contains
(
actionUrl
)
)
{
{
actionContext
.
Result
=
new
Microsoft
.
AspNetCore
.
Mvc
.
JsonResult
(
new
ApiResult
actionContext
.
Result
=
new
Microsoft
.
AspNetCore
.
Mvc
.
JsonResult
(
new
ApiResult
{
{
...
...
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