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
cce26af2
Commit
cce26af2
authored
Mar 12, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
课程作业修改
parent
76e01cac
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
107 additions
and
5 deletions
+107
-5
RB_Course_Job.cs
Edu.Model/Entity/Course/RB_Course_Job.cs
+9
-1
CourseModule.cs
Edu.Module.Course/CourseModule.cs
+25
-2
CourseController.cs
Edu.WebApi/Controllers/Course/CourseController.cs
+73
-2
No files found.
Edu.Model/Entity/Course/RB_Course_Job.cs
View file @
cce26af2
using
System
;
using
Edu.Common.Enum
;
using
System
;
using
VT.FW.DB
;
namespace
Edu.Model.Entity.Course
...
...
@@ -194,5 +195,12 @@ namespace Edu.Model.Entity.Course
/// 多选题未选全给一半分(1-是)
/// </summary>
public
int
IsMultiHalfScore
{
get
;
set
;
}
/// <summary>
/// 删除状态(0-正常,1-禁用)
/// </summary>
public
DateStateEnum
Status
{
get
;
set
;
}
}
}
\ No newline at end of file
Edu.Module.Course/CourseModule.cs
View file @
cce26af2
...
...
@@ -60,6 +60,11 @@ namespace Edu.Module.Course
/// </summary>
private
readonly
RB_Course_JobRepository
courseJobRepository
=
new
RB_Course_JobRepository
();
/// <summary>
/// 课程作业详情仓储层对象
/// </summary>
private
readonly
RB_Course_JobDetailsRepository
course_JobDetailsRepository
=
new
RB_Course_JobDetailsRepository
();
/// <summary>
/// 课程分类处理类
/// </summary>
...
...
@@ -835,7 +840,8 @@ namespace Edu.Module.Course
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
SetCourseJobModule
(
RB_Course_Job_ViewModel
model
)
[
TransactionCallHandler
]
public
virtual
bool
SetCourseJobModule
(
RB_Course_Job_ViewModel
model
)
{
bool
flag
;
if
(
model
.
JobId
>
0
)
...
...
@@ -846,7 +852,6 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_Job_ViewModel
.
JobType
),
model
.
JobType
},
{
nameof
(
RB_Course_Job_ViewModel
.
ScoreType
),
model
.
ScoreType
},
{
nameof
(
RB_Course_Job_ViewModel
.
TopicType
),
model
.
TopicType
},
};
flag
=
courseJobRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Job_ViewModel
.
JobId
),
model
.
JobId
));
}
...
...
@@ -893,6 +898,8 @@ namespace Edu.Module.Course
{
nameof
(
RB_Course_Job_ViewModel
.
IsCompletionIngoreCase
),
model
.
IsCompletionIngoreCase
},
{
nameof
(
RB_Course_Job_ViewModel
.
IsBlankIgnoreComma
),
model
.
IsBlankIgnoreComma
},
{
nameof
(
RB_Course_Job_ViewModel
.
IsMultiHalfScore
),
model
.
IsMultiHalfScore
},
{
nameof
(
RB_Course_Job_ViewModel
.
UpdateBy
),
model
.
UpdateBy
},
{
nameof
(
RB_Course_Job_ViewModel
.
UpdateTime
),
model
.
UpdateTime
},
};
var
flag
=
courseJobRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Job_ViewModel
.
JobId
),
model
.
JobId
));
return
flag
;
...
...
@@ -910,6 +917,22 @@ namespace Edu.Module.Course
{
return
courseJobRepository
.
GetCourseJobPageListRepository
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
}
/// <summary>
/// 删除课程作业
/// </summary>
/// <param name="JobId">作业编号</param>
/// <param name="Status">1-删除,0-恢复</param>
/// <returns></returns>
public
bool
RemoveCourseJobModule
(
int
JobId
,
int
Status
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Course_Job_ViewModel
.
Status
),
Status
},
};
var
flag
=
courseJobRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Course_Job_ViewModel
.
JobId
),
JobId
));
return
flag
;
}
#
endregion
#
region
课程优惠设置
...
...
Edu.WebApi/Controllers/Course/CourseController.cs
View file @
cce26af2
...
...
@@ -804,18 +804,89 @@ namespace Edu.WebApi.Controllers.Course
[
HttpPost
]
public
ApiResult
SetCourseJob
()
{
var
extModel
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
RB_Course_Job_ViewModel
>(
RequestParm
.
Msg
.
ToString
());
var
extModel
=
new
RB_Course_Job_ViewModel
()
{
JobId
=
base
.
ParmJObj
.
GetInt
(
"JobId"
),
JobName
=
base
.
ParmJObj
.
GetStringValue
(
"JobName"
),
JobType
=
base
.
ParmJObj
.
GetInt
(
"JobType"
),
ScoreType
=
base
.
ParmJObj
.
GetInt
(
"ScoreType"
),
TopicType
=
base
.
ParmJObj
.
GetInt
(
"TopicType"
)
};
try
{
extModel
.
JobDetailsList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
RB_Course_JobDetails_ViewModel
>>(
base
.
ParmJObj
.
GetStringValue
(
"JobDetailsList"
));
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"SetCourseJob"
);
}
extModel
.
CreateTime
=
DateTime
.
Now
;
extModel
.
CreateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
extModel
.
Status
=
DateStateEnum
.
Normal
;
bool
flag
=
courseModule
.
SetCourseJobModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 修改作业其他设置
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetCourseJobOtherConfig
()
{
var
extModel
=
new
RB_Course_Job_ViewModel
()
{
JobId
=
base
.
ParmJObj
.
GetInt
(
"JobId"
),
ReciveClass
=
base
.
ParmJObj
.
GetStringValue
(
"ReciveClass"
),
StartTime
=
base
.
ParmJObj
.
GetDateTime
(
"StartTime"
),
EndTime
=
base
.
ParmJObj
.
GetDateTime
(
"EndTime"
),
IsAllowDelay
=
base
.
ParmJObj
.
GetInt
(
"IsAllowDelay"
),
PassBasicScore
=
base
.
ParmJObj
.
GetInt
(
"PassBasicScore"
),
IsAgain
=
base
.
ParmJObj
.
GetInt
(
"IsAgain"
),
AgainTimes
=
base
.
ParmJObj
.
GetInt
(
"AgainTimes"
),
IsGetHighScore
=
base
.
ParmJObj
.
GetInt
(
"IsGetHighScore"
),
IsLookAnswer
=
base
.
ParmJObj
.
GetInt
(
"IsLookAnswer"
),
LookAnswerType
=
base
.
ParmJObj
.
GetInt
(
"LookAnswerType"
),
IsLookScore
=
base
.
ParmJObj
.
GetInt
(
"IsLookScore"
),
IsLookQTypeScore
=
base
.
ParmJObj
.
GetInt
(
"IsLookQTypeScore"
),
IsPaste
=
base
.
ParmJObj
.
GetInt
(
"IsPaste"
),
IsAgainShowTrueFalse
=
base
.
ParmJObj
.
GetInt
(
"IsAgainShowTrueFalse"
),
IsOutOrder
=
base
.
ParmJObj
.
GetInt
(
"IsOutOrder"
),
IsRandom
=
base
.
ParmJObj
.
GetInt
(
"IsRandom"
),
RandomNum
=
base
.
ParmJObj
.
GetInt
(
"RandomNum"
),
IsSendMsg
=
base
.
ParmJObj
.
GetInt
(
"IsSendMsg"
),
SendMsgHour
=
base
.
ParmJObj
.
GetInt
(
"SendMsgHour"
),
IsWork
=
base
.
ParmJObj
.
GetInt
(
"IsWork"
),
WorkProcess
=
base
.
ParmJObj
.
GetInt
(
"WorkProcess"
),
IsBlankobj
=
base
.
ParmJObj
.
GetInt
(
"IsBlankobj"
),
IsCompletionIngoreCase
=
base
.
ParmJObj
.
GetInt
(
"IsCompletionIngoreCase"
),
IsBlankIgnoreComma
=
base
.
ParmJObj
.
GetInt
(
"IsBlankIgnoreComma"
),
IsMultiHalfScore
=
base
.
ParmJObj
.
GetInt
(
"IsMultiHalfScore"
),
};
extModel
.
UpdateBy
=
base
.
UserInfo
.
Id
;
extModel
.
UpdateTime
=
DateTime
.
Now
;
bool
flag
=
courseModule
.
SetCourseJobOtherConfigModule
(
extModel
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 删除课程作业
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
RemoveCourseJob
()
{
int
JobId
=
base
.
ParmJObj
.
GetInt
(
"JobId"
);
int
Status
=
base
.
ParmJObj
.
GetInt
(
"Status"
);
bool
flag
=
courseModule
.
RemoveCourseJobModule
(
JobId
,
Status
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
#
endregion
#
region
课程优惠价格设置
/// <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