bug
This commit is contained in:
+2
-1
@@ -16,6 +16,7 @@ import com.adc.da.slrs.sarUser.service.ITsUserService;
|
||||
import com.adc.da.utils.util.ListUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@@ -99,7 +100,7 @@ public class TsRoleServiceImpl extends ServiceImpl<TsRoleDao, TsRole> implements
|
||||
@Override
|
||||
public ResponseMessage<Object> addRole(TsRole tsRole) {
|
||||
//判断是否是顶级角色
|
||||
if(tsRole.getParentId()==null){
|
||||
if(ObjectUtils.isEmpty(tsRole.getParentId())){
|
||||
tsRole.setRoleHierarchy(1);
|
||||
}else {
|
||||
QueryWrapper<TsRole> parentQueryWrapper=new QueryWrapper<>();
|
||||
|
||||
Reference in New Issue
Block a user