Browse Source

Merge branch 'master' of http://code.qiyue666.com/pengcong001/bbwy

AddValidOverTime
506583276@qq.com 2 years ago
parent
commit
db39804dd3
  1. 15
      BBWY.1688SDK/entity/Order/tradeWithholdPreparePayParam.cs
  2. 9
      BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs
  3. 8
      BBWY.Server.Model/Enums.cs
  4. 56
      BBWY.Test/Program.cs

15
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; }
}
}

9
BBWY.Server.Business/PurchaseOrderV2/BatchPurchase/BatchPurchaseBusiness.cs

@ -589,7 +589,7 @@ namespace BBWY.Server.Business
throw new BusinessException("缺少采购账号"); throw new BusinessException("缺少采购账号");
if (request.IntoStoreType == null) if (request.IntoStoreType == null)
throw new BusinessException("缺少入仓类型"); 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))) if (request.CargoParamGroupList.Any(c => c.CargoParamList.Any(x => x.StockType == null)))
{ {
@ -725,7 +725,8 @@ namespace BBWY.Server.Business
ProductAmount = currentOrderSkuProductAmount, ProductAmount = currentOrderSkuProductAmount,
PurchaseFreight = currentOrderSkuFreightAmount, PurchaseFreight = currentOrderSkuFreightAmount,
CreateTime = DateTime.Now, 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); insertPurchaseOrderSkuList.Add(purchaseOrderSku);
@ -878,8 +879,10 @@ namespace BBWY.Server.Business
return 1; return 1;
if (stockType == Enums.StockType.) if (stockType == Enums.StockType.)
return 0; return 0;
if (stockType == Enums.StockType.) if (stockType == Enums.StockType.)
return 3; return 3;
if (stockType == Enums.StockType.)
return 4;
return 0; return 0;
} }

8
BBWY.Server.Model/Enums.cs

@ -208,11 +208,11 @@
} }
/// <summary> /// <summary>
/// 仓库类型(如业务不需要则为null) 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭=4 /// 仓库类型(如业务不需要则为null) 商家仓 = 1, 京仓 = 2, 云仓 = 3, 聚水潭齐越仓 = 4, 聚水潭惠安仓 = 5
/// </summary> /// </summary>
public enum StockType public enum StockType
{ {
= 1, = 2, = 3, = 4 = 1, = 2, = 3, = 4, = 5
} }
/// <summary> /// <summary>
@ -373,11 +373,11 @@
} }
/// <summary> /// <summary>
/// 入仓类型 (发回齐越 = 0, 厂商代发入仓 = 1) /// 入仓类型 (发回齐越 = 0, 厂商代发入仓 = 1, 其他仓不包装=2)
/// </summary> /// </summary>
public enum IntoStoreType public enum IntoStoreType
{ {
= 0, = 1 = 0, = 1, = 2
} }
} }
} }

56
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 com.alibaba.openapi.client.policy;
using Jd.Api; using Jd.Api;
using Jd.Api.Request; using Jd.Api.Request;
@ -60,15 +62,53 @@ namespace BBWY.Test
//var token = "50a4c0f5c55848b5a8a715709e8d6fe0jntb"; //卿卿玩具专营店 //var token = "50a4c0f5c55848b5a8a715709e8d6fe0jntb"; //卿卿玩具专营店
{
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
//};
Process rdpProcess = new Process(); var param = new
rdpProcess.StartInfo.FileName = Environment.ExpandEnvironmentVariables(@"%SystemRoot%\system32\cmdkey.exe"); {
rdpProcess.StartInfo.Arguments = "/generic:TERMSRV/116.62.152.18 /user:administrator /pass:kaicn1132+-"; tradeWithholdPreparePayParam = new
rdpProcess.Start(); {
orderId = 3494275885416167358
}
};
_request.RequestEntity = param;
if (!string.IsNullOrEmpty(request.AppToken))
_request.AccessToken = request.AppToken;
var result = client.NewRequest(_request, reqPolicy);
if (result.Value<bool>("success") != true)
throw new BusinessException(result.Value<string>("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(); Console.ReadKey();
} }

Loading…
Cancel
Save