diff --git a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java index 846d84498..500351a31 100644 --- a/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java +++ b/jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/platform/util/ThirdPartyPlatformUtils.java @@ -124,9 +124,19 @@ public class ThirdPartyPlatformUtils { * @param orderCode * @return */ - public static Boolean isNeedPushToThirdPartyPlatform(String orderCode,String operatorId) { - String operatorIdPrefix = StringUtils.substring(orderCode , 0 , 9); - return operatorIdPrefix.equals(operatorId); + public static boolean isNeedPushToThirdPartyPlatform(String orderCode,String operatorId) { + if (StringUtils.isNotBlank(orderCode)) { + if (orderCode.length() >= 9) { + String result = StringUtils.substring(orderCode, 0, 9); + return result.equals(operatorId); + } else { + // 订单长度不对 + return false; + } + } else { + //订单为空 + return false; + } } }