|
@@ -4,8 +4,11 @@ package com.cdf.controller.api;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.cdf.common.ResultData;
|
|
|
import com.cdf.entity.PageData;
|
|
|
+import com.cdf.entity.TotalData;
|
|
|
import com.cdf.service.IPageDataService;
|
|
|
+import com.cdf.service.ITotalDataService;
|
|
|
import com.cdf.util.DateUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -26,6 +29,8 @@ public class PageDataApiController {
|
|
|
|
|
|
@Autowired
|
|
|
IPageDataService pageDataService;
|
|
|
+ @Autowired
|
|
|
+ ITotalDataService totalDataService;
|
|
|
|
|
|
|
|
|
@GetMapping("/Point")
|
|
@@ -84,5 +89,12 @@ public class PageDataApiController {
|
|
|
return ResultData.ok();
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/pageData")
|
|
|
+ public ResultData getPageData(@RequestParam (required = false) String day){
|
|
|
+ if(StringUtils.isEmpty(day)){
|
|
|
+ day = DateUtil.getDay(new Date(),-1);
|
|
|
+ }
|
|
|
+ return ResultData.ok(totalDataService.getById(day));
|
|
|
+ }
|
|
|
}
|
|
|
|