From 453e3471e94b91169beec1e258a06a132d927011 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期一, 02 十二月 2024 15:01:50 +0800 Subject: [PATCH] 1 --- src/main/java/com/yssh/controller/ForecastAnalyseController.java | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/yssh/controller/ForecastAnalyseController.java b/src/main/java/com/yssh/controller/ForecastAnalyseController.java index a2ec6f5..c2450b8 100644 --- a/src/main/java/com/yssh/controller/ForecastAnalyseController.java +++ b/src/main/java/com/yssh/controller/ForecastAnalyseController.java @@ -1,38 +1,39 @@ package com.yssh.controller; +import com.yssh.entity.ForecastAnalyseVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.Date; import java.util.List; -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; import org.springframework.web.bind.annotation.RestController; -import com.yssh.entity.vo.ForecastAnalyseVo; -import com.yssh.service.IForecastAnalyseService; +import com.yssh.service.ForecastAnalyseService; import com.yssh.utils.Result; + +import javax.annotation.Resource; @Api(tags="棰勬祴鍒嗘瀽") @RestController @RequestMapping("/forecast") @SuppressWarnings("rawtypes") public class ForecastAnalyseController { + @Resource + private ForecastAnalyseService forecastAnalyseService; - @Autowired - private IForecastAnalyseService forecastAnalyseService; - @GetMapping("/forecastAnalyse") - @ApiOperation(value = "鏌ヨ棰勮鍙婂叾瀹為檯鐩戞祴鏁版嵁", notes = "鏍规嵁鎵�閫夌偣浣嶅悕绉板強鍏舵墍閫夋椂闂存锛屾煡璇㈣鐐逛綅鍦ㄦ寚瀹氭椂闂存鍐呯殑鐩戞祴鏁版嵁鍙婂叾棰勬祴鏁版嵁") - public Result getForecastAnalyse( - @RequestParam(value = "name", required = true) String name, - @RequestParam(value = "beginTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date beginTime, - @RequestParam(value = "endTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime){ + @ApiOperation(value = "鏌ヨ棰勮鍙婂叾瀹為檯鐩戞祴鏁版嵁", notes = "鏍规嵁鎵�閫夌偣浣嶅悕绉板強鍏舵墍閫夋椂闂存锛屾煡璇㈣鐐逛綅鍦ㄦ寚瀹氭椂闂存鍐呯殑鐩戞祴鏁版嵁鍙婂叾棰勬祴鏁版嵁") + public Result getForecastAnalyse( + @RequestParam(value = "name", required = true) String name, + @RequestParam(value = "beginTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date beginTime, + @RequestParam(value = "endTime", required = true) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date endTime) { List<ForecastAnalyseVo> list = forecastAnalyseService.getForecastAnalyse(name, beginTime, endTime); - return Result.OK(list); - } + + return Result.OK(list); + } } -- Gitblit v1.9.3