diff --git a/ms-biz/src/main/java/com/ms/api/service/impl/CategoryServiceImpl.java b/ms-biz/src/main/java/com/ms/api/service/impl/CategoryServiceImpl.java index 98782a79..a51d15a4 100644 --- a/ms-biz/src/main/java/com/ms/api/service/impl/CategoryServiceImpl.java +++ b/ms-biz/src/main/java/com/ms/api/service/impl/CategoryServiceImpl.java @@ -227,7 +227,7 @@ public class CategoryServiceImpl implements CategoryService{ DataItem category = shopAllCategoryMap.get(existCategoryInfo.getCategoryId()); Integer hasChildren = (ObjectUtil.isNotNull(category.getIsLeaf()) && category.getIsLeaf() ? 0 : 1); if (category.getName().equals(existCategoryInfo.getCategoryName()) - && category.getParentId() == Long.valueOf(existCategoryInfo.getParentCategoryId()) + && category.getParentId() != null && category.getParentId().longValue() == Long.valueOf(existCategoryInfo.getParentCategoryId()) && category.getLevel() == existCategoryInfo.getLevel() && hasChildren == existCategoryInfo.getHasChildren()) { continue; diff --git a/ms-biz/src/main/java/com/ms/api/tool/DsOrderTool.java b/ms-biz/src/main/java/com/ms/api/tool/DsOrderTool.java index 52c024a6..f9a004ce 100644 --- a/ms-biz/src/main/java/com/ms/api/tool/DsOrderTool.java +++ b/ms-biz/src/main/java/com/ms/api/tool/DsOrderTool.java @@ -150,7 +150,7 @@ public class DsOrderTool { manualRelateSkuInfo = skuInfo; break; } - if (skuInfo.getSourceSkuId() == sourceItemId && StringUtils.isEmpty(manualRelateSourceSkuId)) { + if (sourceItemId != null && skuInfo.getSourceSkuId() == sourceItemId.longValue() && StringUtils.isEmpty(manualRelateSourceSkuId)) { matchSkuInfo = skuInfo; break; } @@ -170,8 +170,8 @@ public class DsOrderTool { int purchaseQuantity = platformItemTotal; GetPurchaseOrderItemsAndSourceItemsResponseDTO.SourceItemSkuRelation manualSourceSkuInfo = platformSkuIdAndSourceSkuInfoMap.get(platformSkuId); - boolean isSourceItemNoSkuFlag = (matchSourceSkuInfo.getSourceItemId() == matchSourceSkuInfo.getSourceSkuId()); - if (manualSourceSkuInfo != null && ((manualSourceSkuInfo.getSourceSkuId() == matchSourceSkuInfo.getSourceSkuId()) || (isSourceItemNoSkuFlag && (matchSourceSkuInfo.getSourceItemId() == manualSourceSkuInfo.getSourceItemId())))) { + boolean isSourceItemNoSkuFlag = (matchSourceSkuInfo.getSourceItemId().equals(matchSourceSkuInfo.getSourceSkuId())); + if (manualSourceSkuInfo != null && ((manualSourceSkuInfo.getSourceSkuId().equals(matchSourceSkuInfo.getSourceSkuId())) || (isSourceItemNoSkuFlag && (matchSourceSkuInfo.getSourceItemId().equals(manualSourceSkuInfo.getSourceItemId()))))) { purchaseQuantity = (manualSourceSkuInfo.getSourceNum() != null && manualSourceSkuInfo.getSourceNum() != 0) ? (platformItemTotal * manualSourceSkuInfo.getSourceNum()) : platformItemTotal; }