|
@@ -6,33 +6,28 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.google.gson.Gson;
|
|
import com.google.gson.Gson;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
import com.qmth.boot.api.exception.ApiException;
|
|
import com.qmth.paper.library.common.bean.auth.AuthBean;
|
|
import com.qmth.paper.library.common.bean.auth.AuthBean;
|
|
-import com.qmth.paper.library.common.bean.dto.CloudUserPushStatusDto;
|
|
|
|
-import com.qmth.paper.library.common.bean.dto.LoginDto;
|
|
|
|
import com.qmth.paper.library.common.bean.dto.VerifyCodeCheckDto;
|
|
import com.qmth.paper.library.common.bean.dto.VerifyCodeCheckDto;
|
|
-import com.qmth.paper.library.common.bean.dto.excel.DescribeImportDto;
|
|
|
|
-import com.qmth.paper.library.common.bean.dto.excel.SysUserImportDto;
|
|
|
|
import com.qmth.paper.library.common.bean.params.ApproveUserResult;
|
|
import com.qmth.paper.library.common.bean.params.ApproveUserResult;
|
|
import com.qmth.paper.library.common.bean.params.UserSaveParams;
|
|
import com.qmth.paper.library.common.bean.params.UserSaveParams;
|
|
-import com.qmth.paper.library.common.bean.params.UserSaveReportParams;
|
|
|
|
import com.qmth.paper.library.common.bean.result.*;
|
|
import com.qmth.paper.library.common.bean.result.*;
|
|
import com.qmth.paper.library.common.config.DictionaryConfig;
|
|
import com.qmth.paper.library.common.config.DictionaryConfig;
|
|
import com.qmth.paper.library.common.contant.SpringContextHolder;
|
|
import com.qmth.paper.library.common.contant.SpringContextHolder;
|
|
import com.qmth.paper.library.common.contant.SystemConstant;
|
|
import com.qmth.paper.library.common.contant.SystemConstant;
|
|
import com.qmth.paper.library.common.entity.*;
|
|
import com.qmth.paper.library.common.entity.*;
|
|
-import com.qmth.paper.library.common.enums.*;
|
|
|
|
|
|
+import com.qmth.paper.library.common.enums.AppSourceEnum;
|
|
|
|
+import com.qmth.paper.library.common.enums.ExceptionResultEnum;
|
|
|
|
+import com.qmth.paper.library.common.enums.FieldUniqueEnum;
|
|
|
|
+import com.qmth.paper.library.common.enums.RoleTypeEnum;
|
|
import com.qmth.paper.library.common.enums.userPush.SpecialPrivilegeEnum;
|
|
import com.qmth.paper.library.common.enums.userPush.SpecialPrivilegeEnum;
|
|
-import com.qmth.paper.library.common.enums.userPush.UserPushResultEnum;
|
|
|
|
import com.qmth.paper.library.common.mapper.SysUserMapper;
|
|
import com.qmth.paper.library.common.mapper.SysUserMapper;
|
|
import com.qmth.paper.library.common.service.*;
|
|
import com.qmth.paper.library.common.service.*;
|
|
import com.qmth.paper.library.common.util.Base64Util;
|
|
import com.qmth.paper.library.common.util.Base64Util;
|
|
import com.qmth.paper.library.common.util.ResultUtil;
|
|
import com.qmth.paper.library.common.util.ResultUtil;
|
|
import com.qmth.paper.library.common.util.ServletUtil;
|
|
import com.qmth.paper.library.common.util.ServletUtil;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
-import org.springframework.beans.BeanUtils;
|
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
-import org.springframework.util.LinkedMultiValueMap;
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.security.NoSuchAlgorithmException;
|
|
import java.security.NoSuchAlgorithmException;
|
|
@@ -90,6 +85,50 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
@Resource
|
|
@Resource
|
|
SysRoleGroupMemberService sysRoleGroupMemberService;
|
|
SysRoleGroupMemberService sysRoleGroupMemberService;
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public SpecialPrivilegeEnum findUserSpecialPrivilegeByUserId(Long userId, Long schoolId) {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 知学知考评卷员-科组长角色
|
|
|
|
+ boolean markerRole = this.includeSysRole(userId, RoleTypeEnum.MARKER);
|
|
|
|
+ boolean leaderRole = this.includeSysRole(userId, RoleTypeEnum.MARKER_LEADER);
|
|
|
|
+
|
|
|
|
+ // 记录的云阅卷应该的状态(云阅卷自己不改)
|
|
|
|
+ boolean cloudMarker = true;
|
|
|
|
+ boolean cloudLeader = true;
|
|
|
|
+// List<CloudUserPushStatusDto> userPushDtoList = this.baseMapper.findCloudUserPushStatus(userId, schoolId);
|
|
|
|
+// if (userPushDtoList != null) {
|
|
|
|
+// if (userPushDtoList.size() > 1) {
|
|
|
|
+// String userName = this.getById(userId).getLoginName();
|
|
|
|
+// throw ExceptionResultEnum.ERROR.exception("用户【" + userName + "】存在多条推送状态记录异常");
|
|
|
|
+// }
|
|
|
|
+// if (userPushDtoList.size() == 1) {
|
|
|
|
+// CloudUserPushStatusDto pushStatusDto = userPushDtoList.get(0);
|
|
|
|
+// if (!UserPushResultEnum.BIND_SUCCESS.equals(UserPushResultEnum.valueOf(pushStatusDto.getMarkerStatus()))) {
|
|
|
|
+// // 有推送记录但推送状态不是评卷员绑定成功
|
|
|
|
+// cloudMarker = false;
|
|
|
|
+// }
|
|
|
|
+// if (!UserPushResultEnum.BIND_SUCCESS.equals(UserPushResultEnum.valueOf(pushStatusDto.getMarkerLeaderStatus()))) {
|
|
|
|
+// // 有推送记录但推送状态不是科组长绑定成功
|
|
|
|
+// cloudLeader = false;
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+ boolean marker = markerRole && cloudMarker;
|
|
|
|
+ boolean leader = leaderRole && cloudLeader;
|
|
|
|
+
|
|
|
|
+ SpecialPrivilegeEnum result;
|
|
|
|
+ if (marker && leader) {
|
|
|
|
+ result = SpecialPrivilegeEnum.COMPOSITE;
|
|
|
|
+ } else if (marker) {
|
|
|
|
+ result = SpecialPrivilegeEnum.MARKER;
|
|
|
|
+ } else if (leader) {
|
|
|
|
+ result = SpecialPrivilegeEnum.SUBJECT_HEADER;
|
|
|
|
+ } else {
|
|
|
|
+ result = SpecialPrivilegeEnum.UNIDENTIFIED;
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
@@ -97,19 +136,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return saveUserCommon(userSaveParams, null);
|
|
return saveUserCommon(userSaveParams, null);
|
|
}
|
|
}
|
|
|
|
|
|
- /**
|
|
|
|
- * 保存用户
|
|
|
|
- *
|
|
|
|
- * @return 结果
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public boolean saveUserReport(UserSaveReportParams userSaveReportParams) {
|
|
|
|
- Gson gson = new Gson();
|
|
|
|
- UserSaveParams userSaveParams = gson.fromJson(gson.toJson(userSaveReportParams), UserSaveParams.class);
|
|
|
|
- saveUserCommon(userSaveParams, null);
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Transactional
|
|
@Transactional
|
|
@Override
|
|
@Override
|
|
public boolean enable(SysUser user) throws NoSuchAlgorithmException, IllegalAccessException {
|
|
public boolean enable(SysUser user) throws NoSuchAlgorithmException, IllegalAccessException {
|
|
@@ -124,19 +150,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return success;
|
|
return success;
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public boolean enableReport(SysUser user) throws NoSuchAlgorithmException {
|
|
|
|
- UpdateWrapper<SysUser> updateWrapper = new UpdateWrapper<>();
|
|
|
|
- updateWrapper.lambda().set(SysUser::getEnable, user.getEnable()).eq(SysUser::getId, user.getId());
|
|
|
|
-
|
|
|
|
- boolean success = this.update(updateWrapper);
|
|
|
|
- //如果状态为禁用,需要踢下线重新登录
|
|
|
|
- if (!user.getEnable()) {
|
|
|
|
- commonService.removeUserInfo(user.getId(), true);
|
|
|
|
- }
|
|
|
|
- return success;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public boolean resetPassword(Long id) throws NoSuchAlgorithmException {
|
|
public boolean resetPassword(Long id) throws NoSuchAlgorithmException {
|
|
SysConfig sysConfig = sysConfigService.getByKey("sys.user.initPassword");
|
|
SysConfig sysConfig = sysConfigService.getByKey("sys.user.initPassword");
|
|
@@ -296,28 +309,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return sysUserRoleService.saveBatch(list);
|
|
return sysUserRoleService.saveBatch(list);
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public LoginDto getUserRoles(SysUser sysUser) {
|
|
|
|
- LoginDto loginDto = new LoginDto();
|
|
|
|
- loginDto.setId(String.valueOf(sysUser.getId()));
|
|
|
|
- loginDto.setSchoolId(String.valueOf(sysUser.getSchoolId()));
|
|
|
|
- loginDto.setLoginName(sysUser.getLoginName());
|
|
|
|
- loginDto.setRealName(sysUser.getRealName());
|
|
|
|
- loginDto.setOrgId(String.valueOf(sysUser.getOrgId()));
|
|
|
|
- loginDto.setEnable(sysUser.getEnable());
|
|
|
|
- loginDto.setPwdUpdateTime(sysUser.getPwdUpdateTime());
|
|
|
|
-
|
|
|
|
- if ("admin".equals(sysUser.getLoginName())) {
|
|
|
|
- loginDto.setRoles(Arrays.asList("ADMIN"));
|
|
|
|
- } else {
|
|
|
|
- List<SysRole> list = sysUserRoleService.listRoleByUserId(sysUser.getId());
|
|
|
|
- List<String> roles = list.stream().map(m -> m.getType().name()).collect(Collectors.toList());
|
|
|
|
- loginDto.setRoles(roles);
|
|
|
|
- }
|
|
|
|
- return loginDto;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public List<SysUser> listByOrgId(Long id) {
|
|
public List<SysUser> listByOrgId(Long id) {
|
|
QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
|
|
@@ -332,19 +323,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return SystemConstant.longNotNull(upUserId);
|
|
return SystemConstant.longNotNull(upUserId);
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public SysUser findByForeignKey(Long schoolId, String teacherCode) {
|
|
|
|
- List<SysUser> tbSchoolTeacherList = this.list(new QueryWrapper<SysUser>().lambda()
|
|
|
|
- .eq(SysUser::getSchoolId, schoolId)
|
|
|
|
- .eq(SysUser::getLoginName, teacherCode));
|
|
|
|
- SysRole sysRole = sysRoleService.getOne(new QueryWrapper<SysRole>().lambda().eq(SysRole::getType, RoleTypeEnum.TEACHER));
|
|
|
|
-// tbSchoolTeacherList = tbSchoolTeacherList.stream().filter(e -> Arrays.asList(e.getRoleIds()).contains(sysRole.getId())).collect(Collectors.toList());
|
|
|
|
- if (tbSchoolTeacherList.size() != 1) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("教师基础数据信息异常");
|
|
|
|
- }
|
|
|
|
- return tbSchoolTeacherList.get(0);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 保存用户公用
|
|
* 保存用户公用
|
|
*
|
|
*
|
|
@@ -550,78 +528,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return isSuccess;
|
|
return isSuccess;
|
|
}
|
|
}
|
|
|
|
|
|
- @Transactional
|
|
|
|
- @Override
|
|
|
|
- public Map<String, Object> executeSysUserImportLogic(List<LinkedMultiValueMap<Integer, Object>> finalList, Map<String, Object> map) {
|
|
|
|
- SysUser requestUser = (SysUser) map.get(SystemConstant.SYS_USER);
|
|
|
|
- Long schoolId = requestUser.getSchoolId();
|
|
|
|
- List<Long> userIdList = new ArrayList<>();
|
|
|
|
- for (int i = 0; i < finalList.size(); i++) {
|
|
|
|
- LinkedMultiValueMap<Integer, Object> excelMap = finalList.get(i);
|
|
|
|
- List<Object> sysUserImportDtoList = excelMap.get(i);
|
|
|
|
- assert sysUserImportDtoList != null;
|
|
|
|
- if (sysUserImportDtoList.get(0) instanceof DescribeImportDto) {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- // 处理机构
|
|
|
|
- if (sysUserImportDtoList.get(0) instanceof SysUserImportDto) {
|
|
|
|
- List<SysUserImportDto> datasource = sysUserImportDtoList.stream().map(e -> {
|
|
|
|
- SysUserImportDto sysUserImportDto = new SysUserImportDto();
|
|
|
|
- BeanUtils.copyProperties(e, sysUserImportDto);
|
|
|
|
- return sysUserImportDto;
|
|
|
|
- }).collect(Collectors.toList());
|
|
|
|
- // 机构信息
|
|
|
|
- List<String> orgInfoList = datasource.stream().map(SysUserImportDto::getOrgName).distinct().collect(Collectors.toList());
|
|
|
|
- // 提前创建或获取机构信息并存入map
|
|
|
|
- Map<String, Long> orgInfoMap = sysOrgService.createOrGetOrgByOrgInfo(orgInfoList, requestUser);
|
|
|
|
- for (SysUserImportDto sysUserImportDto : datasource) {
|
|
|
|
- String name = sysUserImportDto.getName();
|
|
|
|
- String code = sysUserImportDto.getCode();
|
|
|
|
- String phoneNumber = sysUserImportDto.getPhoneNumber();
|
|
|
|
- String orgName = sysUserImportDto.getOrgName();
|
|
|
|
- if (!orgInfoMap.containsKey(orgName)) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("在解析的机构map集合中,没有找到excel数据中的用户机构名称【" + orgName + "】");
|
|
|
|
- }
|
|
|
|
- // 直接解析机构id
|
|
|
|
- Long orgId = orgInfoMap.get(orgName);
|
|
|
|
- String roleName = sysUserImportDto.getRoleName();
|
|
|
|
-
|
|
|
|
- UserSaveParams userSaveParams = new UserSaveParams();
|
|
|
|
-
|
|
|
|
- LinkedHashSet<Long> roleIdList = this.analyzeRoleName(schoolId, roleName);
|
|
|
|
-
|
|
|
|
- SysUser oldUser = this.getOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getCode, code).eq(SysUser::getSchoolId, schoolId));
|
|
|
|
- Long oldUserId = null;
|
|
|
|
- Set<Long> oldRoleIdSet = new HashSet<>();
|
|
|
|
- if (Objects.nonNull(oldUser)) {
|
|
|
|
- oldUserId = oldUser.getId();
|
|
|
|
- oldRoleIdSet = new HashSet<>(sysRoleService.getUserRoles(oldUserId));
|
|
|
|
- }
|
|
|
|
- String loginName = code;
|
|
|
|
- if (SystemConstant.longNotNull(oldUserId)) {
|
|
|
|
- // 编辑
|
|
|
|
- userSaveParams.setId(oldUserId);
|
|
|
|
- loginName = oldUser.getLoginName();
|
|
|
|
- }
|
|
|
|
- userSaveParams.setOrgId(orgId);
|
|
|
|
- userSaveParams.setRealName(name);
|
|
|
|
- userSaveParams.setLoginName(loginName);
|
|
|
|
- userSaveParams.setRoleIds(roleIdList.toArray(new Long[0]));
|
|
|
|
- if (SystemConstant.strNotNull(phoneNumber)) {
|
|
|
|
- userSaveParams.setMobileNumber(phoneNumber);
|
|
|
|
- }
|
|
|
|
- userSaveParams.setCode(code);
|
|
|
|
- userSaveParams.setSchoolId(schoolId);
|
|
|
|
- Long upUserId = this.saveUserCommon(userSaveParams, requestUser.getId());
|
|
|
|
- userIdList.add(upUserId);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- map.put("userIdList", userIdList);
|
|
|
|
- return map;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 根据id获取
|
|
* 根据id获取
|
|
*
|
|
*
|
|
@@ -680,65 +586,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- /**
|
|
|
|
- * 获取教研室id底下的人数量
|
|
|
|
- *
|
|
|
|
- * @param orgId
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
- @Override
|
|
|
|
- public int countByTeachingRoomId(Long orgId) {
|
|
|
|
- QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper<>();
|
|
|
|
- sysUserQueryWrapper.lambda().eq(SysUser::getOrgId, orgId);
|
|
|
|
- return sysUserService.count(sysUserQueryWrapper);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- @Override
|
|
|
|
- public SpecialPrivilegeEnum findUserSpecialPrivilegeByUserId(Long userId, Long schoolId) {
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // 知学知考评卷员-科组长角色
|
|
|
|
- boolean markerRole = this.includeSysRole(userId, RoleTypeEnum.MARKER);
|
|
|
|
- boolean leaderRole = this.includeSysRole(userId, RoleTypeEnum.MARKER_LEADER);
|
|
|
|
-
|
|
|
|
- // 记录的云阅卷应该的状态(云阅卷自己不改)
|
|
|
|
- boolean cloudMarker = true;
|
|
|
|
- boolean cloudLeader = true;
|
|
|
|
- List<CloudUserPushStatusDto> userPushDtoList = this.baseMapper.findCloudUserPushStatus(userId, schoolId);
|
|
|
|
- if (userPushDtoList != null) {
|
|
|
|
- if (userPushDtoList.size() > 1) {
|
|
|
|
- String userName = this.getById(userId).getLoginName();
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("用户【" + userName + "】存在多条推送状态记录异常");
|
|
|
|
- }
|
|
|
|
- if (userPushDtoList.size() == 1) {
|
|
|
|
- CloudUserPushStatusDto pushStatusDto = userPushDtoList.get(0);
|
|
|
|
- if (!UserPushResultEnum.BIND_SUCCESS.equals(UserPushResultEnum.valueOf(pushStatusDto.getMarkerStatus()))) {
|
|
|
|
- // 有推送记录但推送状态不是评卷员绑定成功
|
|
|
|
- cloudMarker = false;
|
|
|
|
- }
|
|
|
|
- if (!UserPushResultEnum.BIND_SUCCESS.equals(UserPushResultEnum.valueOf(pushStatusDto.getMarkerLeaderStatus()))) {
|
|
|
|
- // 有推送记录但推送状态不是科组长绑定成功
|
|
|
|
- cloudLeader = false;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- boolean marker = markerRole && cloudMarker;
|
|
|
|
- boolean leader = leaderRole && cloudLeader;
|
|
|
|
-
|
|
|
|
- SpecialPrivilegeEnum result;
|
|
|
|
- if (marker && leader) {
|
|
|
|
- result = SpecialPrivilegeEnum.COMPOSITE;
|
|
|
|
- } else if (marker) {
|
|
|
|
- result = SpecialPrivilegeEnum.MARKER;
|
|
|
|
- } else if (leader) {
|
|
|
|
- result = SpecialPrivilegeEnum.SUBJECT_HEADER;
|
|
|
|
- } else {
|
|
|
|
- result = SpecialPrivilegeEnum.UNIDENTIFIED;
|
|
|
|
- }
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 查找用户角色名
|
|
* 查找用户角色名
|
|
*
|
|
*
|
|
@@ -771,26 +618,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return orgIdList.stream().distinct().collect(Collectors.toList());
|
|
return orgIdList.stream().distinct().collect(Collectors.toList());
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public boolean isAdminDataAuth(Long userId) {
|
|
|
|
- boolean result = false;
|
|
|
|
- List<SysOrg> sysOrgList = sysOrgService.list();
|
|
|
|
- SysUser user = this.getById(userId);
|
|
|
|
- if (Objects.isNull(user)) {
|
|
|
|
- throw ExceptionResultEnum.ERROR.exception("用户不存在");
|
|
|
|
- }
|
|
|
|
- Long schoolId = user.getSchoolId();
|
|
|
|
- if (SystemConstant.longNotNull(schoolId)) {
|
|
|
|
- List<Long> orgIdList = this.findOrgIdListByUserId(userId);
|
|
|
|
- if (sysOrgList.stream().anyMatch(e -> orgIdList.contains(e.getId()) && OrgTypeEnum.SCHOOL.equals(e.getType()))) {
|
|
|
|
- result = true;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- result = true;
|
|
|
|
- }
|
|
|
|
- return result;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public List<SysUserResult> findSysUserResultList() {
|
|
public List<SysUserResult> findSysUserResultList() {
|
|
Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
|
|
Long schoolId = SystemConstant.convertIdToLong(String.valueOf(ServletUtil.getRequestHeaderSchoolId()));
|
|
@@ -833,13 +660,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|
return sysUserMapper.findByRoldIdAndMemberName(roleId, name, sysUser.getSchoolId());
|
|
return sysUserMapper.findByRoldIdAndMemberName(roleId, name, sysUser.getSchoolId());
|
|
}
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
|
- public List<SysUser> findBySchoolIdAndCode(Long schoolId, String code) {
|
|
|
|
- QueryWrapper<SysUser> queryWrapper = new QueryWrapper<>();
|
|
|
|
- queryWrapper.lambda().eq(SysUser::getSchoolId, schoolId).eq(SysUser::getCode, code);
|
|
|
|
- return sysUserMapper.selectList(queryWrapper);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
@Override
|
|
@Override
|
|
public boolean includeSysRole(Long userId, RoleTypeEnum defaultRole) {
|
|
public boolean includeSysRole(Long userId, RoleTypeEnum defaultRole) {
|
|
SysRole sysRole = sysRoleService.getOne(new QueryWrapper<SysRole>().lambda().eq(SysRole::getType, defaultRole));
|
|
SysRole sysRole = sysRoleService.getOne(new QueryWrapper<SysRole>().lambda().eq(SysRole::getType, defaultRole));
|