diff --git a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/attr/service/impl/AttrTransformServiceImpl.java b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/attr/service/impl/AttrTransformServiceImpl.java index 41714d33..15fd32c2 100644 --- a/skyeye-promote/skyeye-common/src/main/java/com/skyeye/attr/service/impl/AttrTransformServiceImpl.java +++ b/skyeye-promote/skyeye-common/src/main/java/com/skyeye/attr/service/impl/AttrTransformServiceImpl.java @@ -25,6 +25,7 @@ import com.skyeye.common.util.mybatisplus.MybatisPlusUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -64,6 +65,9 @@ public class AttrTransformServiceImpl extends SkyeyeBusinessServiceImpl attrTransformList = list(queryWrapper); + if (CollectionUtil.isEmpty(attrTransformList)) { + return new ArrayList<>(); + } // 获取属性的基本信息 List attrKeyList = attrTransformList.stream().map(AttrTransform::getAttrKey).collect(Collectors.toList()); Map attrDefinitionMap = attrDefinitionService.queryAttrDefinitionMap(className, attrKeyList);