From c743f4413a00fc063bbbd9d851b6d0c3fff10581 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期一, 31 七月 2023 10:04:02 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java | 41 +++++++++++++++++++++++++++++++++++++++++ 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java b/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java index c3d307b..adeae61 100644 --- a/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java +++ b/cloud-server-account/src/main/java/com/dsh/account/controller/CityController.java @@ -76,4 +76,45 @@ } + @PostMapping("/base/city/getById") + public TCityManager getById(@RequestBody Integer id){ + try { + return cityService.getById(id); + }catch (Exception e){ + e.printStackTrace(); + return null; + } + } + + + @PostMapping("/base/city/update") + public void update(@RequestBody TCityManager manager){ + try { + cityService.updateById(manager); + }catch (Exception e){ + e.printStackTrace(); + } + } + + + @PostMapping("/base/city/freeze") + public void freeze(@RequestBody Integer id){ + try { + TCityManager byId = cityService.getById(id); + byId.setState(2); + cityService.updateById(byId); + }catch (Exception e){ + e.printStackTrace(); + } + } + @PostMapping("/base/city/unfreeze") + public void unfreeze(@RequestBody Integer id){ + try { + TCityManager byId = cityService.getById(id); + byId.setState(1); + cityService.updateById(byId); + }catch (Exception e){ + e.printStackTrace(); + } + } } -- Gitblit v1.7.1