|
@@ -55,7 +55,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
user.setLoginName(importUserDomain.getLoginName());
|
|
|
user.setRole(importUserDomain.getRole());
|
|
|
user.setName(importUserDomain.getName());
|
|
|
- user.setSchoolId(importUserDomain.getSchoolId());
|
|
|
// byte[] bytes =
|
|
|
// DigestUtils.sha256(importUserDomain.getPassword());
|
|
|
// String encodePassword = CodecUtils.toHexString(bytes);
|
|
@@ -68,20 +67,18 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public int countByRole(Long schoolId,Role role) {
|
|
|
+ public int countByRole(Role role) {
|
|
|
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
|
|
|
LambdaQueryWrapper<UserEntity> lw = wrapper.lambda();
|
|
|
lw.eq(UserEntity::getRole, role);
|
|
|
- lw.eq(UserEntity::getSchoolId, schoolId);
|
|
|
return this.count(wrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<UserEntity> findByRole( Long schoolId,Role... role) {
|
|
|
+ public List<UserEntity> findByRole(Role... role) {
|
|
|
QueryWrapper<UserEntity> wrapper = new QueryWrapper<>();
|
|
|
LambdaQueryWrapper<UserEntity> lw = wrapper.lambda();
|
|
|
lw.in(UserEntity::getRole, Arrays.asList(role));
|
|
|
- lw.eq(UserEntity::getSchoolId, schoolId);
|
|
|
return baseMapper.selectList(wrapper);
|
|
|
}
|
|
|
|
|
@@ -99,7 +96,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public CreateCountVo create(Long schoolId, String prefix, Integer saveCount, String password) {
|
|
|
+ public CreateCountVo create(String prefix, Integer saveCount, String password) {
|
|
|
if (saveCount >= 100) {
|
|
|
throw new ParameterException("创建个数请小于100");
|
|
|
}
|
|
@@ -117,7 +114,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
user.setLoginName(loginName);
|
|
|
user.setRole(Role.AUDITOR);
|
|
|
user.setName(loginName);
|
|
|
- user.setSchoolId(schoolId);
|
|
|
user.setPassword(password);
|
|
|
list.add(user);
|
|
|
}
|
|
@@ -130,9 +126,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<AuditorVo> findAuditor(Long schoolId) {
|
|
|
+ public List<AuditorVo> findAuditor() {
|
|
|
List<AuditorVo> list = new ArrayList<AuditorVo>();
|
|
|
- List<UserEntity> users = this.findByRole(schoolId,Role.AUDITOR);
|
|
|
+ List<UserEntity> users = this.findByRole(Role.AUDITOR);
|
|
|
for (UserEntity user : users) {
|
|
|
AuditorVo vo = new AuditorVo(user);
|
|
|
vo.setOnline(sessionService.checkAuditorOnline(user.getLoginName()));
|
|
@@ -142,9 +138,9 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<UserVo> findAdmin(Long schoolId) {
|
|
|
+ public List<UserVo> findAdmin() {
|
|
|
List<UserVo> list = new ArrayList<UserVo>();
|
|
|
- List<UserEntity> users = this.findByRole(schoolId,Role.AUDITOR,Role.SCHOOL_ADMIN,Role.SCAN_ADMIN);
|
|
|
+ List<UserEntity> users = this.findByRole(Role.AUDITOR,Role.SCHOOL_ADMIN,Role.SCAN_ADMIN);
|
|
|
for (UserEntity user : users) {
|
|
|
UserVo vo = new UserVo(user);
|
|
|
vo.setOnline(sessionService.checkAuditorOnline(user.getLoginName()));
|