From 9d5c6afa03f575c98fc5d2516e940fc2f05b0644 Mon Sep 17 00:00:00 2001 From: shanj <18996038927@163.com> Date: Mon, 31 Jul 2023 16:28:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=87=E8=B4=AD=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E7=95=99=E8=A8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BatchPurchase/BatchPurchaseBusiness.cs | 26 ++++++++++++++++++- .../PurchaseOrderMessageResponse.cs | 25 ++++++++++++++++++ .../PurchaseOrderV2Response.cs | 2 ++ 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs diff --git a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs index d5652b60..21c77372 100644 --- a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs +++ b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs @@ -973,7 +973,7 @@ namespace BBWY.Server.Business var httpResult = restApiService.SendRequest("http://bbwyb.qiyue666.com", "api/order/BatchGetPurchaseExpressOrderList", purchaseOrderIdList, - new Dictionary() { { "Authorization", $"{token}" } }, + new Dictionary() { { "Authorization", token } }, HttpMethod.Post); if (httpResult.StatusCode == System.Net.HttpStatusCode.OK) { @@ -998,6 +998,30 @@ namespace BBWY.Server.Business } + try + { + var httpResult = restApiService.SendRequest("http://bbwyb.qiyue666.com", + "api/ordermessage/getordersmessagelist", + purchaseOrderIdList, + new Dictionary() { { "Authorization", token } }, + HttpMethod.Post); + if (httpResult.StatusCode == System.Net.HttpStatusCode.OK) + { + var response = JsonConvert.DeserializeObject>>(httpResult.Content); + if (response.Success) + { + foreach (var purchaseOrder in purchaseOrderList) + { + purchaseOrder.OrderMessageList = response.Data.Where(x => x.OrderId == purchaseOrder.Id).ToList(); + } + } + } + } + catch (Exception ex) + { + + } + return new PurchaseOrderV2ListResponse() { Count = total, ItemList = purchaseOrderList }; } diff --git a/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs b/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs new file mode 100644 index 00000000..eecada8b --- /dev/null +++ b/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderMessageResponse.cs @@ -0,0 +1,25 @@ +using System; + +namespace BBWY.Server.Model.Dto +{ + public class PurchaseOrderMessageResponse + { + public long Id { get; set; } + + public DateTime? CreateTime { get; set; } + + public string CreatorId { get; set; } + + public string CreatorName { get; set; } + + public string Message { get; set; } + + public string OrderId { get; set; } + + public string OrderSn { get; set; } + + //public long? ShopId { get; set; } + + public string From { get; set; } + } +} diff --git a/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs b/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs index d173498b..19ef8b5b 100644 --- a/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs +++ b/BBWY.Server.Model/Dto/Response/PurchaseOrderV2/PurchaseOrderV2Response.cs @@ -7,6 +7,8 @@ namespace BBWY.Server.Model.Dto { public string PurchaseAccountName { get; set; } public IList ItemList { get; set; } + + public IList OrderMessageList { get; set; } } public class PurchaseOrderV2ListResponse