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