|
@@ -0,0 +1,62 @@
|
|
1
|
+package com.njyunzhi.pet_identity.controller;
|
|
2
|
+
|
|
3
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
4
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
5
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
6
|
+import com.njyunzhi.pet_identity.common.BaseController;
|
|
7
|
+import com.njyunzhi.pet_identity.common.Constants;
|
|
8
|
+import com.njyunzhi.pet_identity.common.ResponseBean;
|
|
9
|
+import com.njyunzhi.pet_identity.vo.StatisValue;
|
|
10
|
+import io.swagger.annotations.Api;
|
|
11
|
+import io.swagger.annotations.ApiOperation;
|
|
12
|
+import io.swagger.annotations.ApiParam;
|
|
13
|
+import org.slf4j.Logger;
|
|
14
|
+import org.slf4j.LoggerFactory;
|
|
15
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
16
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
17
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
18
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
19
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
20
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
21
|
+import com.njyunzhi.pet_identity.service.ITsCommonFormService;
|
|
22
|
+import com.njyunzhi.pet_identity.entity.TsCommonForm;
|
|
23
|
+import org.springframework.web.bind.annotation.RestController;
|
|
24
|
+
|
|
25
|
+import java.util.List;
|
|
26
|
+
|
|
27
|
+/**
|
|
28
|
+ * <p>
|
|
29
|
+ * 通用统计 前端控制器
|
|
30
|
+ * </p>
|
|
31
|
+ *
|
|
32
|
+ * @author yansen
|
|
33
|
+ * @since 2022-05-28
|
|
34
|
+ */
|
|
35
|
+
|
|
36
|
+@Api(tags = "通用统计")
|
|
37
|
+@RestController
|
|
38
|
+@RequestMapping("/admin/statis")
|
|
39
|
+public class TsCommonFormController extends BaseController {
|
|
40
|
+
|
|
41
|
+ private final Logger logger = LoggerFactory.getLogger(TsCommonFormController.class);
|
|
42
|
+
|
|
43
|
+ @Autowired
|
|
44
|
+ public ITsCommonFormService iTsCommonFormService;
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+ /**
|
|
48
|
+ * 统计日提交
|
|
49
|
+ * @param startDate
|
|
50
|
+ * @param days
|
|
51
|
+ * @return
|
|
52
|
+ */
|
|
53
|
+ @RequestMapping(value="/applyDaily",method= RequestMethod.GET)
|
|
54
|
+ @ApiOperation(value="统计日提交", notes = "统计日提交", httpMethod = "GET", response = ResponseBean.class)
|
|
55
|
+ public ResponseBean getApplyDaily(@ApiParam(value = "起始日期", example = "2022-05-01") @RequestParam(value ="startDate") String startDate,
|
|
56
|
+ @ApiParam("统计天数") @RequestParam(value ="days",defaultValue = "10") Integer days) throws Exception{
|
|
57
|
+
|
|
58
|
+ List<StatisValue> result = iTsCommonFormService.getStatisDataBy(Constants.STATIS_APPLICATION_DAILY, startDate, days);
|
|
59
|
+ return ResponseBean.success(result);
|
|
60
|
+ }
|
|
61
|
+
|
|
62
|
+}
|