|
|
|
@ -749,11 +749,11 @@ public class ProcessMovePublishToPicTaskService extends TaskBaseService {
|
|
|
|
|
Matcher matcher = pattern.matcher(reason);
|
|
|
|
|
if (matcher.find()) {
|
|
|
|
|
String propertyId = matcher.group(1);
|
|
|
|
|
Map<Long, List<StrObjMap>> productFormatNew = (Map<Long, List<StrObjMap>>) productDetailBase.get("productFormatNew");
|
|
|
|
|
JSONObject productFormatNew = (JSONObject)productDetailBase.get("productFormatNew");
|
|
|
|
|
if (productFormatNew.containsKey(Long.parseLong(propertyId))) {
|
|
|
|
|
List<StrObjMap> propertyList = (List<StrObjMap>) productFormatNew.get(Long.parseLong(propertyId));
|
|
|
|
|
JSONArray propertyList = (JSONArray) productFormatNew.get(Long.parseLong(propertyId));
|
|
|
|
|
if (!propertyList.isEmpty()) {
|
|
|
|
|
StrObjMap property = propertyList.get(0);
|
|
|
|
|
JSONObject property = (JSONObject)propertyList.get(0);
|
|
|
|
|
property.put("diy_type", 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1348,22 +1348,8 @@ public class ProcessMovePublishToPicTaskService extends TaskBaseService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Object productFormatNew = productData.get("productFormatNew");
|
|
|
|
|
String formatJson = JSON.toJSONString(productFormatNew);
|
|
|
|
|
log.info(formatJson);
|
|
|
|
|
JSONObject formatObj = JSON.parseObject(formatJson);
|
|
|
|
|
List<String> removeKeys = new ArrayList<>();
|
|
|
|
|
for (String key : formatObj.keySet()) {
|
|
|
|
|
Object value = formatObj.get(key);
|
|
|
|
|
java.util.List<?> list = (java.util.List<?>) value;
|
|
|
|
|
if (list.isEmpty()) {
|
|
|
|
|
removeKeys.add(key);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
removeKeys.forEach(formatObj::remove);
|
|
|
|
|
log.info("转换后" + formatObj.toJSONString());
|
|
|
|
|
if (!Objects.isNull(productFormatNew)) {
|
|
|
|
|
param.setProductFormatNew(formatObj.toJSONString());
|
|
|
|
|
// param.setProductFormatNew("{\"631\":[{\"diy_type\":1,\"name\":\"嘻哈风\",\"value\":196227}],\"1467\":[{\"diy_type\":0,\"name\":\"59%-69%(含)\",\"value\":168368}],\"1551\":[{\"diy_type\":1,\"name\":\"超短裙\",\"value\":22064}],\"1687\":[{\"diy_type\":0,\"name\":\"改为具体的品牌,没有可以为空\",\"value\":0}],\"1878\":[{\"diy_type\":1,\"name\":\"高腰\",\"value\":16521}],\"2592\":[{\"diy_type\":1,\"name\":\"甜美\",\"value\":23925}],\"785\":[{\"diy_type\":0,\"name\":\"涤纶\",\"value\":25708}],\"813\":[{\"diy_type\":1,\"name\":\"X型\",\"value\":8017}],\"981\":[{\"diy_type\":1,\"name\":\"蛋糕裙\",\"value\":22253}]}");
|
|
|
|
|
param.setProductFormatNew(JSON.toJSONString(productFormatNew));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Long deliveryDelayDay = productData.getLong("deliveryDelayDay");
|
|
|
|
|