Ver Fonte

bug修复

sunkean há 3 anos atrás
pai
commit
12a8764833

+ 2 - 1
src/main/java/com/izouma/nineth/web/MetaSpatialInfoController.java

@@ -8,6 +8,7 @@ import com.izouma.nineth.repo.MetaSpatialInfoRepo;
 import com.izouma.nineth.service.MetaSpatialInfoService;
 import com.izouma.nineth.utils.ObjUtils;
 import com.izouma.nineth.utils.excel.ExcelUtils;
+import jodd.util.StringUtil;
 import lombok.AllArgsConstructor;
 import org.springframework.data.domain.Page;
 import org.springframework.web.bind.annotation.*;
@@ -33,7 +34,7 @@ public class MetaSpatialInfoController extends BaseController {
                 throw new BusinessException("当前资产id已经存在");
             }
         }
-        if (Objects.nonNull(record.getHcTxHash())) {
+        if (StringUtil.isNotBlank(record.getHcTxHash())) {
             MetaSpatialInfo metaSpatialInfo = metaSpatialInfoRepo.findByHcTxHashAndDel(record.getHcTxHash(), false);
             if (Objects.nonNull(metaSpatialInfo) && !Objects.equals(metaSpatialInfo.getId(), record.getId())) {
                 throw new BusinessException("当前hash已经存在");