|
@ -1011,7 +1011,7 @@ namespace BBWY.Server.Business |
|
|
// }
|
|
|
// }
|
|
|
// colorSaleAttrs = colorProperty["attrValueList"].ToList();
|
|
|
// colorSaleAttrs = colorProperty["attrValueList"].ToList();
|
|
|
//}
|
|
|
//}
|
|
|
List<AttrValueAliasJson> strutsSaleAttrValueList = new List<AttrValueAliasJson>(); |
|
|
List<List<AttrValueAliasJson>> strutsSaleAttrValueList = new List<List<AttrValueAliasJson>>(); |
|
|
var isStruts = false; |
|
|
var isStruts = false; |
|
|
{ |
|
|
{ |
|
|
var req = new CategoryReadFindSaleAttrTemplatesRequest(); |
|
|
var req = new CategoryReadFindSaleAttrTemplatesRequest(); |
|
@ -1057,16 +1057,46 @@ namespace BBWY.Server.Business |
|
|
{ |
|
|
{ |
|
|
//[{\"id\":5,\"unit\":\"\",\"value\":\"红色\","valueId":1234567}]
|
|
|
//[{\"id\":5,\"unit\":\"\",\"value\":\"红色\","valueId":1234567}]
|
|
|
var tempJarray = tempDataValues_Level1_JToken["properties"]["value"]["enum"][0]["preprocessingSaleAttrValTemplateValueList"] as JArray; |
|
|
var tempJarray = tempDataValues_Level1_JToken["properties"]["value"]["enum"][0]["preprocessingSaleAttrValTemplateValueList"] as JArray; |
|
|
strutsSaleAttrValueList.AddRange(tempJarray.Select(j => new AttrValueAliasJson |
|
|
strutsSaleAttrValueList.AddRange(tempJarray.Select(j => new List<AttrValueAliasJson>() |
|
|
{ |
|
|
{ |
|
|
id = int.Parse(tempDataValues_Level1_JToken["properties"]["id"]["enum"][0].ToString()), |
|
|
new AttrValueAliasJson |
|
|
value = j.Value<string>("name"), |
|
|
{ |
|
|
valueId = j.Value<int>("id"), |
|
|
id = int.Parse(tempDataValues_Level1_JToken["properties"]["id"]["enum"][0].ToString()), |
|
|
unit = string.Empty |
|
|
value = j.Value<string>("name"), |
|
|
|
|
|
valueId = j.Value<int>("id"), |
|
|
|
|
|
unit = string.Empty, |
|
|
|
|
|
isReName = true |
|
|
|
|
|
} |
|
|
})); |
|
|
})); |
|
|
} |
|
|
} |
|
|
|
|
|
else if (tempDataValues_Level1_JToken["properties"]["id"]["type"].ToString() == "number" && |
|
|
|
|
|
tempDataValues_Level1_JToken["properties"]["value"]["type"].ToString() == "number" && |
|
|
|
|
|
tempDataValuesJToken["items"][1]["properties"]["id"]["type"].ToString() == "number" && |
|
|
|
|
|
tempDataValuesJToken["items"][1]["properties"]["value"]["type"].ToString() == "string") |
|
|
|
|
|
{ |
|
|
|
|
|
var f_id = int.Parse(tempDataValues_Level1_JToken["properties"]["id"]["enum"][0].ToString()); |
|
|
|
|
|
var f_unit = tempDataValues_Level1_JToken["properties"]["unit"]["enum"][0].ToString(); |
|
|
|
|
|
var s_id = int.Parse(tempDataValuesJToken["items"][1]["properties"]["id"]["enum"][0].ToString()); |
|
|
|
|
|
|
|
|
|
|
|
strutsSaleAttrValueList.AddRange(request.GiftTemplateSkuList.Select(x => new List<AttrValueAliasJson>() |
|
|
|
|
|
{ |
|
|
|
|
|
new AttrValueAliasJson() |
|
|
|
|
|
{ |
|
|
|
|
|
id = f_id, |
|
|
|
|
|
value = "1", |
|
|
|
|
|
unit = f_unit |
|
|
|
|
|
}, |
|
|
|
|
|
new AttrValueAliasJson() |
|
|
|
|
|
{ |
|
|
|
|
|
id = s_id, |
|
|
|
|
|
value = "待替换的备注", |
|
|
|
|
|
isReName = true |
|
|
|
|
|
} |
|
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
else |
|
|
else |
|
|
throw new BusinessException($"不支持的properties.id.type {tempDataValues_Level1_JToken["properties"]["id"]["type"]}"); |
|
|
throw new BusinessException($"不支持的properties.id.type {tempDataValues_Level1_JToken["properties"]["id"]["type"]} 或取其分支情况"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endregion
|
|
|
#endregion
|
|
@ -1131,9 +1161,9 @@ namespace BBWY.Server.Business |
|
|
var attrValueAlias = string.Empty; |
|
|
var attrValueAlias = string.Empty; |
|
|
if (isStruts) |
|
|
if (isStruts) |
|
|
{ |
|
|
{ |
|
|
var value = strutsSaleAttrValueList[skuIndex]; |
|
|
var values = strutsSaleAttrValueList[skuIndex]; |
|
|
value.value = giftSku.Title; |
|
|
values.FirstOrDefault(v => v.isReName).value = giftSku.Title; |
|
|
attrValueAlias = JsonConvert.SerializeObject(new object[] { value }); |
|
|
attrValueAlias = JsonConvert.SerializeObject(values); |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|