xuhy
2023-05-06 0ad75f90e6464b95bef06c88227f521c5c03d41d
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;
    }