44323
2023-11-09 4f47865c3b8132f097cc32fe9bd8e0fa12469786
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/TShopController.java
@@ -82,6 +82,8 @@
    @Autowired
    private ITSiteService siteService;
    @Autowired
    private IUserService userService;
    /**
@@ -497,7 +499,7 @@
                }
            storeService.save(tStore);
            user.setObjectId(tStore.getId());
            userService.updateById(user);
@@ -859,9 +861,15 @@
    @ResponseBody
    public Object freeze(Integer id) {
        try {
            TStore byId = storeService.getById(id);
            byId.setState(2);
            storeService.updateById(byId);
            // 查询门店 获取门店店长id
            TStore store = storeService.getById(id);
            // 冻结
            store.setState(2);
            storeService.updateById(store);
            Integer storeStaffId = store.getStoreStaffId();
            User user = userService.getById(storeStaffId);
            user.setStatus(2);
            userService.updateById(user);
            return SUCCESS_TIP;
        }catch (Exception e){
            e.printStackTrace();
@@ -872,9 +880,15 @@
    @ResponseBody
    public Object unfreeze(Integer id) {
        try {
            TStore byId = storeService.getById(id);
            byId.setState(1);
            storeService.updateById(byId);
            // 查询门店 获取门店店长id
            TStore store = storeService.getById(id);
            // 解冻
            store.setState(1);
            storeService.updateById(store);
            Integer storeStaffId = store.getStoreStaffId();
            User user = userService.getById(storeStaffId);
            user.setStatus(1);
            userService.updateById(user);
            return SUCCESS_TIP;
        }catch (Exception e){
            e.printStackTrace();