|
@ -126,7 +126,7 @@ namespace BBWY.Server.Business |
|
|
private string GetSkuTitle(JToken s) |
|
|
private string GetSkuTitle(JToken s) |
|
|
{ |
|
|
{ |
|
|
if (s["saleAttrs"] == null) |
|
|
if (s["saleAttrs"] == null) |
|
|
throw new BusinessException($"{s["skuId"]}没有名字"); |
|
|
return string.Empty;//throw new BusinessException($"{s["skuId"]}没有名字");
|
|
|
StringBuilder titleBuilder = new StringBuilder(); |
|
|
StringBuilder titleBuilder = new StringBuilder(); |
|
|
List<string> attrValueAliasList = new List<string>(); |
|
|
List<string> attrValueAliasList = new List<string>(); |
|
|
|
|
|
|
|
@ -147,27 +147,6 @@ namespace BBWY.Server.Business |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
return titleBuilder.ToString(); |
|
|
return titleBuilder.ToString(); |
|
|
|
|
|
|
|
|
//var title = s["saleAttrs"] != null ? string.Join("-", s["saleAttrs"].Select(a => a["attrValueAlias"][0].ToString())) : string.Empty;
|
|
|
|
|
|
//if (!string.IsNullOrEmpty(title) && title.Contains("id") && title.Contains("value"))
|
|
|
|
|
|
//{
|
|
|
|
|
|
// if (title.Contains("]-["))
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title = title.Replace("]-[", "]^[");
|
|
|
|
|
|
// var titleArray = title.Split(new char[] { '^' }, StringSplitOptions.RemoveEmptyEntries);
|
|
|
|
|
|
// StringBuilder sb = new StringBuilder();
|
|
|
|
|
|
// foreach (var titleStr in titleArray)
|
|
|
|
|
|
// {
|
|
|
|
|
|
// sb.Append(string.Join("", JArray.Parse(titleStr).Select(j => $"{j.Value<string>("value")}{j.Value<string>("unit")}")));
|
|
|
|
|
|
// }
|
|
|
|
|
|
// title = sb.ToString();
|
|
|
|
|
|
// }
|
|
|
|
|
|
// else
|
|
|
|
|
|
// {
|
|
|
|
|
|
// title = string.Join("", JArray.Parse(title).Select(j => $"{j.Value<string>("value")}{j.Value<string>("unit")}"));
|
|
|
|
|
|
// }
|
|
|
|
|
|
//}
|
|
|
|
|
|
//return title;
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public override IList<ProductSkuResponse> GetProductSkuList(SearchProductSkuRequest searchProductSkuRequest) |
|
|
public override IList<ProductSkuResponse> GetProductSkuList(SearchProductSkuRequest searchProductSkuRequest) |
|
|