|
@@ -18,6 +18,8 @@ import com.gyee.exam.modules.course.dto.request.UserCourseReqDTO;
|
|
import com.gyee.exam.modules.course.dto.response.UserCourseRespDTO;
|
|
import com.gyee.exam.modules.course.dto.response.UserCourseRespDTO;
|
|
import com.gyee.exam.modules.course.entity.Course;
|
|
import com.gyee.exam.modules.course.entity.Course;
|
|
import com.gyee.exam.modules.course.service.CourseService;
|
|
import com.gyee.exam.modules.course.service.CourseService;
|
|
|
|
+import com.gyee.exam.modules.qu.service.QuService;
|
|
|
|
+import com.gyee.exam.modules.tmpl.service.TmplService;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.apache.shiro.authz.annotation.Logical;
|
|
import org.apache.shiro.authz.annotation.Logical;
|
|
@@ -25,6 +27,9 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.Map;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 课程信息控制器
|
|
* 课程信息控制器
|
|
@@ -41,6 +46,12 @@ public class CourseController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private CourseService baseService;
|
|
private CourseService baseService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TmplService tmplService;
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private QuService quService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 添加或修改
|
|
* 添加或修改
|
|
* @param reqDTO
|
|
* @param reqDTO
|
|
@@ -150,14 +161,23 @@ public class CourseController extends BaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
- * 统计总课程数
|
|
|
|
|
|
+ * 统计课程,题目、试卷总数
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "统计总课程数")
|
|
@ApiOperation(value = "统计总课程数")
|
|
- @GetMapping("/course-total")
|
|
|
|
|
|
+ @GetMapping("/ctt-total")
|
|
public ApiRest courseAllTotal() {
|
|
public ApiRest courseAllTotal() {
|
|
- int total = baseService.courseAllTotal();
|
|
|
|
- return super.success(total);
|
|
|
|
|
|
+ Map map = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ int coursetotal = baseService.courseAllTotal();
|
|
|
|
+ int tmpltotal = tmplService.tmplTotal();
|
|
|
|
+ int titletotal = quService.titleTotal();
|
|
|
|
+
|
|
|
|
+ map.put("course",coursetotal);
|
|
|
|
+ map.put("tmpl",tmpltotal);
|
|
|
|
+ map.put("title",titletotal);
|
|
|
|
+
|
|
|
|
+ return super.success(map);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|