bug功能修改
This commit is contained in:
parent
91ef8ceb8e
commit
41999d4a15
@ -3,6 +3,7 @@ package com.inspur.framework.web.service;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.security.core.userdetails.UserDetails;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
@ -33,6 +34,9 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
||||
@Autowired
|
||||
private SysPermissionService permissionService;
|
||||
|
||||
@Value("${user.deptId}")
|
||||
private Long deptId;
|
||||
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException
|
||||
{
|
||||
@ -52,6 +56,9 @@ public class UserDetailsServiceImpl implements UserDetailsService
|
||||
log.info("登录用户:{} 已被停用.", username);
|
||||
throw new ServiceException("对不起,您的账号:" + username + " 已停用");
|
||||
}
|
||||
else if (deptId != null && !deptId.equals(user.getDeptId())){
|
||||
throw new ServiceException("对不起,您的账号:" + username + " 不属于该工控机,无法登录");
|
||||
}
|
||||
|
||||
passwordService.validate(user);
|
||||
|
||||
|
@ -495,11 +495,18 @@ export default {
|
||||
categoryName: [
|
||||
{ required: true, message: "设备类别名称不能为空", trigger: "blur" },
|
||||
{
|
||||
max: 50,
|
||||
max: 20,
|
||||
message: "设备类别名称长度不能大于20个字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
categoryAbbr: [
|
||||
{
|
||||
max: 20,
|
||||
message: "设备别名名称长度不能大于20个字",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
categoryDescription: [
|
||||
{
|
||||
max: 500,
|
||||
|
Loading…
Reference in New Issue
Block a user