Explorar o código

智能识别对空字符过滤返回

zxf hai 9 horas
pai
achega
92510848bd

+ 5 - 0
jd-logistics-modules/jd-logistics-system/src/main/java/com/ruoyi/front/controller/Kd100Controller.java

@@ -1,6 +1,7 @@
 package com.ruoyi.front.controller;
 
 import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.common.core.utils.StringUtils;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.front.service.impl.Kuaidi100Service;
 import org.slf4j.Logger;
@@ -70,6 +71,10 @@ public class Kd100Controller {
     @PostMapping("/queryIcrExpres")
     public Map queryIcrExpres(@RequestBody Map param)  {
         try {
+            if(StringUtils.isBlank(param.get("param").toString())){
+                return AjaxResult.error("智能识别文字不能为空!");
+
+            }
                 Map   result = kuaidi100Service.queryIcrExpres(param);
                 return  result;
         } catch (Exception e) {