| | |
| | | } |
| | | |
| | | @Override |
| | | public User userByPhone(String tenantId, String phone) { |
| | | return baseMapper.selectOne(Wrappers.<User>query().lambda().eq(User::getTenantId, tenantId).eq(User::getPhone, phone).eq(User::getIsDeleted, BladeConstant.DB_NOT_DELETED)); |
| | | } |
| | | |
| | | @Override |
| | | public UserInfo userInfo(Long userId) { |
| | | User user = baseMapper.selectById(userId); |
| | | return buildUserInfo(user); |
| | | } |
| | | |
| | | @Override |
| | | public UserInfo userInfo(String tenantId, String phone) { |
| | | User user = userByPhone(tenantId, phone); |
| | | return buildUserInfo(user); |
| | | } |
| | | |
| | |
| | | user.setPostId(Func.toStrWithEmpty(SysCache.getPostIds(userExcel.getTenantId(), userExcel.getPostName()), StringPool.EMPTY)); |
| | | // 设置角色ID |
| | | user.setRoleId(Func.toStrWithEmpty(SysCache.getRoleIds(userExcel.getTenantId(), userExcel.getRoleName()), StringPool.EMPTY)); |
| | | // 设置员工类型 |
| | | user.setEmployeeType(Func.toInt(DictCache.getKey(DictEnum.EMPLOYEE_TYPE, userExcel.getEmployeeType()), 1)); |
| | | // 设置学历 |
| | | user.setEducationBackground(Func.toStr(DictCache.getKey(DictEnum.EDUCATION_BACKGROUND, userExcel.getEducationBackground()), "1")); |
| | | // 设置租户ID |
| | | if (!AuthUtil.isAdministrator() || StringUtil.isBlank(user.getTenantId())) { |
| | | user.setTenantId(AuthUtil.getTenantId()); |