kongzy
2024-09-14 f0f00e9ba8a755e4317e029d73b69a92ad9f9df1
exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExStatisticController.java
文件名从 exam-admin/src/main/java/com/gkhy/exam/admin/web/ExStatisticController.java 修改
@@ -1,4 +1,4 @@
package com.gkhy.exam.admin.web;
package com.gkhy.exam.admin.controller.web;
import com.gkhy.exam.common.api.CommonResult;
@@ -8,6 +8,7 @@
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
@@ -40,7 +41,7 @@
            @ApiImplicitParam(paramType = "query", name = "type", dataType = "int", required = true, value = "1线上教育  2线下教育,默认1")
    })
    @GetMapping("/companyStatistic")
    public CommonResult companyStatistic(@RequestParam(required = false) Date startTime, @RequestParam(required = false) Date endTime, @RequestParam(required = false) Long companyId, @RequestParam(required = true,value = "1") Integer type) {
    public CommonResult companyStatistic(@RequestParam(required = true,defaultValue = "1") Integer type, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date startTime, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")Date endTime, @RequestParam(required = false) Long companyId) {
        return CommonResult.success(statisticService.companyStatic(companyId, startTime, endTime,type));
    }