| | |
| | | package com.se.simu.controller; |
| | | |
| | | import com.se.simu.helper.WebHelper; |
| | | import com.se.simu.service.SedbService; |
| | | import com.se.simu.service.WaterService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.http.HttpStatus; |
| | |
| | | @RestController |
| | | @RequestMapping("/waterlogging") |
| | | public class WaterController { |
| | | @Resource |
| | | SedbService sedbService; |
| | | |
| | | @Resource |
| | | WaterService waterService; |
| | | |
| | |
| | | if (null == height || height < MIN_SIZE || height > MAX_SIZE) { |
| | | return WebHelper.writeJson2Page(res, HttpStatus.BAD_REQUEST, "图像高度不能为空且取值范围为" + MIN_SIZE + "~" + MAX_SIZE + "之间"); |
| | | } |
| | | if (null == timestamp || timestamp < Y2000) { |
| | | return WebHelper.writeJson2Page(res, HttpStatus.BAD_REQUEST, "时间不能为空且大于2000年"); |
| | | if (null == timestamp || timestamp < 0) { |
| | | return WebHelper.writeJson2Page(res, HttpStatus.BAD_REQUEST, "时间不能为空且大于0"); |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | |
| | | @GetMapping("/test") |
| | | public Object test() { |
| | | return sedbService.getToken(); |
| | | } |
| | | } |