部分Long类型相等判断修复

20230922-ljl-fixBug
wangchaoxu 1 year ago
parent 5323fbba28
commit e09d081fdc

@ -227,7 +227,7 @@ public class CategoryServiceImpl implements CategoryService{
DataItem category = shopAllCategoryMap.get(existCategoryInfo.getCategoryId()); DataItem category = shopAllCategoryMap.get(existCategoryInfo.getCategoryId());
Integer hasChildren = (ObjectUtil.isNotNull(category.getIsLeaf()) && category.getIsLeaf() ? 0 : 1); Integer hasChildren = (ObjectUtil.isNotNull(category.getIsLeaf()) && category.getIsLeaf() ? 0 : 1);
if (category.getName().equals(existCategoryInfo.getCategoryName()) 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() && category.getLevel() == existCategoryInfo.getLevel()
&& hasChildren == existCategoryInfo.getHasChildren()) { && hasChildren == existCategoryInfo.getHasChildren()) {
continue; continue;

@ -150,7 +150,7 @@ public class DsOrderTool {
manualRelateSkuInfo = skuInfo; manualRelateSkuInfo = skuInfo;
break; break;
} }
if (skuInfo.getSourceSkuId() == sourceItemId && StringUtils.isEmpty(manualRelateSourceSkuId)) { if (sourceItemId != null && skuInfo.getSourceSkuId() == sourceItemId.longValue() && StringUtils.isEmpty(manualRelateSourceSkuId)) {
matchSkuInfo = skuInfo; matchSkuInfo = skuInfo;
break; break;
} }
@ -170,8 +170,8 @@ public class DsOrderTool {
int purchaseQuantity = platformItemTotal; int purchaseQuantity = platformItemTotal;
GetPurchaseOrderItemsAndSourceItemsResponseDTO.SourceItemSkuRelation manualSourceSkuInfo = platformSkuIdAndSourceSkuInfoMap.get(platformSkuId); GetPurchaseOrderItemsAndSourceItemsResponseDTO.SourceItemSkuRelation manualSourceSkuInfo = platformSkuIdAndSourceSkuInfoMap.get(platformSkuId);
boolean isSourceItemNoSkuFlag = (matchSourceSkuInfo.getSourceItemId() == matchSourceSkuInfo.getSourceSkuId()); boolean isSourceItemNoSkuFlag = (matchSourceSkuInfo.getSourceItemId().equals(matchSourceSkuInfo.getSourceSkuId()));
if (manualSourceSkuInfo != null && ((manualSourceSkuInfo.getSourceSkuId() == matchSourceSkuInfo.getSourceSkuId()) || (isSourceItemNoSkuFlag && (matchSourceSkuInfo.getSourceItemId() == manualSourceSkuInfo.getSourceItemId())))) { 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; purchaseQuantity = (manualSourceSkuInfo.getSourceNum() != null && manualSourceSkuInfo.getSourceNum() != 0) ? (platformItemTotal * manualSourceSkuInfo.getSourceNum()) : platformItemTotal;
} }

Loading…
Cancel
Save