|
|
@ -2044,7 +2044,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
public Map<String, SkuDetailBO> buildSkuListAndSkuImages(JSONObject skuMap, JSONObject colorMap, JSONObject sizeMap) {
|
|
|
|
public Map<String, SkuDetailBO> buildSkuListAndSkuImages(JSONObject skuMap, JSONObject colorMap, JSONObject sizeMap) {
|
|
|
|
double defaultPrice = getSkuDefaultPrice(skuMap);
|
|
|
|
double defaultPrice = getSkuDefaultPrice(skuMap);
|
|
|
|
Map<String, SkuDetailBO> skuList = new HashMap<>();
|
|
|
|
Map<String, SkuDetailBO> skuList = new HashMap<>();
|
|
|
|
if (!colorMap.isEmpty() && !sizeMap.isEmpty()) {
|
|
|
|
if (ObjectUtil.isNotEmpty(colorMap) && ObjectUtil.isNotEmpty(sizeMap)) {
|
|
|
|
for (String cAv : colorMap.keySet()) {
|
|
|
|
for (String cAv : colorMap.keySet()) {
|
|
|
|
for (String sAv : sizeMap.keySet()) {
|
|
|
|
for (String sAv : sizeMap.keySet()) {
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
@ -2061,7 +2061,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (!colorMap.isEmpty()) {
|
|
|
|
} else if (ObjectUtil.isNotEmpty(colorMap)) {
|
|
|
|
for (String cAv : colorMap.keySet()) {
|
|
|
|
for (String cAv : colorMap.keySet()) {
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
|
skuDetail.setPrice(buildSkuPrice(skuMap, cAv, "", defaultPrice));
|
|
|
|
skuDetail.setPrice(buildSkuPrice(skuMap, cAv, "", defaultPrice));
|
|
|
@ -2076,7 +2076,7 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
skuList.put(keyString, skuDetail);
|
|
|
|
skuList.put(keyString, skuDetail);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if (!sizeMap.isEmpty()) {
|
|
|
|
} else if (ObjectUtil.isNotEmpty(sizeMap)) {
|
|
|
|
for (String sAv : sizeMap.keySet()) {
|
|
|
|
for (String sAv : sizeMap.keySet()) {
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
|
SkuDetailBO skuDetail = new SkuDetailBO();
|
|
|
|
skuDetail.setPrice(buildSkuPrice(skuMap, "", sAv, defaultPrice));
|
|
|
|
skuDetail.setPrice(buildSkuPrice(skuMap, "", sAv, defaultPrice));
|
|
|
@ -2288,8 +2288,8 @@ public class ProcessProductPublishTaskService extends TaskBaseService {
|
|
|
|
|
|
|
|
|
|
|
|
boolean checkSize = false;
|
|
|
|
boolean checkSize = false;
|
|
|
|
skuPropStr = skuPropStr.trim();
|
|
|
|
skuPropStr = skuPropStr.trim();
|
|
|
|
sAv = sAv.trim();
|
|
|
|
sAv = StringUtils.isNotBlank(sAv)? sAv.trim():"";
|
|
|
|
if (sAv.isEmpty() && skuPropStr.isEmpty()) {
|
|
|
|
if (ObjectUtil.isNotEmpty(sAv) && ObjectUtil.isNotEmpty(skuPropStr)) {
|
|
|
|
checkSize = true;
|
|
|
|
checkSize = true;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
String[] skuPropArr = skuPropStr.split(";");
|
|
|
|
String[] skuPropArr = skuPropStr.split(";");
|
|
|
|