From 6865cca09210a9a0d121064892a2121d40629841 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期五, 17 三月 2023 17:17:01 +0800
Subject: [PATCH] 广播设置,假删除修改

---
 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TBranchOfficeController.java |   11 +++++++----
 1 files changed, 7 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..170c2b7 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,7 @@
         if(Objects.nonNull(o)){
             return o;
         }
-        tBranchOffice.setStatus(1);
+        tBranchOffice.setStatus(StatusEnum.NORMAL.getCode());
 
         tBranchOfficeService.insert(tBranchOffice);
         return SUCCESS_TIP;
@@ -284,7 +285,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;
     }
 

--
Gitblit v1.7.1