From 125c6f0b6c4efd656f92d5eedac2bdcaa0bafb30 Mon Sep 17 00:00:00 2001
From: shanji <18996038927@163.com>
Date: Wed, 23 Aug 2023 13:23:58 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BB=93=E5=BA=93?=
=?UTF-8?q?=E7=B1=BB=E7=B1=BB=E5=9E=8B=E8=81=9A=E6=B0=B4=E6=BD=AD=E9=BD=90?=
=?UTF-8?q?=E8=B6=8A=E4=BB=93=EF=BC=8C=E8=81=9A=E6=B0=B4=E6=BD=AD=E6=83=A0?=
=?UTF-8?q?=E5=AE=89=E4=BB=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../BatchPurchase/BatchPurchaseBusiness.cs | 7 +++++--
BBWY.Server.Model/Enums.cs | 8 ++++----
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
index cf5f1635..531fb3dc 100644
--- a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
+++ b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
@@ -725,7 +725,8 @@ namespace BBWY.Server.Business
ProductAmount = currentOrderSkuProductAmount,
PurchaseFreight = currentOrderSkuFreightAmount,
CreateTime = DateTime.Now,
- StockType = request.IntoStoreType == Enums.IntoStoreType.发回齐越 ? firstProductParam.StockType : null
+ StockType = request.IntoStoreType == Enums.IntoStoreType.发回齐越 || request.IntoStoreType == Enums.IntoStoreType.其他仓不包装 ?
+ firstProductParam.StockType : null
};
insertPurchaseOrderSkuList.Add(purchaseOrderSku);
@@ -878,8 +879,10 @@ namespace BBWY.Server.Business
return 1;
if (stockType == Enums.StockType.商家仓)
return 0;
- if (stockType == Enums.StockType.聚水潭)
+ if (stockType == Enums.StockType.聚水潭齐越仓)
return 3;
+ if (stockType == Enums.StockType.聚水潭惠安仓)
+ return 4;
return 0;
}
diff --git a/BBWY.Server.Model/Enums.cs b/BBWY.Server.Model/Enums.cs
index 8acc29b2..916c07cb 100644
--- a/BBWY.Server.Model/Enums.cs
+++ b/BBWY.Server.Model/Enums.cs
@@ -208,11 +208,11 @@
}
///
- /// 仓库类型(如业务不需要则为null) 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭=4
+ /// 仓库类型(如业务不需要则为null) 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭齐越仓 = 4, 聚水潭惠安仓 = 5
///
public enum StockType
{
- 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭 = 4
+ 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭齐越仓 = 4, 聚水潭惠安仓 = 5
}
///
@@ -373,11 +373,11 @@
}
///
- /// 入仓类型 (发回齐越 = 0, 厂商代发入仓 = 1)
+ /// 入仓类型 (发回齐越 = 0, 厂商代发入仓 = 1, 其他仓不包装=2)
///
public enum IntoStoreType
{
- 发回齐越 = 0, 厂商代发入仓 = 1
+ 发回齐越 = 0, 厂商代发入仓 = 1, 其他仓不包装 = 2
}
}
}
From 88aee13db3ab02bf81fa02cbc74f6649d7e02349 Mon Sep 17 00:00:00 2001
From: shanji <18996038927@163.com>
Date: Wed, 23 Aug 2023 17:48:33 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=85=B6=E4=BB=96=E4=BB=93=E4=B8=8D?=
=?UTF-8?q?=E5=8C=85=E8=A3=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
index 531fb3dc..7e4cdc4b 100644
--- a/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
+++ b/BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
@@ -589,7 +589,7 @@ namespace BBWY.Server.Business
throw new BusinessException("缺少采购账号");
if (request.IntoStoreType == null)
throw new BusinessException("缺少入仓类型");
- if (request.IntoStoreType == Enums.IntoStoreType.发回齐越)
+ if (request.IntoStoreType == Enums.IntoStoreType.发回齐越 || request.IntoStoreType == Enums.IntoStoreType.其他仓不包装)
{
if (request.CargoParamGroupList.Any(c => c.CargoParamList.Any(x => x.StockType == null)))
{
From c8fc69b6c3f10dae76185c3247ddad9cd264c2c2 Mon Sep 17 00:00:00 2001
From: shanji <18996038927@163.com>
Date: Mon, 28 Aug 2023 17:50:39 +0800
Subject: [PATCH 3/3] 1
---
.../Order/tradeWithholdPreparePayParam.cs | 15 +++++
BBWY.Test/Program.cs | 58 ++++++++++++++++---
2 files changed, 64 insertions(+), 9 deletions(-)
create mode 100644 BBWY.1688SDK/entity/Order/tradeWithholdPreparePayParam.cs
diff --git a/BBWY.1688SDK/entity/Order/tradeWithholdPreparePayParam.cs b/BBWY.1688SDK/entity/Order/tradeWithholdPreparePayParam.cs
new file mode 100644
index 00000000..2d6d244c
--- /dev/null
+++ b/BBWY.1688SDK/entity/Order/tradeWithholdPreparePayParam.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Numerics;
+using System.Runtime.Serialization;
+using System.Text;
+
+namespace BBWY._1688SDK.entity.Order
+{
+ [DataContract]
+ public class tradeWithholdPreparePayParam
+ {
+ [DataMember]
+ public long orderId { get; set; }
+ }
+}
diff --git a/BBWY.Test/Program.cs b/BBWY.Test/Program.cs
index 76b953fa..b0c69686 100644
--- a/BBWY.Test/Program.cs
+++ b/BBWY.Test/Program.cs
@@ -1,4 +1,6 @@
-using com.alibaba.openapi.client;
+using BBWY._1688SDK.entity.Order;
+using BBWY.Common.Models;
+using com.alibaba.openapi.client;
using com.alibaba.openapi.client.policy;
using Jd.Api;
using Jd.Api.Request;
@@ -59,16 +61,54 @@ namespace BBWY.Test
//var token = "4a0ddc095e054c7aa90adcaccb14f83cwzgr"; //可比车品
//var token = "50a4c0f5c55848b5a8a715709e8d6fe0jntb"; //卿卿玩具专营店
-
- Process rdpProcess = new Process();
- rdpProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\cmdkey.exe");
- rdpProcess.StartInfo.Arguments = "/generic:TERMSRV/116.62.152.18 /user:administrator /pass:kaicn1132+-";
- rdpProcess.Start();
+ {
+ var request = new { AppKey = "1074007", AppSecret = "0r9u4Fc9zK", AppToken = "8093fdc5-6adc-46c7-b640-87218c1dcccd" };
+ var client = GetSyncAPIClient(request.AppKey, request.AppSecret);
+ RequestPolicy reqPolicy = new RequestPolicy();
+ reqPolicy.HttpMethod = "POST";
+ reqPolicy.NeedAuthorization = false;
+ reqPolicy.RequestSendTimestamp = false;
+ reqPolicy.UseHttps = false;
+ reqPolicy.UseSignture = true;
+ reqPolicy.AccessPrivateApi = false;
+
+ Request _request = new Request();
+ APIId apiId = new APIId
+ {
+ Name = "alibaba.trade.pay.protocolPay.preparePay",
+ NamespaceValue = "com.alibaba.trade",
+ Version = 1
+ };
+ _request.ApiId = apiId;
+
+ //var param = new
+ //{
+ // orderId = 3494275885416167358
+ //};
+
+ //var param = new tradeWithholdPreparePayParam()
+ //{
+ // orderId = 3494275885416167358
+ //};
+
+ var param = new
+ {
+ tradeWithholdPreparePayParam = new
+ {
+ orderId = 3494275885416167358
+ }
+ };
+ _request.RequestEntity = param;
+ if (!string.IsNullOrEmpty(request.AppToken))
+ _request.AccessToken = request.AppToken;
+ var result = client.NewRequest(_request, reqPolicy);
+ if (result.Value("success") != true)
+ throw new BusinessException(result.Value("message"));
+
+ Console.WriteLine(JsonConvert.SerializeObject(result));
+ }
- rdpProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\mstsc.exe");
- rdpProcess.StartInfo.Arguments = "/v: 116.62.152.18 /console";
- rdpProcess.Start();
Console.ReadKey();
}