de/backend/src/main/java/io/dataease/service/sys/SysAuthService.java
2021-07-07 16:09:13 +08:00

24 lines
642 B
Java

package io.dataease.service.sys;
import io.dataease.base.mapper.ext.ExtSysAuthMapper;
import io.dataease.commons.utils.AuthUtils;
import io.dataease.i18n.Translator;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class SysAuthService {
@Resource
private ExtSysAuthMapper extSysAuthMapper;
public void checkTreeNoManageCount(String modelType,String nodeId){
if(extSysAuthMapper.checkTreeNoManageCount(AuthUtils.getUser().getUserId(),modelType,nodeId)){
throw new RuntimeException(Translator.get("i18n_no_all_delete_privilege_folder"));
}
}
}