Forráskód Böngészése

标引/批量标引添加

zero 1 éve
szülő
commit
17b26d86fe

+ 2 - 1
src/main/java/cn/cslg/pas/service/business/CustomFieldService.java

@@ -35,6 +35,7 @@ import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
@@ -246,7 +247,7 @@ public class CustomFieldService extends ServiceImpl<CustomFieldMapper, CustomFie
     public List<AllCustomFieldVO> getAllProjectCustomField(Integer projectId) {
         Integer order = 0;
         List<AllCustomFieldVO> allCustomFieldVOS = cacheUtils.getPatentCustomField(projectId);
-        if (allCustomFieldVOS == null) {
+        if (CollectionUtils.isEmpty(allCustomFieldVOS)) {
             allCustomFieldVOS = new ArrayList<>();
             //根据 project获得栏位值
             List<CustomField> customFields = new ArrayList<>();