| | |
| | | import cn.gistack.system.user.excel.UserExcel; |
| | | import cn.gistack.system.user.mapper.UserMapper; |
| | | import cn.gistack.system.user.service.IUserDeptService; |
| | | import cn.gistack.system.user.service.IUserEncipherService; |
| | | import cn.gistack.system.user.service.IUserOauthService; |
| | | import cn.gistack.system.user.service.IUserService; |
| | | import cn.gistack.system.user.supo.UserSUPO; |
| | |
| | | private final BladeTenantProperties tenantProperties; |
| | | |
| | | private final IPwdClient pwdClient; |
| | | |
| | | private final IUserEncipherService userEncipherService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean save(User entity) { |
| | | //对User进行加密 |
| | | encryptUserInfo(entity); |
| | | return super.save(entity); |
| | | boolean saveUser = super.save(entity); |
| | | boolean saveUserEncipher = userEncipherService.save(new UserEncipher(entity)); |
| | | return saveUserEncipher && saveUser; |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public boolean updateById(User entity) { |
| | | |
| | | encryptUserInfo(entity); |
| | | boolean updateUser = super.updateById(entity); |
| | | boolean updateUserEncipher = userEncipherService.updateById(new UserEncipher(entity)); |
| | | |
| | | return super.updateById(entity); |
| | | return updateUser&&updateUserEncipher; |
| | | } |
| | | |
| | | private boolean submitUserDept(User user) { |
| | |
| | | if (Func.contains(Func.toLongArray(userIds), AuthUtil.getUserId())) { |
| | | throw new ServiceException("不能删除本账号!"); |
| | | } |
| | | return deleteLogic(Func.toLongList(userIds)); |
| | | return deleteLogic(Func.toLongList(userIds)) && userEncipherService.deleteLogic(Func.toLongList(userIds)); |
| | | } |
| | | |
| | | @Override |