jinpengyong
2023-11-08 72a6d5a954312a8a53e5bdd18c5f8f8b57b54dbc
screen-api/src/main/java/com/moral/api/controller/RectifyController.java
@@ -13,6 +13,8 @@
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;
@@ -63,6 +65,16 @@
        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) {