| | |
| | | |
| | | @Autowired |
| | | private ITSiteService siteService; |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | storeService.save(tStore); |
| | | user.setObjectId(tStore.getId()); |
| | | |
| | | userService.updateById(user); |
| | | |
| | | |
| | | |
| | |
| | | @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(); |
| | |
| | | @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(); |