|
|
@@ -127,7 +127,7 @@ public class ProductUtils {
|
|
|
throw new RuntimeException("批量更新物料出现异常:" + e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -151,7 +151,7 @@ public class ProductUtils {
|
|
|
} else {
|
|
|
throw new RuntimeException("单个更新物料异常");
|
|
|
}
|
|
|
- return null;
|
|
|
+ return 0L;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -441,7 +441,7 @@ public class ProductUtils {
|
|
|
String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
logger.error("findByEnUUAndCode http response status error: " + resultCode);
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -465,7 +465,7 @@ public class ProductUtils {
|
|
|
String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
logger.error("findByIds http response status error: " + resultCode);
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new ArrayList<>();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -494,17 +494,17 @@ public class ProductUtils {
|
|
|
String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
logger.error("findByPageInfo http response status error: " + resultCode);
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new Page<>();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 搜索物料资料
|
|
|
*
|
|
|
- * @param pageParams 分页参数
|
|
|
* @param keyword 关键字
|
|
|
+ * @param pageParams 分页参数
|
|
|
* @return
|
|
|
*/
|
|
|
- public static SPage<Product> searchProducts(String keyword, PageParams pageParams) {
|
|
|
+ public static SPage searchProducts(String keyword, PageParams pageParams) {
|
|
|
Response res = null;
|
|
|
try {
|
|
|
JSONObject formData = JSON.parseObject(JSON.toJSONString(pageParams));
|
|
|
@@ -522,7 +522,7 @@ public class ProductUtils {
|
|
|
String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
logger.error("searchProducts http response status error: " + resultCode);
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new SPage<>();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -550,7 +550,7 @@ public class ProductUtils {
|
|
|
String resultCode = null != res ? String.valueOf(res.getStatusCode()) : "access error";
|
|
|
logger.error("searchProducts http response status error: " + resultCode);
|
|
|
}
|
|
|
- return null;
|
|
|
+ return new SPage<>();
|
|
|
}
|
|
|
|
|
|
/**
|