合并问题

20230922-ljl-fixBug
daixiaogang 1 year ago
parent 47a413f043
commit d2984d73d6

@ -844,8 +844,8 @@ public class MoveService {
public JSONArray buildSpecPrice(JSONObject productDetailBase,
MoveShopSettingBO condition,
StrObjMap colorSpecArrCalc,
StrObjMap sizeSpecArrCalc,
List<String> colorSpecArrCalc,
List<String> sizeSpecArrCalc,
MoveProductPublishQueueBO queueMsg,
StrObjMap skuPresellChildSkuDetail, Boolean filterBanWord, List<String> 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<String> foundBanWordList) {
private StrObjMap getSaleAttrName(String skuKey, List<String> colorSpecArrCalc, List<String> sizeSpecArrCalc, Boolean filterBanWord, List<String> 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<String> diffMap = new ArrayList<>(colorSpecArrCalc);
diffMap.remove("默认");
if (ObjectUtil.isEmpty(diffMap) && ObjectUtil.isEmpty(sizeSpecArrCalc) && StrUtil.isEmpty(newColorName) && StrUtil.isEmpty(newSizeName)) {
newColorName = "默认";

@ -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<String>) specResult.get("colorSpecArr"), (List<String>) specResult.get("sizeSpecArr"),
BeanUtil.toBean(queueMsg, MoveProductPublishQueueBO.class), (StrObjMap) specResult.get("newColorNameAndOldColorNameMap"), true, foundBanWordList);
productDetailBase.put("specPrices", specPrices);

Loading…
Cancel
Save