| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Collections; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | return ResultMessage.ok(response); |
| | | } |
| | | |
| | | @GetMapping("exportRectify") |
| | | public ResultMessage exportRectify(HttpServletRequest request) { |
| | | Map<String, Object> params = WebUtils.getParametersStartingWith(request, null); |
| | | if (params.get("cityCode") == null || params.get("time") == null) { |
| | | return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(), ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg()); |
| | | } |
| | | List<Rectify> rectifies = rectifyService.exportRectifyByCityCode(params); |
| | | return ResultMessage.ok(rectifies); |
| | | } |
| | | |
| | | @PostMapping("updateRectify") |
| | | public ResultMessage updateRectify(@RequestBody Rectify rectify) { |
| | | if (rectify.getId() == null) { |