From f0f00e9ba8a755e4317e029d73b69a92ad9f9df1 Mon Sep 17 00:00:00 2001
From: kongzy <kongzy>
Date: 星期六, 14 九月 2024 17:02:41 +0800
Subject: [PATCH] update

---
 exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExStatisticController.java |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExStatisticController.java b/exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExStatisticController.java
similarity index 84%
rename from exam-admin/src/main/java/com/gkhy/exam/admin/web/ExStatisticController.java
rename to exam-admin/src/main/java/com/gkhy/exam/admin/controller/web/ExStatisticController.java
index 6425dfe..f504f97 100644
--- a/exam-admin/src/main/java/com/gkhy/exam/admin/web/ExStatisticController.java
+++ b/exam-admin/src/main/java/com/gkhy/exam/admin/controller/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));
     }
 

--
Gitblit v1.9.2