|
|
|
@ -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 = "默认";
|
|
|
|
|