统计查询

beetlsql3-dev
xuliangtong 2 years ago
parent 08d160e113
commit 5267c063f1

@ -24,10 +24,7 @@ public class StatisticalAnalysisService {
*
* @param map
*/
public Map<String, Object> detail(Map<String, Object> map) {
Date stime = MapUtil.getDate(map, "stime");
Date etime = MapUtil.getDate(map, "etime");
Integer teacherOpenCourseId = MapUtil.getInt(map, "teacherOpenCourseId");
public Map<String, Object> detail(String teacherOpenCourseId, Date stime, Date etime) {
Map<String, Object> data = new HashMap<>();
//班级数
data.put("classNum", 4);
@ -73,8 +70,7 @@ public class StatisticalAnalysisService {
* @param map
* @return
*/
public Map<String, Object> indexDetail(Map<String, Object> map) {
Integer teacherOpenCourseId = MapUtil.getInt(map, "teacherOpenCourseId");
public Map<String, Object> indexDetail(String teacherOpenCourseId) {
Map<String, Object> data = new HashMap<>();
//课程封面
data.put("courseInfoThumbnail", "");

@ -5,8 +5,10 @@ import com.ibeetl.jlw.service.StatisticalAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
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;
/**
@ -29,8 +31,9 @@ public class StatisticalAnalysisController {
* @return
*/
@RequestMapping("/detail.do")
public JsonResult<Object> detail(@RequestBody Map<String, Object> map) {
Map<String, Object> detail = statisticalAnalysisService.detail(map);
public JsonResult<Object> detail(@RequestParam("teacherOpenCourseId") String teacherOpenCourseId,
@RequestParam(required = false) Date stime, @RequestParam(required = false) Date etime) {
Map<String, Object> detail = statisticalAnalysisService.detail(teacherOpenCourseId, stime, etime);
return JsonResult.success(detail);
}
@ -41,8 +44,8 @@ public class StatisticalAnalysisController {
* @return
*/
@RequestMapping("/indexDetail.do")
public JsonResult<Object> indexDetail(@RequestBody Map<String, Object> map) {
Map<String, Object> detail = statisticalAnalysisService.indexDetail(map);
public JsonResult<Object> indexDetail(String teacherOpenCourseId) {
Map<String, Object> detail = statisticalAnalysisService.indexDetail(teacherOpenCourseId);
return JsonResult.success(detail);
}

Loading…
Cancel
Save