mirror of
				https://github.com/continew-org/continew-admin.git
				synced 2025-11-04 09:01:37 +08:00 
			
		
		
		
	修复:不再查询父 ID 为 0 的记录的父名称
This commit is contained in:
		@@ -38,6 +38,11 @@ public class SysConsts {
 | 
			
		||||
     */
 | 
			
		||||
    public static final String ALL_PERMISSION = "*";
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 顶级父 ID
 | 
			
		||||
     */
 | 
			
		||||
    public static final Long SUPER_PARENT_ID = 0L;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 默认密码
 | 
			
		||||
     */
 | 
			
		||||
 
 | 
			
		||||
@@ -20,6 +20,8 @@ import lombok.AccessLevel;
 | 
			
		||||
import lombok.NoArgsConstructor;
 | 
			
		||||
import lombok.extern.slf4j.Slf4j;
 | 
			
		||||
 | 
			
		||||
import cn.hutool.core.util.StrUtil;
 | 
			
		||||
 | 
			
		||||
import top.charles7c.cnadmin.common.exception.ServiceException;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
@@ -60,7 +62,8 @@ public class CheckUtils extends Validator {
 | 
			
		||||
     *            字段值
 | 
			
		||||
     */
 | 
			
		||||
    public static void throwIfNull(Object obj, String entityName, String fieldName, Object fieldValue) {
 | 
			
		||||
        String message = String.format("%s 为 [%s] 的 %s 记录已不存在", fieldName, fieldValue, entityName);
 | 
			
		||||
        String message =
 | 
			
		||||
            String.format("%s 为 [%s] 的 %s 记录已不存在", fieldName, fieldValue, StrUtil.replace(entityName, "DO", ""));
 | 
			
		||||
        throwIfNull(obj, message, EXCEPTION_TYPE);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user