This commit is contained in:
parent
96e63e3008
commit
b3ed7c5967
|
|
@ -11,4 +11,6 @@ public class Constant {
|
|||
public final static Integer PARENT_ID = 0;
|
||||
|
||||
public final static Integer MENU_TYPE = 2;
|
||||
|
||||
public final static String MANGER = "管理员";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.securitycontrol.system.base.service.impl;
|
||||
|
||||
import com.securitycontrol.common.core.constant.Constant;
|
||||
import com.securitycontrol.common.core.utils.StringUtils;
|
||||
import com.securitycontrol.common.core.utils.aes.DateTimeHelper;
|
||||
import com.securitycontrol.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -27,12 +28,6 @@ import java.util.List;
|
|||
@Slf4j
|
||||
public class UserServiceImpl implements IUserService {
|
||||
|
||||
private static String[] constantArr;
|
||||
|
||||
static {
|
||||
constantArr = new String[]{"管理员"};
|
||||
}
|
||||
|
||||
@Resource(name = "IUserMapper")
|
||||
private IUserMapper mapper;
|
||||
|
||||
|
|
@ -48,7 +43,7 @@ public class UserServiceImpl implements IUserService {
|
|||
public AjaxResult addOrUpdateUser(UserVo vo) {
|
||||
try {
|
||||
if(StringUtils.isNotEmpty(vo.getRoleName())){
|
||||
if (vo.getRoleName().contains(constantArr[0])) {
|
||||
if (vo.getRoleName().contains(Constant.MANGER)) {
|
||||
vo.setIsAdmin(1);
|
||||
}else {
|
||||
vo.setIsAdmin(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue