You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.6 KiB
Java
78 lines
2.6 KiB
Java
package com.ibeetl.jlw.web;
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
import com.ibeetl.jlw.service.StatisticalAnalysisService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.Date;
|
|
import java.util.Map;
|
|
|
|
/**
|
|
* 统计分析web
|
|
*
|
|
* @Version 0.0.1
|
|
* @Author 许良彤
|
|
* @Date 2022/10/6 11:08
|
|
*/
|
|
@RestController
|
|
@RequestMapping("/api/statisticalAnalysis")
|
|
public class StatisticalAnalysisController {
|
|
|
|
@Autowired
|
|
private StatisticalAnalysisService statisticalAnalysisService;
|
|
|
|
/**
|
|
* 统计分析数据
|
|
* @param map
|
|
* @return
|
|
*/
|
|
@RequestMapping("/detail.do")
|
|
public JsonResult<Object> detail(@RequestParam("teacherOpenCourseId") Long teacherOpenCourseId,
|
|
@RequestParam(required = false) Date stime, @RequestParam(required = false) Date etime) {
|
|
Map<String, Object> detail = statisticalAnalysisService.detail(teacherOpenCourseId, stime, etime);
|
|
return JsonResult.success(detail);
|
|
|
|
}
|
|
|
|
/**
|
|
* 首页数据
|
|
* @param map
|
|
* @return
|
|
*/
|
|
@RequestMapping("/indexDetail.do")
|
|
public JsonResult<Object> indexDetail(String teacherOpenCourseId) {
|
|
Map<String, Object> detail = statisticalAnalysisService.indexDetail(teacherOpenCourseId);
|
|
return JsonResult.success(detail);
|
|
}
|
|
|
|
/**
|
|
* 管理员端首页查询
|
|
* @param stime 开始时间
|
|
* @param etime 结束时间
|
|
* @param universitiesCollegesId 院校id
|
|
* @return
|
|
*/
|
|
@RequestMapping("/adminIndexDetail.do")
|
|
public JsonResult<Object> adminIndexDetail(@RequestParam(value = "stime", required = false) Date stime,
|
|
@RequestParam(value = "etime", required = false) Date etime,
|
|
@RequestParam(value = "etime", required = false) String universitiesCollegesId
|
|
|
|
) {
|
|
Map<String, Object> detail = statisticalAnalysisService.adminIndexDetail(stime, etime, universitiesCollegesId);
|
|
return JsonResult.success(detail);
|
|
}
|
|
|
|
/**
|
|
* 柱状图
|
|
*/
|
|
@RequestMapping("/adminIndexBarchart.do")
|
|
public JsonResult<Object> adminIndexBarchart(@RequestParam(value = "stime", required = false) Date stime, @RequestParam(value = "etime", required = false) Date etime) {
|
|
Map<String, Object> detail = statisticalAnalysisService.adminIndexBarchart(stime, etime);
|
|
return JsonResult.success(detail);
|
|
}
|
|
|
|
|
|
} |