|
@ -6,6 +6,7 @@ using BBWYB.Server.Model.Db; |
|
|
using BBWYB.Server.Model.Dto; |
|
|
using BBWYB.Server.Model.Dto; |
|
|
using Microsoft.Extensions.Caching.Memory; |
|
|
using Microsoft.Extensions.Caching.Memory; |
|
|
using Newtonsoft.Json.Linq; |
|
|
using Newtonsoft.Json.Linq; |
|
|
|
|
|
using System.Net.Http.Headers; |
|
|
using System.Text.RegularExpressions; |
|
|
using System.Text.RegularExpressions; |
|
|
|
|
|
|
|
|
namespace BBWYB.Server.Business |
|
|
namespace BBWYB.Server.Business |
|
@ -309,10 +310,38 @@ namespace BBWYB.Server.Business |
|
|
if (jobject["data"][locationIdList[i]] != null) |
|
|
if (jobject["data"][locationIdList[i]] != null) |
|
|
{ |
|
|
{ |
|
|
location = jobject["data"][locationIdList[i]]["data"]["location"].ToString(); |
|
|
location = jobject["data"][locationIdList[i]]["data"]["location"].ToString(); |
|
|
|
|
|
if (string.IsNullOrEmpty(location)) |
|
|
|
|
|
continue; |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(location)) |
|
|
|
|
|
{ |
|
|
|
|
|
var jobjectdata = jobject["data"] as JObject; |
|
|
|
|
|
foreach (var jproperty in jobjectdata.Properties()) |
|
|
|
|
|
{ |
|
|
|
|
|
if (jobjectdata[jproperty.Name].Value<string>("componentType") == "@ali/tdmod-od-pc-attribute-new") |
|
|
|
|
|
{ |
|
|
|
|
|
location = jobjectdata[jproperty.Name]["data"].FirstOrDefault(x => x.Value<string>("name") == "产地")?.Value<string>("value"); |
|
|
|
|
|
if (!string.IsNullOrEmpty(location)) |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (string.IsNullOrEmpty(location)) |
|
|
|
|
|
{ |
|
|
|
|
|
if (purchaserName.Contains("市") && purchaserName.Contains("区")) |
|
|
|
|
|
{ |
|
|
|
|
|
location = purchaserName.Substring(0, purchaserName.IndexOf("区") + 1); |
|
|
|
|
|
} |
|
|
|
|
|
else if (purchaserName.Contains("市")) |
|
|
|
|
|
{ |
|
|
|
|
|
location = purchaserName.Substring(0, purchaserName.IndexOf("市") + 1); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var purchaser = new Purchaser() |
|
|
var purchaser = new Purchaser() |
|
|
{ |
|
|
{ |
|
|
Id = jobject["globalData"]["tempModel"]["sellerUserId"].ToString(), |
|
|
Id = jobject["globalData"]["tempModel"]["sellerUserId"].ToString(), |
|
|