Commit 6c8782da authored by liudong1993's avatar liudong1993

1

parent 335e8794
......@@ -31,7 +31,9 @@ namespace EduSpider.WebApi.Controllers
{
ResultPageModel pmodel = JsonHelper.Deserialize<ResultPageModel>(RequestParm.Msg.ToString());
RB_Exam_Extend demodel = JsonHelper.Deserialize<RB_Exam_Extend>(RequestParm.Msg.ToString());
if (demodel.CourseId <= 0) {
return ApiResult.ParamIsNull();
}
var list = ExamService.GetExamPageList(pmodel.PageIndex, pmodel.PageSize, out long count, demodel);
pmodel.RowsCount = count;
pmodel.PageData = list.Select(x => new
......
......@@ -89,6 +89,10 @@ namespace EduSpider.WebApi.Controllers
CourseId = base.ReqParameters.GetInt("courseId")
};
List<object> result = new();
if (query.CourseId <= 0)
{
return ApiResult.ParamIsNull();
}
var list = CourseService.GetStuCourseList(query);
if (list != null && list.Count > 0)
{
......@@ -117,6 +121,12 @@ namespace EduSpider.WebApi.Controllers
{
CourseId = base.ReqParameters.GetInt("courseId")
};
if (query.CourseId <= 0)
{
return ApiResult.ParamIsNull();
}
var list = CourseService.GetCourseHomeWork(query);
return ApiResult.Success(data: list);
}
......@@ -133,6 +143,10 @@ namespace EduSpider.WebApi.Controllers
{
HomeWorkId = base.ReqParameters.GetInt("HomeWorkId")
};
if (query.HomeWorkId <= 0)
{
return ApiResult.ParamIsNull();
}
var list = CourseService.GetHomeWorkDetails(query);
return ApiResult.Success(data: list);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment