diff --git a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs index baed072b..242205ef 100644 --- a/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs +++ b/BBWY.Server.Business/EvaluationAssistant/EvaluationAssistantBusiness.cs @@ -87,8 +87,8 @@ namespace BBWY.Server.Business if (request.GiftTemplateId == 0 && string.IsNullOrEmpty(request.MainProductGiftSku)) throw new BusinessException("赠品模板和主商品赠品SKU至少具备一个"); - if (string.IsNullOrEmpty(request.SimpleTitle) || string.IsNullOrEmpty(request.FullTitle)) - throw new BusinessException("缺少精简标题或完整标题"); + if (string.IsNullOrEmpty(request.FullTitle)) + throw new BusinessException("缺少完整标题"); if (string.IsNullOrEmpty(request.ActivityName)) throw new BusinessException("缺少活动名称"); diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs index 0584dc6e..b16e27bb 100644 --- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs +++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs @@ -752,7 +752,7 @@ namespace BBWY.Server.Business var req = new WareWriteUpdateWareTitleRequest(); req.wareId = wareId; //req.title = request.SimpleTitle; - if (!request.SimpleTitle.StartsWith(brandName)) + if (string.IsNullOrEmpty(request.SimpleTitle) || !request.SimpleTitle.StartsWith(brandName)) req.title = $"{brandName}{request.SimpleTitle}"; else req.title = request.SimpleTitle; diff --git a/BBWY.Test/JDProductAPITest.cs b/BBWY.Test/JDProductAPITest.cs index a796de76..34387d64 100644 --- a/BBWY.Test/JDProductAPITest.cs +++ b/BBWY.Test/JDProductAPITest.cs @@ -26,6 +26,23 @@ namespace BBWY.Test Console.WriteLine(JsonConvert.SerializeObject(response)); } + public void GetSpu(IJdClient client, string token, string spu) + { + var req_productList = new WareReadSearchWare4ValidRequest() + { + orderField = "modified", + orderType = "desc", + pageSize = 50, + pageNo = 1, + field = "created,logo,brandName" + }; + + req_productList.wareId = spu; + + var res = client.Execute(req_productList, token, DateTime.Now.ToLocalTime()); + Console.WriteLine(JsonConvert.SerializeObject(res)); + } + public void QueryOrderCount(IJdClient client, string token) { var req = new ActyQueryRegistrationDataCountRequest(); diff --git a/BBWY.Test/Program.cs b/BBWY.Test/Program.cs index b40847c9..d723db95 100644 --- a/BBWY.Test/Program.cs +++ b/BBWY.Test/Program.cs @@ -39,7 +39,7 @@ namespace BBWY.Test IJdClient client = GetJdClient(appkey, appSecret); var test1 = new JDProductAPITest(); - test1.GetPromotionDetailById(client, token); + test1.GetSpu(client, token, "10023500913672"); Console.ReadKey();