From 67ac6f18da66cc5b703e1ec849e96bdac586d6d1 Mon Sep 17 00:00:00 2001 From: xuhy <3313886187@qq.com> Date: 星期三, 10 五月 2023 18:16:26 +0800 Subject: [PATCH] BUG修改 --- management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java index a4b60b0..22915a7 100644 --- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java +++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java @@ -7,6 +7,7 @@ import com.stylefeng.guns.core.shiro.ShiroKit; import com.stylefeng.guns.modular.system.controller.resp.TBranchOfficeResp; import com.stylefeng.guns.modular.system.controller.resp.TDriverResp; +import com.stylefeng.guns.modular.system.enums.StatusEnum; import com.stylefeng.guns.modular.system.model.*; import com.stylefeng.guns.modular.system.service.ITRegionService; import com.stylefeng.guns.modular.system.service.ITSystemConfigService; @@ -231,7 +232,7 @@ @ResponseBody public Object start(Integer id) { TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); - tBranchOffice.setStatus(1); + tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); tBranchOfficeService.updateById(tBranchOffice); return SUCCESS_TIP; } @@ -243,7 +244,7 @@ @ResponseBody public Object updateStatus(Integer id) { TBranchOffice tBranchOffice = tBranchOfficeService.selectById(id); - tBranchOffice.setStatus(2); + tBranchOffice.setStatus(StatusEnum.FREEZE.getCode()); tBranchOfficeService.updateById(tBranchOffice); return SUCCESS_TIP; } @@ -272,7 +273,8 @@ if(Objects.nonNull(o)){ return o; } - tBranchOffice.setStatus(1); + tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); + tBranchOffice.setStatus(StatusEnum.NORMAL.getCode()); tBranchOfficeService.insert(tBranchOffice); return SUCCESS_TIP; @@ -284,7 +286,9 @@ @RequestMapping(value = "/delete") @ResponseBody public Object delete(@RequestParam Integer tBranchOfficeId) { - tBranchOfficeService.deleteById(tBranchOfficeId); + TBranchOffice tBranchOffice = tBranchOfficeService.selectById(tBranchOfficeId); + tBranchOffice.setStatus(StatusEnum.DELETE.getCode()); + tBranchOfficeService.updateById(tBranchOffice); return SUCCESS_TIP; } @@ -305,6 +309,7 @@ if(Objects.nonNull(o)){ return o; } + tBranchOffice.setPrincipal(tBranchOffice.getPrincipal().replace(" ","")); tBranchOfficeService.updateById(tBranchOffice); return SUCCESS_TIP; } -- Gitblit v1.7.1