| | |
| | | page.setRecords(list); |
| | | return super.packForBT(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/listOne") |
| | | @ResponseBody |
| | | public Object listOne(Integer id) { |
| | |
| | | String space_id = data.getString("space_id"); |
| | | Integer integer = Integer.valueOf(space_id); |
| | | tStore.setId(integer); |
| | | User storeManager = createStoreManager(userName, tStore.getPhone(), tStore.getId()); |
| | | userMapper.insert(storeManager); |
| | | tStore.setStoreStaffId(storeManager.getId()); |
| | | // User storeManager = createStoreManager(userName, tStore.getPhone(), tStore.getId()); |
| | | // userMapper.insert(storeManager); |
| | | // tStore.setStoreStaffId(storeManager.getId()); |
| | | storeService.save(tStore); |
| | | ArrayList<StoreConfig> storeConfigs = new ArrayList<>(); |
| | | for (int i = 1; i < 9; i++) { |
| | |
| | | if (UserExt.getUser().getObjectType()==2){ |
| | | tStore.setOperatorId(null); |
| | | } |
| | | User storeManager = byIdc.getStoreStaffId() == null ? null : userMapper.selectById(byIdc.getStoreStaffId()); |
| | | if (storeManager == null) { |
| | | storeManager = createStoreManager(userName, tStore.getPhone(), tStore.getId()); |
| | | userMapper.insert(storeManager); |
| | | tStore.setStoreStaffId(storeManager.getId()); |
| | | } else { |
| | | storeManager.setName(userName); |
| | | storeManager.setPhone(tStore.getPhone()); |
| | | storeManager.setAccount(tStore.getPhone()); |
| | | userMapper.updateById(storeManager); |
| | | } |
| | | // User storeManager = byIdc.getStoreStaffId() == null ? null : userMapper.selectById(byIdc.getStoreStaffId()); |
| | | // if (storeManager == null) { |
| | | // storeManager = createStoreManager(userName, tStore.getPhone(), tStore.getId()); |
| | | // userMapper.insert(storeManager); |
| | | // tStore.setStoreStaffId(storeManager.getId()); |
| | | // } else { |
| | | // storeManager.setName(userName); |
| | | // storeManager.setPhone(tStore.getPhone()); |
| | | // storeManager.setAccount(tStore.getPhone()); |
| | | // userMapper.updateById(storeManager); |
| | | // } |
| | | storeService.updateById(tStore); |
| | | |
| | | return new SuccessTip<>(); |