diff --git a/ms-biz/src/main/java/com/ms/api/biz/MoveService.java b/ms-biz/src/main/java/com/ms/api/biz/MoveService.java index 45bd70b4..41f58cb4 100644 --- a/ms-biz/src/main/java/com/ms/api/biz/MoveService.java +++ b/ms-biz/src/main/java/com/ms/api/biz/MoveService.java @@ -844,8 +844,8 @@ public class MoveService { public JSONArray buildSpecPrice(JSONObject productDetailBase, MoveShopSettingBO condition, - StrObjMap colorSpecArrCalc, - StrObjMap sizeSpecArrCalc, + List colorSpecArrCalc, + List sizeSpecArrCalc, MoveProductPublishQueueBO queueMsg, StrObjMap skuPresellChildSkuDetail, Boolean filterBanWord, List foundBanWordList) { JSONObject skuList = productDetailBase.getJSONObject("skuList"); @@ -910,21 +910,21 @@ public class MoveService { // return $this->appendSkuPresellChildSkuDetail($skuPresellChildSkuDetail, $specPrices, $deliveryDelayDay); } - private StrObjMap getSaleAttrName(String skuKey, StrObjMap colorSpecArrCalc, StrObjMap sizeSpecArrCalc, Boolean filterBanWord, List foundBanWordList) { + private StrObjMap getSaleAttrName(String skuKey, List colorSpecArrCalc, List sizeSpecArrCalc, Boolean filterBanWord, List foundBanWordList) { String[] arr = skuKey.split(MoveConst.skuKeyInterval); String colorName = arr.length >= 1 ? arr[0] : ""; String sizeName = arr.length >= 2 ? arr[1] : ""; String newColorName = replaceIllegalChars(colorName, filterBanWord, foundBanWordList); String newSizeName = replaceIllegalChars(sizeName, filterBanWord, foundBanWordList); Boolean needSkip = false; - if (colorName.length() > 0 && ObjectUtil.isNotEmpty(colorSpecArrCalc) && (newColorName.length() == 0 || !colorSpecArrCalc.containsKey(newColorName))) { + if (colorName.length() > 0 && ObjectUtil.isNotEmpty(colorSpecArrCalc) && (newColorName.length() == 0 || !colorSpecArrCalc.contains(newColorName))) { needSkip = true; - } else if (sizeName.length() > 0 && ObjectUtil.isNotEmpty(sizeSpecArrCalc) && (newSizeName.length() == 0 || !sizeSpecArrCalc.containsKey(newSizeName))) { + } else if (sizeName.length() > 0 && ObjectUtil.isNotEmpty(sizeSpecArrCalc) && (newSizeName.length() == 0 || !sizeSpecArrCalc.contains(newSizeName))) { log.info(String.format("getSaleAttrName skip sizeName[%s] sizeSpecArrCalc[%s]", sizeName, sizeSpecArrCalc.toString())); needSkip = true; } - StrObjMap diffMap = (StrObjMap) (colorSpecArrCalc.clone()); + List diffMap = new ArrayList<>(colorSpecArrCalc); diffMap.remove("默认"); if (ObjectUtil.isEmpty(diffMap) && ObjectUtil.isEmpty(sizeSpecArrCalc) && StrUtil.isEmpty(newColorName) && StrUtil.isEmpty(newSizeName)) { newColorName = "默认"; diff --git a/ms-biz/src/main/java/com/ms/api/task/ProcessMovePublishToPicTaskService.java b/ms-biz/src/main/java/com/ms/api/task/ProcessMovePublishToPicTaskService.java index 9b6f1197..01dfeafe 100644 --- a/ms-biz/src/main/java/com/ms/api/task/ProcessMovePublishToPicTaskService.java +++ b/ms-biz/src/main/java/com/ms/api/task/ProcessMovePublishToPicTaskService.java @@ -975,7 +975,7 @@ public class ProcessMovePublishToPicTaskService extends TaskBaseService { productDetailBase.put("newSizeNameAndOldSizeNameMap", specResult.get("newSizeNameAndOldSizeNameMap")); productDetailBase.put("publishTips", specResult.get("publishTips")); JSONArray specPrices = moveService.buildSpecPrice(productDetailBase, - condition, (StrObjMap) specResult.get("colorSpecArr"), (StrObjMap) specResult.get("sizeSpecArr"), + condition, (List) specResult.get("colorSpecArr"), (List) specResult.get("sizeSpecArr"), BeanUtil.toBean(queueMsg, MoveProductPublishQueueBO.class), (StrObjMap) specResult.get("newColorNameAndOldColorNameMap"), true, foundBanWordList); productDetailBase.put("specPrices", specPrices);