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
463f067d
Commit
463f067d
authored
Jan 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
8ab77fd5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
18 deletions
+57
-18
LevelTypeEnum.cs
Edu.Common/Enum/Question/LevelTypeEnum.cs
+17
-17
QuestionModule.cs
Edu.Module.Question/QuestionModule.cs
+12
-0
RB_QuestionRepository.cs
Edu.Repository/Question/RB_QuestionRepository.cs
+15
-1
QuestionController.cs
Edu.WebApi/Controllers/Course/QuestionController.cs
+13
-0
No files found.
Edu.Common/Enum/Question/LevelTypeEnum.cs
View file @
463f067d
...
@@ -11,21 +11,16 @@ namespace Edu.Common.Enum.Question
...
@@ -11,21 +11,16 @@ namespace Edu.Common.Enum.Question
public
enum
LevelTypeEnum
public
enum
LevelTypeEnum
{
{
/// <summary>
/// <summary>
///
高考日语
///
N1
/// </summary>
/// </summary>
[
EnumField
(
"
高考日语
"
)]
[
EnumField
(
"
N1
"
)]
GaoKao
=
6
,
N1
=
1
,
/// <summary>
/// <summary>
/// N5
///N2
/// </summary>
[
EnumField
(
"N5"
)]
N5
=
5
,
/// <summary>
///N4
/// </summary>
/// </summary>
[
EnumField
(
"N
4
"
)]
[
EnumField
(
"N
2
"
)]
N
4
=
4
,
N
2
=
2
,
/// <summary>
/// <summary>
///N3
///N3
...
@@ -34,15 +29,20 @@ namespace Edu.Common.Enum.Question
...
@@ -34,15 +29,20 @@ namespace Edu.Common.Enum.Question
N3
=
3
,
N3
=
3
,
/// <summary>
/// <summary>
///N
2
///N
4
/// </summary>
/// </summary>
[
EnumField
(
"N
2
"
)]
[
EnumField
(
"N
4
"
)]
N
2
=
2
,
N
4
=
4
,
/// <summary>
/// <summary>
///
N1
///
N5
/// </summary>
/// </summary>
[
EnumField
(
"N1"
)]
[
EnumField
(
"N5"
)]
N1
=
1
,
N5
=
5
,
/// <summary>
/// 高考日语
/// </summary>
[
EnumField
(
"高考日语"
)]
GaoKao
=
6
,
}
}
}
}
Edu.Module.Question/QuestionModule.cs
View file @
463f067d
using
Edu.AOP.CustomerAttribute
;
using
Edu.AOP.CustomerAttribute
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Question
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Repository.Question
;
using
Edu.Repository.Question
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -181,6 +182,17 @@ namespace Edu.Module.Question
...
@@ -181,6 +182,17 @@ namespace Edu.Module.Question
return
flag
;
return
flag
;
}
}
/// <summary>
/// 批量修改问题考级程度
/// </summary>
/// <param name="levelTypeEnum"></param>
/// <param name="questionIdList"></param>
/// <returns></returns>
public
bool
SetBatchQuestionLevelModule
(
LevelTypeEnum
levelTypeEnum
,
List
<
int
>
questionIdList
)
{
return
questionRepository
.
SetBatchQuestionLevelRepository
(
levelTypeEnum
,
questionIdList
);
}
/// <summary>
/// <summary>
/// 批量添加问题
/// 批量添加问题
/// </summary>
/// </summary>
...
...
Edu.Repository/Question/RB_QuestionRepository.cs
View file @
463f067d
using
Edu.Common.Enum
;
using
Edu.Common.Enum
;
using
Edu.Common.Enum.Question
;
using
Edu.Model.ViewModel.Question
;
using
Edu.Model.ViewModel.Question
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
...
@@ -97,6 +98,19 @@ WHERE 1=1 ");
...
@@ -97,6 +98,19 @@ WHERE 1=1 ");
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
return
GetPage
<
RB_Question_ViewModel
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
}
}
}
}
/// <summary>
/// 批量更新问题考级程度
/// </summary>
/// <param name="levelTypeEnum"></param>
/// <param name="questionIdList"></param>
/// <returns></returns>
public
bool
SetBatchQuestionLevelRepository
(
LevelTypeEnum
levelTypeEnum
,
List
<
int
>
questionIdList
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
" UPDATE RB_Question SET LevelType={0} WHERE QuestionId IN ({1}) "
,
(
int
)
levelTypeEnum
,
string
.
Join
(
","
,
questionIdList
));
return
base
.
Execute
(
builder
.
ToString
())
>
0
;
}
}
}
}
}
\ No newline at end of file
Edu.WebApi/Controllers/Course/QuestionController.cs
View file @
463f067d
...
@@ -579,6 +579,19 @@ namespace Edu.WebApi.Controllers.Course
...
@@ -579,6 +579,19 @@ namespace Edu.WebApi.Controllers.Course
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 批量修改问题考级程度
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetBatchQuestionLevel
()
{
var
LevelType
=
(
LevelTypeEnum
)
base
.
ParmJObj
.
GetInt
(
"LevelType"
);
List
<
int
>
questionIds
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
int
>>(
base
.
ParmJObj
.
GetStringValue
(
"questionIds"
));
var
flag
=
questionModule
.
SetBatchQuestionLevelModule
(
LevelType
,
questionIds
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// <summary>
/// 选择题验证
/// 选择题验证
/// </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