diff --git a/BBWYB.Client/ViewModels/Order/OrderViewModel.cs b/BBWYB.Client/ViewModels/Order/OrderViewModel.cs index da73631..309aba1 100644 --- a/BBWYB.Client/ViewModels/Order/OrderViewModel.cs +++ b/BBWYB.Client/ViewModels/Order/OrderViewModel.cs @@ -56,6 +56,7 @@ namespace BBWYB.Client.ViewModels public ICommand SetSearchDateCommand { get; set; } public ICommand SetOrderStateCommand { get; set; } public ICommand OrderPageIndexChangedCommand { get; set; } + public ICommand SearchOrderCommand { get; set; } public OrderViewModel(GlobalContext globalContext, OrderService orderService) { @@ -68,6 +69,11 @@ namespace BBWYB.Client.ViewModels PageIndex = 1; Task.Factory.StartNew(() => LoadOrder(PageIndex)); //点击日期查询订单 }); + SearchOrderCommand = new RelayCommand(() => + { + InitSearchParam(); + Task.Factory.StartNew(() => LoadOrder(PageIndex)); + }); OrderPageIndexChangedCommand = new RelayCommand(p => { Task.Factory.StartNew(() => LoadOrder(p.PageIndex)); @@ -78,7 +84,7 @@ namespace BBWYB.Client.ViewModels StartDate = DateTime.Now.Date; this.globalContext = globalContext; this.orderService = orderService; - Task.Factory.StartNew(() => LoadOrder(1)); + Task.Factory.StartNew(() => LoadOrder(PageIndex)); } private void LoadOrder(int pageIndex) diff --git a/BBWYB.Server.Business/Order/OrderBusiness.cs b/BBWYB.Server.Business/Order/OrderBusiness.cs index 32b6cac..39bb964 100644 --- a/BBWYB.Server.Business/Order/OrderBusiness.cs +++ b/BBWYB.Server.Business/Order/OrderBusiness.cs @@ -7,7 +7,7 @@ using FreeSql; using System.Linq.Expressions; using Yitter.IdGenerator; -namespace BBWYB.Server.Business.Order +namespace BBWYB.Server.Business { public class OrderBusiness : BaseBusiness, IDenpendency { diff --git a/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs new file mode 100644 index 0000000..df5aa23 --- /dev/null +++ b/BBWYB.Server.Business/PurchaseOrder/PurchaseOrderBusiness.cs @@ -0,0 +1,18 @@ +using BBWYB.Common.Log; +using BBWYB.Common.Models; +using Yitter.IdGenerator; + +namespace BBWYB.Server.Business +{ + public class PurchaseOrderBusiness : BaseBusiness, IDenpendency + { + public PurchaseOrderBusiness(IFreeSql fsql, NLogManager nLogManager, IIdGenerator idGenerator) : base(fsql, nLogManager, idGenerator) + { + } + + public PreviewOrderResponse PreviewPurchaseOrder(PreviewOrderReuqest previewOrderReuqest) + { + + } + } +} diff --git a/SDKAdapter/AdapterEnums.cs b/SDKAdapter/AdapterEnums.cs index 198a38d..5d90d2a 100644 --- a/SDKAdapter/AdapterEnums.cs +++ b/SDKAdapter/AdapterEnums.cs @@ -27,5 +27,14 @@ { Asc = 0, Desc = 1 } + + /// + /// 采购模式 批发 = 0, 代发 = 1 + /// + public enum PurchaseMode + { + 批发 = 0, + 代发 = 1 + } } } diff --git a/SDKAdapter/OperationPlatform/Client/Impl/OP_QuanTanClient.cs b/SDKAdapter/OperationPlatform/Client/Impl/OP_QuanTanClient.cs index ddb96ea..5557996 100644 --- a/SDKAdapter/OperationPlatform/Client/Impl/OP_QuanTanClient.cs +++ b/SDKAdapter/OperationPlatform/Client/Impl/OP_QuanTanClient.cs @@ -13,6 +13,7 @@ namespace SDKAdapter.OperationPlatform.Client public OP_QuanTanClient(RestApiService restApiService) : base(restApiService) { this.supplier_ProductClient = new QuanTan_Supplier_ProductClient(restApiService); + this.supplier_OrderClient = new QuanTan_Supplier_OrderClient(restApiService); } public override AdapterEnums.PlatformType Platform => AdapterEnums.PlatformType.拳探; diff --git a/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs new file mode 100644 index 0000000..eb92d37 --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClient.cs @@ -0,0 +1,28 @@ +using BBWYB.Common.Http; +using SDKAdapter.PurchasePlatform.Models; + +namespace SDKAdapter.PurchasePlatform.Client +{ + public class PP_PlatformClient + { + protected RestApiService restApiService { get; private set; } + + public virtual AdapterEnums.PlatformType Platform { get; } + + public PP_PlatformClient(RestApiService restApiService) + { + this.restApiService = restApiService; + } + + /// + /// 预览订单 + /// + /// + /// + /// + public virtual PP_PreviewOrderResponse PreviewOrder(PP_PreviewOrderRequest request) + { + throw new NotImplementedException(); + } + } +} diff --git a/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClientFactory.cs b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClientFactory.cs new file mode 100644 index 0000000..389ce95 --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Client/Base/PP_PlatformClientFactory.cs @@ -0,0 +1,23 @@ +using BBWYB.Common.Http; + +namespace SDKAdapter.PurchasePlatform.Client +{ + public class PP_PlatformClientFactory + { + private IList clients; + + public PP_PlatformClientFactory(RestApiService restApiService) + { + clients = new List(); + clients.Add(new PP_1688Client(restApiService)); + } + + public PP_PlatformClient GetClient(AdapterEnums.PlatformType platform) + { + var client = clients.FirstOrDefault(c => c.Platform == platform); + if (client == null) + throw new Exception("不支持的平台"); + return client; + } + } +} diff --git a/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs b/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs new file mode 100644 index 0000000..8c2f404 --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Client/Impl/PP_1688Client.cs @@ -0,0 +1,127 @@ +using BBWYB.Common.Http; +using com.alibaba.openapi.client; +using com.alibaba.openapi.client.entity; +using com.alibaba.openapi.client.policy; +using Newtonsoft.Json.Linq; +using SDKAdapter.PurchasePlatform.Models; + +namespace SDKAdapter.PurchasePlatform.Client +{ + public class PP_1688Client : PP_PlatformClient + { + private _1688TradeTypeCompare _1688TradeTypeCompare; + public PP_1688Client(RestApiService restApiService) : base(restApiService) + { + _1688TradeTypeCompare = new _1688TradeTypeCompare(); + } + + private SyncAPIClient GetSyncAPIClient(string appKey, string appSecret) + { + return new SyncAPIClient(appKey, appSecret, restApiService); + } + + public override PP_PreviewOrderResponse PreviewOrder(PP_PreviewOrderRequest request) + { + 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(); + apiId.Name = "alibaba.createOrder.preview"; + apiId.NamespaceValue = "com.alibaba.trade"; + apiId.Version = 1; + _request.ApiId = apiId; + + var param = new CreateOrderPreview() + { + addressParam = new AddressParam() + { + fullName = request.Consignee.ContactName, + mobile = request.Consignee.Mobile, + phone = request.Consignee.TelePhone, + postCode = "000000", + address = request.Consignee.Address, + provinceText = request.Consignee.Province, + cityText = request.Consignee.City, + areaText = request.Consignee.County, + townText = request.Consignee.Town + }, + cargoParamList = new List(), + flow = request.PurchaseMode == AdapterEnums.PurchaseMode.批发 ? "general" : "saleproxy" + }; + foreach (var cargo in request.OrderProductParamList) + { + param.cargoParamList.Add(new CargoParam() + { + offerId = long.Parse(cargo.ProductId), + specId = cargo.SpecId, + quantity = cargo.Quantity + }); + } + _request.RequestEntity = param; + if (!string.IsNullOrEmpty(request.AppToken)) + _request.AccessToken = request.AppToken; + JObject result = null; + try + { + result = client.NewRequest(_request, reqPolicy); + if (result.Value("success") != true) + throw new Exception(result.Value("errorMsg")); + } + catch (Exception ex) + { + throw new Exception(ex.Message); + } + + var orderPreviewResuslt = (JArray)result["orderPreviewResuslt"]; + List intersectTradeModeList = new List(); + + foreach (var orderPreviewJToken in orderPreviewResuslt) + { + if (orderPreviewJToken["tradeModelList"] == null) + throw new Exception("当前交易不可通过API下单,请使用1688网页交易 [交易模式列表为空]"); + var tradeModeJArray = ((JArray)orderPreviewJToken["tradeModelList"]).Where(tradeJToken => tradeJToken.Value("opSupport")); + if (tradeModeJArray.Count() == 0) + throw new Exception("当前交易不可通过API下单,请使用1688网页交易 [没有支持开放平台下单的交易模式]"); + + if (intersectTradeModeList.Count() == 0) + intersectTradeModeList.AddRange(tradeModeJArray); + else + intersectTradeModeList = intersectTradeModeList.Intersect(tradeModeJArray, _1688TradeTypeCompare).ToList(); + } + + if (intersectTradeModeList.Count() == 0) + throw new Exception("当前交易不可通过API下单,请使用1688网页交易 [多个拆单之间没有相同的交易模式]"); + return new PP_PreviewOrderResponse() + { + FreightAmount = orderPreviewResuslt.Sum(jt => jt.Value("sumCarriage")) / 100M, + ProductAmount = orderPreviewResuslt.Sum(jt => jt.Value("sumPaymentNoCarriage")) / 100M, + TotalAmount = orderPreviewResuslt.Sum(jt => jt.Value("sumPayment")) / 100M, + //OrderTradeType = new OrderTradeTypeResponse() + //{ + // Code = intersectTradeModeList.First().Value("tradeType"), + // Name = intersectTradeModeList.First().Value("name"), + //} + }; + } + } + + public class _1688TradeTypeCompare : IEqualityComparer + { + public bool Equals(JToken x, JToken y) + { + return x.Value("tradeType").Equals(y.Value("tradeType")); + } + + public int GetHashCode(JToken obj) + { + return obj.GetHashCode(); + } + } +} diff --git a/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_ConsigneeRequest.cs b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_ConsigneeRequest.cs new file mode 100644 index 0000000..0ba8ab0 --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_ConsigneeRequest.cs @@ -0,0 +1,45 @@ +namespace SDKAdapter.PurchasePlatform.Models +{ + public class PP_ConsigneeRequest + { + /// + /// 联系人名称 + /// + public string ContactName { get; set; } + + /// + /// 座机 + /// + public string TelePhone { get; set; } + + /// + /// 手机 + /// + public string Mobile { get; set; } + + /// + /// 详细地址 + /// + public string Address { get; set; } + + /// + /// 省 + /// + public string Province { get; set; } + + /// + /// 市 + /// + public string City { get; set; } + + /// + /// 县 + /// + public string County { get; set; } + + /// + /// 镇 + /// + public string Town { get; set; } + } +} diff --git a/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_OrderProductParamRequest.cs b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_OrderProductParamRequest.cs new file mode 100644 index 0000000..788c6d3 --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_OrderProductParamRequest.cs @@ -0,0 +1,10 @@ +namespace SDKAdapter.PurchasePlatform.Models +{ + public class PP_OrderProductParamRequest + { + public string ProductId { get; set; } + public string SkuId { get; set; } + public string SpecId { get; set; } + public int Quantity { get; set; } + } +} diff --git a/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_PreviewOrderRequest.cs b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_PreviewOrderRequest.cs new file mode 100644 index 0000000..7829e4c --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Models/Request/Order/PP_PreviewOrderRequest.cs @@ -0,0 +1,18 @@ +namespace SDKAdapter.PurchasePlatform.Models +{ + public class PP_PreviewOrderRequest : BasePlatformRequest + { + /// + /// 采购模式 + /// + public AdapterEnums.PurchaseMode PurchaseMode { get; set; } + /// + /// 收货信息 + /// + public PP_ConsigneeRequest Consignee { get; set; } + /// + /// 产品参数列表 + /// + public IList OrderProductParamList { get; set; } + } +} diff --git a/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_PreviewOrderResponse.cs b/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_PreviewOrderResponse.cs new file mode 100644 index 0000000..dfdcb9f --- /dev/null +++ b/SDKAdapter/PurchasePlatform/Models/Response/Order/PP_PreviewOrderResponse.cs @@ -0,0 +1,25 @@ +namespace SDKAdapter.PurchasePlatform.Models +{ + public class PP_PreviewOrderResponse + { + /// + /// 总额 + /// + public decimal TotalAmount { get; set; } + + /// + /// 货款总额 + /// + public decimal ProductAmount { get; set; } + + /// + /// 运费 + /// + public decimal FreightAmount { get; set; } + + /// + /// 扩展数据 + /// + public string Extensions { get; set; } + } +} diff --git a/SDKAdapter/SDKAdapter.csproj b/SDKAdapter/SDKAdapter.csproj index bdec773..930d019 100644 --- a/SDKAdapter/SDKAdapter.csproj +++ b/SDKAdapter/SDKAdapter.csproj @@ -7,14 +7,10 @@ True - - - - - + diff --git a/_1688.SDK/APIFacade.cs b/_1688.SDK/APIFacade.cs new file mode 100644 index 0000000..24a71cb --- /dev/null +++ b/_1688.SDK/APIFacade.cs @@ -0,0 +1,39 @@ +using com.alibaba.openapi.client; +using com.alibaba.openapi.client.entity; +using com.alibaba.openapi.client.policy; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NetSdkClient.sdk +{ + public class APIFacade + { + private ClientPolicy clientPolicy; + + public APIFacade(ClientPolicy clientPolicy) + { + this.clientPolicy = clientPolicy; + } + + + private SyncAPIClient getAPIClient() + { + return new SyncAPIClient(clientPolicy); + } + + public AuthorizationToken getToken(string code) + { + + return getAPIClient().getToken(code); + + } + + public AuthorizationToken refreshToken(String refreshToken) + { + return getAPIClient().refreshToken(refreshToken); + } + } +} diff --git a/_1688.SDK/APIId.cs b/_1688.SDK/APIId.cs new file mode 100644 index 0000000..0fefda5 --- /dev/null +++ b/_1688.SDK/APIId.cs @@ -0,0 +1,43 @@ +using System; + +namespace com.alibaba.openapi.client +{ + public class APIId + { + public APIId() + { + + } + + public APIId(String namespaceValue,String name, int version) + { + this.NamespaceValue = namespaceValue; + this.Name = name; + this.version = version; + } + + private String namespaceValue; + + public String NamespaceValue + { + get { return namespaceValue; } + set { namespaceValue = value; } + } + private String name; + + public String Name + { + get { return name; } + set { name = value; } + } + private int version; + + public int Version + { + get { return version; } + set { version = value; } + } + + + } +} diff --git a/_1688.SDK/GatewayAPIRequest.cs b/_1688.SDK/GatewayAPIRequest.cs new file mode 100644 index 0000000..8d4508a --- /dev/null +++ b/_1688.SDK/GatewayAPIRequest.cs @@ -0,0 +1,23 @@ +using com.alibaba.openapi.client.entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client +{ + public class GatewayAPIRequest + { + [DataMember(Order = 0)] + private APIId apiId; + + public APIId ApiId + { + get { return apiId; } + set { apiId = value; } + } + + } +} diff --git a/_1688.SDK/GatewayAPIResponse.cs b/_1688.SDK/GatewayAPIResponse.cs new file mode 100644 index 0000000..15a3bfe --- /dev/null +++ b/_1688.SDK/GatewayAPIResponse.cs @@ -0,0 +1,14 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client +{ + [DataContract(Namespace = "com.alibaba.openapi.client")] + public class GatewayAPIResponse + { + } +} diff --git a/_1688.SDK/Request.cs b/_1688.SDK/Request.cs new file mode 100644 index 0000000..5483507 --- /dev/null +++ b/_1688.SDK/Request.cs @@ -0,0 +1,66 @@ +using com.alibaba.openapi.client.entity; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client +{ + [DataContract(Namespace = "com.alibaba.openapi.client")] + public class Request + { + [DataMember(Order = 0)] + private APIId apiId; + + public APIId ApiId + { + get { return apiId; } + set { apiId = value; } + } + private Dictionary addtionalParams = new Dictionary(); + + public Dictionary AddtionalParams + { + get { return addtionalParams; } + set { addtionalParams = value; } + } + private Object requestEntity; + + public Object RequestEntity + { + get { return requestEntity; } + set { requestEntity = value; } + } + private Dictionary attachments; + + public Dictionary Attachments + { + get { return attachments; } + set { attachments = value; } + } + private String authCodeKey; + + public String AuthCodeKey + { + get { return authCodeKey; } + set { authCodeKey = value; } + } + [DataMember(Order = 1)] + private String accessToken; + + public String AccessToken + { + get { return accessToken; } + set { accessToken = value; } + } + private AuthorizationToken authToken; + + internal AuthorizationToken AuthToken + { + get { return authToken; } + set { authToken = value; } + } + } +} diff --git a/_1688.SDK/Response.cs b/_1688.SDK/Response.cs new file mode 100644 index 0000000..5db43fa --- /dev/null +++ b/_1688.SDK/Response.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using com.alibaba.openapi.client.entity; + +namespace com.alibaba.openapi.client +{ + public class Response + { + private int statusCode; + + public int StatusCode + { + get { return statusCode; } + set { statusCode = value; } + } + private Object result; + + public Object Result + { + get { return result; } + set { result = value; } + } + private Exception exception; + + public Exception Exception + { + get { return exception; } + set { exception = value; } + } + private String charset = "UTF-8"; + + public String Charset + { + get { return charset; } + set { charset = value; } + } + private String encoding; + + public String Encoding + { + get { return encoding; } + set { encoding = value; } + } + + private ResponseWrapper responseWrapper; + + internal ResponseWrapper ResponseWrapper + { + get { return responseWrapper; } + set { responseWrapper = value; } + } + } +} diff --git a/_1688.SDK/SyncAPIClient.cs b/_1688.SDK/SyncAPIClient.cs new file mode 100644 index 0000000..2f23bfc --- /dev/null +++ b/_1688.SDK/SyncAPIClient.cs @@ -0,0 +1,115 @@ +using BBWYB.Common.Http; +using com.alibaba.openapi.client.entity; +using com.alibaba.openapi.client.policy; +using Newtonsoft.Json.Linq; + +namespace com.alibaba.openapi.client +{ + public class SyncAPIClient + { + private ClientPolicy clientPolicy; + private RestApiService restApiService; + private http.HttpClient alibabaHttpClient; + + public SyncAPIClient(String appKey, String appSecret) + { + this.clientPolicy = new ClientPolicy(); + this.clientPolicy.AppKey = appKey; + this.clientPolicy.SecretKey = appSecret; + } + + public SyncAPIClient(String appKey, String appSecret, RestApiService restApiService) + { + this.clientPolicy = new ClientPolicy(); + this.clientPolicy.AppKey = appKey; + this.clientPolicy.SecretKey = appSecret; + this.restApiService = restApiService; + this.alibabaHttpClient = new http.HttpClient(clientPolicy, restApiService); + } + + public SyncAPIClient(String appKey, String appSecret, String gatewayHost) + { + this.clientPolicy = new ClientPolicy(); + this.clientPolicy.AppKey = appKey; + this.clientPolicy.SecretKey = appSecret; + this.clientPolicy.ServerHost = gatewayHost; + } + + public SyncAPIClient(ClientPolicy clientPolicy) + { + this.clientPolicy = clientPolicy; + } + + public JObject NewRequest(Request request, RequestPolicy policy) + { + return alibabaHttpClient.NewRequest(request, policy); + } + + public T send(Request request, RequestPolicy policy) + { + http.HttpClient httpClient = new http.HttpClient(clientPolicy); + T result = httpClient.request(request, policy); + return result; + } + + public Res execute(GatewayAPIRequest gatewayAPIRequest, String accessToken) + { + http.HttpClient httpClient = new http.HttpClient(clientPolicy); + RequestPolicy policy = new RequestPolicy(); + policy.UseHttps = true; + Request request = new Request(); + request.ApiId = gatewayAPIRequest.ApiId; + request.RequestEntity = gatewayAPIRequest; + request.AccessToken = accessToken; + Res result = httpClient.request(request, policy); + return result; + } + + public AuthorizationToken getToken(String code) + { + + APIId apiId = new APIId(); + apiId.Name = "getToken"; + apiId.NamespaceValue = "system.oauth2"; + apiId.Version = 1; + + Request request = new Request(); + request.ApiId = apiId; + + request.AddtionalParams["code"] = code; + request.AddtionalParams["grant_type"] = "authorization_code"; + request.AddtionalParams["need_refresh_token"] = true; + request.AddtionalParams["client_id"] = clientPolicy.AppKey; + request.AddtionalParams["client_secret"] = clientPolicy.SecretKey; + request.AddtionalParams["redirect_uri"] = "default"; + RequestPolicy oauthPolicy = new RequestPolicy(); + oauthPolicy.UseHttps = true; + + return this.send(request, oauthPolicy); + } + + public AuthorizationToken refreshToken(String refreshToken) + { + + APIId apiId = new APIId(); + apiId.Name = "getToken"; + apiId.NamespaceValue = "system.oauth2"; + apiId.Version = 1; + + Request request = new Request(); + request.ApiId = apiId; + + request.AddtionalParams["refreshToken"] = refreshToken; + request.AddtionalParams["grant_type"] = "refresh_token"; + request.AddtionalParams["client_id"] = clientPolicy.AppKey; + request.AddtionalParams["client_secret"] = clientPolicy.SecretKey; + request.AddtionalParams["redirect_uri"] = "default"; + RequestPolicy oauthPolicy = new RequestPolicy(); + oauthPolicy.UseHttps = true; + return this.send(request, oauthPolicy); + + + } + } +} + diff --git a/_1688.SDK/_1688.SDK.csproj b/_1688.SDK/_1688.SDK.csproj index 132c02c..5c53a2f 100644 --- a/_1688.SDK/_1688.SDK.csproj +++ b/_1688.SDK/_1688.SDK.csproj @@ -6,4 +6,8 @@ enable + + + + diff --git a/_1688.SDK/entity/AuthorizationToken.cs b/_1688.SDK/entity/AuthorizationToken.cs new file mode 100644 index 0000000..15163a7 --- /dev/null +++ b/_1688.SDK/entity/AuthorizationToken.cs @@ -0,0 +1,159 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client.entity +{ + [DataContract(Namespace = "com.alibaba.openapi.client")] + public class AuthorizationToken + { + [DataMember(Order = 0)] + private String access_token; + [DataMember(Order = 1)] + private String refresh_token; + [DataMember(Order = 2)] + private long expires_in; + [DataMember(Order = 3)] + private DateTime expires_time; + [DataMember(Order = 4)] + private DateTime refresh_token_timeout; + [DataMember(Order = 5)] + private String resource_owner; + [DataMember(Order = 6)] + private String uid; + [DataMember(Order = 7)] + private long aliId; + [DataMember(Order = 8)] + private String memberId; + + /** + * 获取access_token + * + * @return the accessToken + */ + public String getAccess_token() + { + return access_token; + } + + /** + * 获取access_token过期时间 + * + * @return the accessTokenTimeout + */ + public long getExpires_in() + { + return expires_in; + } + + /** + * 获取refresh_token + * + * @return the refreshToken + */ + public String getRefresh_token() + { + return refresh_token; + } + + /** + * 获取refresh_token过期时间 + * + * @return the refreshTokenTimeout + */ + public DateTime getRefresh_token_timeout() + { + return refresh_token_timeout; + } + + public String getMemberId() + { + return memberId; + } + + public void setMemberId(String memberId) + { + this.memberId = memberId; + } + + /** + * 获取resource_owner + * + * @return the resourceOwnerId + */ + public String getResource_owner() + { + return resource_owner; + } + + /** + * 获取uid + * + * @return the uid + */ + public String getUid() + { + return uid; + } + + /** + * 获取aliId + * + * @return the aliId + */ + public long getAliId() + { + return aliId; + } + + public void setAccess_token(String accessToken) + { + this.access_token = accessToken; + } + + public void setRefresh_token(String refreshToken) + { + this.refresh_token = refreshToken; + } + + public void setExpires_in(long accessTokenTimeout) + { + this.expires_in = accessTokenTimeout; + DateTime now = new DateTime(); + this.expires_time = now.AddSeconds(accessTokenTimeout); + } + + public void setRefresh_token_timeout(DateTime refresh_token_timeout) + { + this.refresh_token_timeout = refresh_token_timeout; + } + + public void setResource_owner(String resourceOwnerId) + { + this.resource_owner = resourceOwnerId; + } + + public void setUid(String uid) + { + this.uid = uid; + } + + public void setAliId(long aliId) + { + this.aliId = aliId; + } + + /** + * 获取access_token过期时间,Date格式 + * + * @return the accessTokenTimeout + */ + public DateTime getExpires_time() + { + return expires_time; + } + } +} diff --git a/_1688.SDK/entity/ErrorExceptionDesc.cs b/_1688.SDK/entity/ErrorExceptionDesc.cs new file mode 100644 index 0000000..62fce09 --- /dev/null +++ b/_1688.SDK/entity/ErrorExceptionDesc.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client.entity +{ + [DataContract(Namespace = "com.alibaba.openapi.client")] + public class ErrorExceptionDesc + { + [DataMember(Order = 0)] + private string error_code; + [DataMember(Order = 1)] + private string error_message; + [DataMember(Order = 2)] + private string exception; + + public string getError_code() + { + return this.error_code; + } + + public string getError_message() + { + return this.error_message; + } + + public string getException() + { + return this.exception; + } + } +} diff --git a/_1688.SDK/entity/OrderPreview/CreateOrderPreview.cs b/_1688.SDK/entity/OrderPreview/CreateOrderPreview.cs new file mode 100644 index 0000000..47b8be9 --- /dev/null +++ b/_1688.SDK/entity/OrderPreview/CreateOrderPreview.cs @@ -0,0 +1,48 @@ +using System.Runtime.Serialization; + +namespace com.alibaba.openapi.client.entity +{ + [DataContract] + public class CreateOrderPreview + { + [DataMember] + public AddressParam addressParam { get; set; } + [DataMember] + public IList cargoParamList { get; set; } + [DataMember] + public string flow { get; set; } + } + [DataContract] + public class AddressParam + { + [DataMember] + public string fullName { get; set; } + [DataMember] + public string mobile { get; set; } + [DataMember] + public string phone { get; set; } + [DataMember] + public string postCode { get; set; } + [DataMember] + public string address { get; set; } + [DataMember] + public string provinceText { get; set; } + [DataMember] + public string cityText { get; set; } + [DataMember] + public string areaText { get; set; } + [DataMember] + public string townText { get; set; } + + } + [DataContract] + public class CargoParam + { + [DataMember] + public long offerId { get; set; } + [DataMember] + public string specId { get; set; } + [DataMember] + public int quantity { get; set; } + } +} diff --git a/_1688.SDK/entity/ResponseStatus.cs b/_1688.SDK/entity/ResponseStatus.cs new file mode 100644 index 0000000..139a957 --- /dev/null +++ b/_1688.SDK/entity/ResponseStatus.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client.entity +{ + public class ResponseStatus + { + private String code; + + public String Code + { + get { return code; } + set { code = value; } + } + private String message; + + public String Message + { + get { return message; } + set { message = value; } + } + + + } +} diff --git a/_1688.SDK/entity/ResponseWrapper.cs b/_1688.SDK/entity/ResponseWrapper.cs new file mode 100644 index 0000000..2d9f868 --- /dev/null +++ b/_1688.SDK/entity/ResponseWrapper.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace com.alibaba.openapi.client.entity +{ + public class ResponseWrapper + { + private String invokeStartTime; + + public String InvokeStartTime + { + get { return invokeStartTime; } + set { invokeStartTime = value; } + } + private long invokeCostTime; + + public long InvokeCostTime + { + get { return invokeCostTime; } + set { invokeCostTime = value; } + } + private ResponseStatus status; + + internal ResponseStatus Status + { + get { return status; } + set { status = value; } + } + private Object result; + + public Object Result + { + get { return result; } + set { result = value; } + } + } +} diff --git a/_1688.SDK/example/ExampleFacade.cs b/_1688.SDK/example/ExampleFacade.cs new file mode 100644 index 0000000..7cce8ab --- /dev/null +++ b/_1688.SDK/example/ExampleFacade.cs @@ -0,0 +1,88 @@ +using com.alibaba.openapi.client; +using com.alibaba.openapi.client.entity; +using com.alibaba.openapi.client.policy; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +using com.alibaba.china.openapi.client.example.param.apiexample; + +namespace com.alibaba.china.openapi.client.example +{ + + public class ExampleFacade + { + private ClientPolicy clientPolicy; + + public ExampleFacade(ClientPolicy clientPolicy) + { + this.clientPolicy = clientPolicy; + } + + private SyncAPIClient getAPIClient() + { + return new SyncAPIClient(clientPolicy); + } + + public AuthorizationToken getToken(string code) + { + + return getAPIClient().getToken(code); + + } + + public AuthorizationToken refreshToken(String refreshToken) + { + return getAPIClient().refreshToken(refreshToken); + } + + + + + public ExampleFamilyGetResult exampleFamilyGet(ExampleFamilyGetParam param) { + RequestPolicy reqPolicy = new RequestPolicy(); + reqPolicy.HttpMethod="POST"; + reqPolicy.NeedAuthorization=false; + reqPolicy.RequestSendTimestamp=false; + reqPolicy.UseHttps=false; + reqPolicy.UseSignture=false; + reqPolicy.AccessPrivateApi=false; + + Request request = new Request (); + APIId apiId = new APIId(); + apiId.Name = "example.family.get"; + apiId.NamespaceValue = "api.example"; + apiId.Version = 1; + request.ApiId = apiId; + + request.RequestEntity=param; + + return this.getAPIClient().send(request, reqPolicy); + } + + + + public ExampleFamilyPostResult exampleFamilyPost(ExampleFamilyPostParam param, string accessToken) { + 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(); + apiId.Name = "example.family.post"; + apiId.NamespaceValue = "api.example"; + apiId.Version = 1; + request.ApiId = apiId; + + request.RequestEntity=param; + request.AccessToken=accessToken; + return this.getAPIClient().send(request, reqPolicy); + } + } +} \ No newline at end of file diff --git a/_1688.SDK/example/param/apiexample/ExampleCar.cs b/_1688.SDK/example/param/apiexample/ExampleCar.cs new file mode 100644 index 0000000..4b9fe3b --- /dev/null +++ b/_1688.SDK/example/param/apiexample/ExampleCar.cs @@ -0,0 +1,160 @@ +using com.alibaba.openapi.client.primitive; +using com.alibaba.openapi.client.util; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Text; + + +namespace com.alibaba.china.openapi.client.example.param.apiexample +{ +[DataContract(Namespace = "com.alibaba.openapi.client")] +public class ExampleCar { + + [DataMember(Order = 1)] + private string builtDate; + + /** + * @return + */ + public DateTime? getBuiltDate() { + if (builtDate != null) + { + DateTime datetime = DateUtil.formatFromStr(builtDate); + return datetime; + } + return null; + } + + /** + * 设置 * + * 参数示例:
     
+             * 此参数必填
+          */
+    public void setBuiltDate(DateTime builtDate) {
+     	         	    this.builtDate = DateUtil.format(builtDate);
+     	        }
+    
+        [DataMember(Order = 2)]
+    private string boughtDate;
+    
+        /**
+       * @return 
+    */
+        public DateTime? getBoughtDate() {
+                 if (boughtDate != null)
+          {
+              DateTime datetime = DateUtil.formatFromStr(boughtDate);
+              return datetime;
+          }
+    	  return null;
+    	    }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setBoughtDate(DateTime boughtDate) {
+     	         	    this.boughtDate = DateUtil.format(boughtDate);
+     	        }
+    
+        [DataMember(Order = 3)]
+    private string name;
+    
+        /**
+       * @return 
+    */
+        public string getName() {
+               	return name;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setName(string name) {
+     	         	    this.name = name;
+     	        }
+    
+        [DataMember(Order = 4)]
+    private string builtArea;
+    
+        /**
+       * @return 
+    */
+        public string getBuiltArea() {
+               	return builtArea;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setBuiltArea(string builtArea) {
+     	         	    this.builtArea = builtArea;
+     	        }
+    
+        [DataMember(Order = 5)]
+    private string carNumber;
+    
+        /**
+       * @return 
+    */
+        public string getCarNumber() {
+               	return carNumber;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setCarNumber(string carNumber) {
+     	         	    this.carNumber = carNumber;
+     	        }
+    
+        [DataMember(Order = 6)]
+    private double? price;
+    
+        /**
+       * @return 
+    */
+        public double? getPrice() {
+               	return price;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setPrice(double price) {
+     	         	    this.price = price;
+     	        }
+    
+        [DataMember(Order = 7)]
+    private int? seats;
+    
+        /**
+       * @return 
+    */
+        public int? getSeats() {
+               	return seats;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setSeats(int seats) {
+     	         	    this.seats = seats;
+     	        }
+    
+    
+  }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleFamily.cs b/_1688.SDK/example/param/apiexample/ExampleFamily.cs
new file mode 100644
index 0000000..51580a3
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleFamily.cs
@@ -0,0 +1,144 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+    [DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleFamily
+    {
+
+        [DataMember(Order = 1)]
+        private int? familyNumber;
+
+        /**
+       * @return 家庭编号
+    */
+        public int? getFamilyNumber()
+        {
+            return familyNumber;
+        }
+
+        /**
+         * 设置家庭编号     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setFamilyNumber(int familyNumber)
+        {
+            this.familyNumber = familyNumber;
+        }
+
+        [DataMember(Order = 2)]
+        private ExamplePerson father;
+
+        /**
+       * @return 父亲对象,可以为空
+    */
+        public ExamplePerson getFather()
+        {
+            return father;
+        }
+
+        /**
+         * 设置父亲对象,可以为空     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setFather(ExamplePerson father)
+        {
+            this.father = father;
+        }
+
+        [DataMember(Order = 3)]
+        private ExamplePerson mother;
+
+        /**
+       * @return 母亲对象,可以为空
+    */
+        public ExamplePerson getMother()
+        {
+            return mother;
+        }
+
+        /**
+         * 设置母亲对象,可以为空     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setMother(ExamplePerson mother)
+        {
+            this.mother = mother;
+        }
+
+        [DataMember(Order = 4)]
+        private ExamplePerson[] children;
+
+        /**
+       * @return 孩子列表
+    */
+        public ExamplePerson[] getChildren()
+        {
+            return children;
+        }
+
+        /**
+         * 设置孩子列表     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setChildren(ExamplePerson[] children)
+        {
+            this.children = children;
+        }
+
+        [DataMember(Order = 5)]
+        private ExampleCar[] ownedCars;
+
+        /**
+       * @return 拥有的汽车信息
+    */
+        public ExampleCar[] getOwnedCars()
+        {
+            return ownedCars;
+        }
+
+        /**
+         * 设置拥有的汽车信息     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setOwnedCars(ExampleCar[] ownedCars)
+        {
+            this.ownedCars = ownedCars;
+        }
+
+        [DataMember(Order = 6)]
+        private ExampleHouse myHouse;
+
+        /**
+       * @return 所住的房屋信息
+    */
+        public ExampleHouse getMyHouse()
+        {
+            return myHouse;
+        }
+
+        /**
+         * 设置所住的房屋信息     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setMyHouse(ExampleHouse myHouse)
+        {
+            this.myHouse = myHouse;
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleFamilyGetParam.cs b/_1688.SDK/example/param/apiexample/ExampleFamilyGetParam.cs
new file mode 100644
index 0000000..f231823
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleFamilyGetParam.cs
@@ -0,0 +1,41 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using com.alibaba.openapi.client;
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+[DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleFamilyGetParam : GatewayAPIRequest
+    {
+    public ExampleFamilyGetParam()
+    {
+        this.ApiId = new APIId("api.example", "example.family.get",1);
+    }
+
+    [DataMember(Order = 1)]
+    private int? familyNumber;
+    
+    /**
+       * @return 可接受参数1或者2,其余参数无法找到family对象
+    */
+    public int? getFamilyNumber() {
+        return familyNumber;
+    }
+    
+    /**
+     * 设置可接受参数1或者2,其余参数无法找到family对象     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setFamilyNumber(int familyNumber) {
+     	 this.familyNumber = familyNumber;
+    }
+    
+    
+  }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleFamilyGetResult.cs b/_1688.SDK/example/param/apiexample/ExampleFamilyGetResult.cs
new file mode 100644
index 0000000..36d53ba
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleFamilyGetResult.cs
@@ -0,0 +1,37 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using com.alibaba.openapi.client;
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+[DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleFamilyGetResult : GatewayAPIResponse
+    {
+
+       [DataMember(Order = 1)]
+    private ExampleFamily result;
+    
+        /**
+       * @return 
+    */
+        public ExampleFamily getResult() {
+               	return result;
+            }
+    
+    /**
+     * 设置     *
+          
+             * 此参数必填
+          */
+    public void setResult(ExampleFamily result) {
+     	         	    this.result = result;
+     	        }
+    
+    
+  }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleFamilyPostParam.cs b/_1688.SDK/example/param/apiexample/ExampleFamilyPostParam.cs
new file mode 100644
index 0000000..087c88a
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleFamilyPostParam.cs
@@ -0,0 +1,81 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+    [DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleFamilyPostParam
+    {
+
+        [DataMember(Order = 1)]
+        private ExampleFamily family;
+
+        /**
+       * @return 上传Family对象信息
+    */
+        public ExampleFamily getFamily()
+        {
+            return family;
+        }
+
+        /**
+         * 设置上传Family对象信息     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setFamily(ExampleFamily family)
+        {
+            this.family = family;
+        }
+
+        [DataMember(Order = 2)]
+        private string comments;
+
+        /**
+       * @return 备注信息
+    */
+        public string getComments()
+        {
+            return comments;
+        }
+
+        /**
+         * 设置备注信息     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setComments(string comments)
+        {
+            this.comments = comments;
+        }
+
+        [DataMember(Order = 3)]
+        private byte[] houseImg;
+
+        /**
+       * @return 房屋信息
+    */
+        public byte[] getHouseImg()
+        {
+            return houseImg;
+        }
+
+        /**
+         * 设置房屋信息     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setHouseImg(byte[] houseImg)
+        {
+            this.houseImg = houseImg;
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleFamilyPostResult.cs b/_1688.SDK/example/param/apiexample/ExampleFamilyPostResult.cs
new file mode 100644
index 0000000..7ef8116
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleFamilyPostResult.cs
@@ -0,0 +1,56 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+[DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleFamilyPostResult
+    {
+
+       [DataMember(Order = 1)]
+    private ExampleFamily result;
+    
+        /**
+       * @return 返回的接听信息
+    */
+        public ExampleFamily getResult() {
+               	return result;
+            }
+    
+    /**
+     * 设置返回的接听信息     *
+          
+             * 此参数必填
+          */
+    public void setResult(ExampleFamily result) {
+     	         	    this.result = result;
+     	        }
+    
+        [DataMember(Order = 2)]
+    private string resultDesc;
+    
+        /**
+       * @return 返回结果描述
+    */
+        public string getResultDesc() {
+               	return resultDesc;
+            }
+    
+    /**
+     * 设置返回结果描述     *
+          
+             * 此参数必填
+          */
+    public void setResultDesc(string resultDesc) {
+     	         	    this.resultDesc = resultDesc;
+     	        }
+    
+    
+  }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExampleHouse.cs b/_1688.SDK/example/param/apiexample/ExampleHouse.cs
new file mode 100644
index 0000000..728a04d
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExampleHouse.cs
@@ -0,0 +1,102 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+    [DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExampleHouse
+    {
+
+        [DataMember(Order = 1)]
+        private string location;
+
+        /**
+       * @return 
+    */
+        public string getLocation()
+        {
+            return location;
+        }
+
+        /**
+         * 设置     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setLocation(string location)
+        {
+            this.location = location;
+        }
+
+        [DataMember(Order = 2)]
+        private int? areaSize;
+
+        /**
+       * @return 
+    */
+        public int? getAreaSize()
+        {
+            return areaSize;
+        }
+
+        /**
+         * 设置     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setAreaSize(int areaSize)
+        {
+            this.areaSize = areaSize;
+        }
+
+        [DataMember(Order = 3)]
+        private bool? rent;
+
+        /**
+       * @return 
+    */
+        public bool? getRent()
+        {
+            return rent;
+        }
+
+        /**
+         * 设置     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setRent(bool rent)
+        {
+            this.rent = rent;
+        }
+
+        [DataMember(Order = 4)]
+        private int? rooms;
+
+        /**
+       * @return 
+    */
+        public int? getRooms()
+        {
+            return rooms;
+        }
+
+        /**
+         * 设置     *
+         * 参数示例:
     
+                 * 此参数必填
+              */
+        public void setRooms(int rooms)
+        {
+            this.rooms = rooms;
+        }
+
+
+    }
+}
\ No newline at end of file
diff --git a/_1688.SDK/example/param/apiexample/ExamplePerson.cs b/_1688.SDK/example/param/apiexample/ExamplePerson.cs
new file mode 100644
index 0000000..636baff
--- /dev/null
+++ b/_1688.SDK/example/param/apiexample/ExamplePerson.cs
@@ -0,0 +1,99 @@
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+
+
+namespace com.alibaba.china.openapi.client.example.param.apiexample
+{
+[DataContract(Namespace = "com.alibaba.openapi.client")]
+    public class ExamplePerson
+    {
+
+       [DataMember(Order = 1)]
+    private string name;
+    
+        /**
+       * @return 
+    */
+        public string getName() {
+               	return name;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setName(string name) {
+     	         	    this.name = name;
+     	        }
+    
+        [DataMember(Order = 2)]
+    private int? age;
+    
+        /**
+       * @return 
+    */
+        public int? getAge() {
+               	return age;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setAge(int age) {
+     	         	    this.age = age;
+     	        }
+    
+        [DataMember(Order = 3)]
+    private string birthday;
+    
+        /**
+       * @return 
+    */
+        public DateTime? getBirthday() {
+                 if (birthday != null)
+          {
+              DateTime datetime = DateUtil.formatFromStr(birthday);
+              return datetime;
+          }
+    	  return null;
+    	    }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setBirthday(DateTime birthday) {
+     	         	    this.birthday = DateUtil.format(birthday);
+     	        }
+    
+        [DataMember(Order = 4)]
+    private string mobileNumber;
+    
+        /**
+       * @return 
+    */
+        public string getMobileNumber() {
+               	return mobileNumber;
+            }
+    
+    /**
+     * 设置     *
+     * 参数示例:
     
+             * 此参数必填
+          */
+    public void setMobileNumber(string mobileNumber) {
+     	         	    this.mobileNumber = mobileNumber;
+     	        }
+    
+    
+  }
+}
\ No newline at end of file
diff --git a/_1688.SDK/exception/OceanException.cs b/_1688.SDK/exception/OceanException.cs
new file mode 100644
index 0000000..fcf0d9a
--- /dev/null
+++ b/_1688.SDK/exception/OceanException.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Runtime.Serialization;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.exception
+{
+    public class OceanException : Exception
+    {
+        public OceanException(string mess)
+            : base(mess)
+        {
+            
+        }
+         public OceanException()
+        {
+
+        }
+        private string error_code;
+
+        private string error_message;
+
+        private string exception;
+
+        public string getError_code()
+        {
+            return this.error_code;
+        }
+
+        public void setError_code(string error_code)
+        {
+            this.error_code = error_code;
+        }
+
+        public string getError_message()
+        {
+            return this.error_message;
+        }
+
+        public void setError_message(string error_message)
+        {
+            this.error_message = error_message;
+        }
+
+        public string getException()
+        {
+            return this.exception;
+        }
+
+        public void setException(String exception)
+        {
+            this.exception = exception;
+        }
+
+    }
+}
diff --git a/_1688.SDK/http/HttpClient.cs b/_1688.SDK/http/HttpClient.cs
new file mode 100644
index 0000000..3ac89b4
--- /dev/null
+++ b/_1688.SDK/http/HttpClient.cs
@@ -0,0 +1,239 @@
+using BBWYB.Common.Http;
+using com.alibaba.openapi.client.entity;
+using com.alibaba.openapi.client.policy;
+using com.alibaba.openapi.client.serialize;
+using com.alibaba.openapi.client.util;
+using Newtonsoft.Json.Linq;
+using System.Net;
+using System.Text;
+using System.Web;
+
+namespace com.alibaba.openapi.client.http
+{
+    public class HttpClient
+    {
+        private ClientPolicy clientPolicy;
+        private RestApiService restApiService;
+        private IDictionary requestHeader;
+
+        public HttpClient(ClientPolicy clientPolicy)
+        {
+            this.clientPolicy = clientPolicy;
+        }
+
+        public HttpClient(ClientPolicy clientPolicy, RestApiService restApiService)
+        {
+            this.clientPolicy = clientPolicy;
+            this.restApiService = restApiService;
+            this.requestHeader = new Dictionary()
+            {
+                { "User-Agent","Ocean/NET-SDKClient"}
+            };
+        }
+
+        public JObject NewRequest(Request request, RequestPolicy requestPolicy)
+        {
+            StringBuilder path = createProtocolRequestPath(requestPolicy, request);
+            Dictionary parameters = createParameterDictionary(requestPolicy, request);
+            signature(path.ToString(), parameters, requestPolicy, clientPolicy);
+            string paramString = createParameterStr(parameters);
+            Uri uri = new Uri(buildRequestUri(requestPolicy, request));
+
+            var result = restApiService.SendRequest($"{uri.Scheme}://{uri.Host}",
+                                                    uri.LocalPath,
+                                                    paramString,
+                                                    requestHeader,
+                                                    requestPolicy.HttpMethod.Equals("GET") ? HttpMethod.Get : HttpMethod.Post,
+                                                    RestApiService.ContentType_Form);
+            if (result.StatusCode != HttpStatusCode.OK)
+                throw new Exception(result.Content.ToString());
+            return JObject.Parse(result.Content);
+        }
+
+        public T request(Request request, RequestPolicy requestPolicy)
+        {
+            StringBuilder path = createProtocolRequestPath(requestPolicy, request);
+            Dictionary parameters = createParameterDictionary(requestPolicy, request);
+            StringBuilder queryBuilder = new StringBuilder();
+            signature(path.ToString(), parameters, requestPolicy, clientPolicy);
+            if ("GET".Equals(requestPolicy.HttpMethod))
+            {
+
+                String queryString = createParameterStr(parameters);
+                String uriStr = buildRequestUri(requestPolicy, request);
+                uriStr = uriStr + "?" + queryString;
+                Uri uri = new Uri(uriStr);
+                HttpWebRequest httpWebRequest = WebRequest.Create(uri) as HttpWebRequest;
+
+                httpWebRequest.Method = "GET";
+                httpWebRequest.KeepAlive = false;
+                httpWebRequest.AllowAutoRedirect = true;
+                httpWebRequest.ContentType = "application/x-www-form-urlencoded";
+                httpWebRequest.UserAgent = "Ocean/NET-SDKClient";
+
+                HttpWebResponse response = httpWebRequest.GetResponse() as HttpWebResponse;
+                Stream responseStream = response.GetResponseStream();
+
+                DeSerializer deSerializer = SerializerProvider.getInstance().getDeSerializer(requestPolicy.ResponseProtocol);
+                ResponseWrapper rw = deSerializer.deSerialize(responseStream, typeof(T), Encoding.UTF8.EncodingName);
+                return (T)rw.Result;
+            }
+            else
+            {
+                String postString = createParameterStr(parameters);
+                byte[] postData = Encoding.UTF8.GetBytes(postString);
+                String uriStr = buildRequestUri(requestPolicy, request);
+                Uri uri = new Uri(uriStr);
+                HttpWebRequest httpWebRequest = WebRequest.Create(uri) as HttpWebRequest;
+
+                httpWebRequest.Method = "POST";
+                httpWebRequest.KeepAlive = false;
+                httpWebRequest.AllowAutoRedirect = true;
+                httpWebRequest.ContentType = "application/x-www-form-urlencoded";
+                httpWebRequest.UserAgent = "Ocean/NET-SDKClient";
+                httpWebRequest.ContentLength = postData.Length;
+
+                System.IO.Stream outputStream = httpWebRequest.GetRequestStream();
+                outputStream.Write(postData, 0, postData.Length);
+                outputStream.Close();
+                try
+                {
+                    HttpWebResponse response = httpWebRequest.GetResponse() as HttpWebResponse;
+                    Stream responseStream = response.GetResponseStream();
+
+
+                    DeSerializer deSerializer = SerializerProvider.getInstance().getDeSerializer(requestPolicy.ResponseProtocol);
+                    ResponseWrapper rw = deSerializer.deSerialize(responseStream, typeof(T), Encoding.UTF8.EncodingName);
+                    return (T)rw.Result;
+                }
+                catch (System.Net.WebException webException)
+                {
+                    HttpWebResponse response = webException.Response as HttpWebResponse;
+                    Stream responseStream = response.GetResponseStream();
+                    DeSerializer deSerializer = SerializerProvider.getInstance().getDeSerializer(requestPolicy.ResponseProtocol);
+                    Exception rw = deSerializer.buildException(responseStream, 500, Encoding.UTF8.EncodingName);
+                    throw rw;
+                }
+            }
+        }
+
+        private String buildRequestUri(RequestPolicy requestPolicy, Request request)
+        {
+            String schema = "http";
+            int port = clientPolicy.HttpPort;
+            if (requestPolicy.UseHttps)
+            {
+                schema = "https";
+                port = clientPolicy.HttpsPort;
+            }
+            StringBuilder relativeBuilder = new StringBuilder(schema);
+            relativeBuilder.Append("://");
+            relativeBuilder.Append(clientPolicy.ServerHost);
+            if (port != 80 && port != 443)
+            {
+                relativeBuilder.Append(":");
+                relativeBuilder.Append(port);
+            }
+
+            if (requestPolicy.AccessPrivateApi)
+            {
+                relativeBuilder.Append("/api");
+            }
+            else
+            {
+                relativeBuilder.Append("/openapi");
+            }
+
+            relativeBuilder.Append("/");
+            relativeBuilder.Append(createProtocolRequestPath(requestPolicy, request));
+            return relativeBuilder.ToString();
+        }
+
+        private StringBuilder createProtocolRequestPath(RequestPolicy requestPolicy, Request request)
+        {
+
+            StringBuilder relativeBuilder = new StringBuilder();
+
+            relativeBuilder.Append(requestPolicy.RequestProtocol);
+            relativeBuilder.Append("/").Append(request.ApiId.Version);
+            relativeBuilder.Append("/").Append(request.ApiId.NamespaceValue);
+            relativeBuilder.Append("/").Append(request.ApiId.Name);
+            relativeBuilder.Append("/").Append(clientPolicy.AppKey);
+            return relativeBuilder;
+
+        }
+
+        private String createParameterStr(Dictionary parameters)
+        {
+            StringBuilder paramBuilder = new StringBuilder();
+            foreach (KeyValuePair kvp in parameters)
+            {
+                String encodedValue = null;
+                if (kvp.Value != null)
+                {
+                    String tempValue = kvp.Value.ToString();
+                    byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(tempValue);
+                    encodedValue = HttpUtility.UrlEncode(byteArray, 0, byteArray.Length);
+                }
+                paramBuilder.Append(kvp.Key).Append("=").Append(encodedValue);
+                paramBuilder.Append("&");
+            }
+            return paramBuilder.ToString();
+        }
+
+        private Dictionary createParameterDictionary(RequestPolicy requestPolicy, Request request)
+        {
+
+            Serializer serializer = SerializerProvider.getInstance().getSerializer(requestPolicy.RequestProtocol);
+
+            Dictionary parameters = serializer.serialize(request.RequestEntity);
+            if (!requestPolicy.RequestProtocol.Equals(requestPolicy.ResponseProtocol))
+            {
+                parameters.Add("_aop_responseFormat", requestPolicy.ResponseProtocol);
+            }
+            if (requestPolicy.RequestSendTimestamp)
+            {
+                parameters.Add("_aop_timestamp", DateUtil.currentTimeMillis());
+            }
+            parameters.Add("_aop_datePattern", DateUtil.getDatePattern());
+            foreach (KeyValuePair kvp in request.AddtionalParams)
+            {
+                parameters.Add(kvp.Key, kvp.Value);
+            }
+            if (request.AccessToken != null)
+            {
+                parameters.Add("access_token", request.AccessToken);
+            }
+            return parameters;
+        }
+
+        private void signature(String path, Dictionary parameters, RequestPolicy requestPolicy, ClientPolicy clientPolicy)
+        {
+            if (!requestPolicy.UseSignture)
+            {
+                return;
+            }
+            if (clientPolicy.AppKey == null
+                    || clientPolicy.SecretKey == null)
+            {
+                return;
+            }
+            byte[] sign = SignatureUtil.hmacSha1(path, parameters, clientPolicy.SecretKey);
+            String signStr = SignatureUtil.toHex(sign);
+            if (signStr != null)
+            {
+                parameters.Add("_aop_signature", signStr);
+            }
+        }
+
+
+        private WebClient createWebClient()
+        {
+
+            WebClient client = new WebClient();
+            client.Headers.Add("user-agent", "Ocean/SDK Client");
+
+            return client;
+        }
+    }
+}
diff --git a/_1688.SDK/policy/ClientPolicy.cs b/_1688.SDK/policy/ClientPolicy.cs
new file mode 100644
index 0000000..15a98f5
--- /dev/null
+++ b/_1688.SDK/policy/ClientPolicy.cs
@@ -0,0 +1,70 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.policy
+{
+    public class ClientPolicy
+    {
+        private string serverHost = "gw.open.1688.com";
+
+        public string ServerHost
+        {
+            get { return serverHost; }
+            set { serverHost = value; }
+        }
+        private int httpPort = 80;
+
+        public int HttpPort
+        {
+            get { return httpPort; }
+            set { httpPort = value; }
+        }
+        private int httpsPort = 443;
+
+        public int HttpsPort
+        {
+            get { return httpsPort; }
+            set { httpsPort = value; }
+        }
+        private string appKey;
+
+        public string AppKey
+        {
+            get { return appKey; }
+            set { appKey = value; }
+        }
+        private string secretKey;
+
+        public string SecretKey
+        {
+            get { return secretKey; }
+            set { secretKey = value; }
+        }
+        private int defaultTimeout = 5000;
+
+        public int DefaultTimeout
+        {
+            get { return defaultTimeout; }
+            set { defaultTimeout = value; }
+        }
+        private string defaultContentCharset = "UTF-8";
+
+        public string DefaultContentCharset
+        {
+            get { return defaultContentCharset; }
+            set { defaultContentCharset = value; }
+        }
+        private bool defaultUseHttps = true;
+
+        public bool DefaultUseHttps
+        {
+            get { return defaultUseHttps; }
+            set { defaultUseHttps = value; }
+        }
+
+
+    }
+}
diff --git a/_1688.SDK/policy/GrantType.cs b/_1688.SDK/policy/GrantType.cs
new file mode 100644
index 0000000..4f4e039
--- /dev/null
+++ b/_1688.SDK/policy/GrantType.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.policy
+{
+    public class GrantType
+    {
+       public  const string  refresh_token="refresh_token";
+        /**
+         * 请求参数通过json串的方式传递,默认格式_data_={"key":"value"}
+         */
+       public  const string get_token = "get_token";
+    }
+}
diff --git a/_1688.SDK/policy/Protocol.cs b/_1688.SDK/policy/Protocol.cs
new file mode 100644
index 0000000..3b7a5a4
--- /dev/null
+++ b/_1688.SDK/policy/Protocol.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.policy
+{
+    public class Protocol
+    {
+        public  const string param2 = "param2";
+        /**
+         * 请求参数通过json串的方式传递,默认格式_data_={"key":"value"}
+         */
+        public  const string json2 = "json2";
+        /**
+         * 
+         * 请求参数通过xml的方式传递,默认格式_data_=<test>data</test>
+         */
+        public  const string xml2 = "xml2";
+        public  const string param = "param";
+        public  const string json = "json";
+        public  const string xml = "xml";
+        public  const string http = "http";
+    }
+}
diff --git a/_1688.SDK/policy/RequestPolicy.cs b/_1688.SDK/policy/RequestPolicy.cs
new file mode 100644
index 0000000..762226e
--- /dev/null
+++ b/_1688.SDK/policy/RequestPolicy.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.policy
+{
+    public class RequestPolicy
+    {
+        private bool requestSendTimestamp = false;
+
+        public bool RequestSendTimestamp
+        {
+            get { return requestSendTimestamp; }
+            set { requestSendTimestamp = value; }
+        }
+        private bool useHttps = false;
+
+        public bool UseHttps
+        {
+            get { return useHttps; }
+            set { useHttps = value; }
+        }
+        private string requestProtocol = Protocol.param2;
+
+        internal string RequestProtocol
+        {
+            get { return requestProtocol; }
+            set { requestProtocol = value; }
+        }
+        private string responseProtocol = Protocol.json2;
+
+        internal string ResponseProtocol
+        {
+            get { return responseProtocol; }
+            set { responseProtocol = value; }
+        }
+        private bool responseCompress = true;
+
+        public bool ResponseCompress
+        {
+            get { return responseCompress; }
+            set { responseCompress = value; }
+        }
+        private int requestCompressThreshold = -1;
+
+        public int RequestCompressThreshold
+        {
+            get { return requestCompressThreshold; }
+            set { requestCompressThreshold = value; }
+        }
+        private int timeout = 5000;
+
+        public int Timeout
+        {
+            get { return timeout; }
+            set { timeout = value; }
+        }
+        private string httpMethod = "POST";
+
+        public string HttpMethod
+        {
+            get { return httpMethod; }
+            set { httpMethod = value; }
+        }
+        private String queryStringCharset = "GB18030";
+
+        public String QueryStringCharset
+        {
+            get { return queryStringCharset; }
+            set { queryStringCharset = value; }
+        }
+        private String contentCharset = "UTF-8";
+
+        public String ContentCharset
+        {
+            get { return contentCharset; }
+            set { contentCharset = value; }
+        }
+        private bool useSignture = true;
+
+        public bool UseSignture
+        {
+            get { return useSignture; }
+            set { useSignture = value; }
+        }
+        private bool needAuthorization = false;
+
+        public bool NeedAuthorization
+        {
+            get { return needAuthorization; }
+            set { needAuthorization = value; }
+        }
+        private bool accessPrivateApi = false;
+
+        public bool AccessPrivateApi
+        {
+            get { return accessPrivateApi; }
+            set { accessPrivateApi = value; }
+        }
+        private int defaultApiVersion = 1;
+
+        public int DefaultApiVersion
+        {
+            get { return defaultApiVersion; }
+            set { defaultApiVersion = value; }
+        }
+
+
+
+    }
+}
diff --git a/_1688.SDK/primitive/NullableBool.cs b/_1688.SDK/primitive/NullableBool.cs
new file mode 100644
index 0000000..63caafd
--- /dev/null
+++ b/_1688.SDK/primitive/NullableBool.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableBool : NullablePrimitiveObject
+    {
+        public NullableBool(bool value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        bool value;
+        private Boolean isNull = true;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(bool value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public bool getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableByte.cs b/_1688.SDK/primitive/NullableByte.cs
new file mode 100644
index 0000000..4d73775
--- /dev/null
+++ b/_1688.SDK/primitive/NullableByte.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableByte : NullablePrimitiveObject
+    {
+        public NullableByte(byte value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        byte value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(byte value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public byte getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableChar.cs b/_1688.SDK/primitive/NullableChar.cs
new file mode 100644
index 0000000..f737504
--- /dev/null
+++ b/_1688.SDK/primitive/NullableChar.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableChar : NullablePrimitiveObject
+    {
+        public NullableChar(char value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        char value;
+        private Boolean isNull = true;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(char value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public char getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableDateTime.cs b/_1688.SDK/primitive/NullableDateTime.cs
new file mode 100644
index 0000000..1b621c0
--- /dev/null
+++ b/_1688.SDK/primitive/NullableDateTime.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableDateTime : NullablePrimitiveObject
+    {
+        public NullableDateTime(DateTime value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        DateTime value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(DateTime value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public DateTime getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableDouble.cs b/_1688.SDK/primitive/NullableDouble.cs
new file mode 100644
index 0000000..2bd5c3c
--- /dev/null
+++ b/_1688.SDK/primitive/NullableDouble.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableDouble : NullablePrimitiveObject
+    {
+        public NullableDouble(double value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        double value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(double value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public double getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableFloat.cs b/_1688.SDK/primitive/NullableFloat.cs
new file mode 100644
index 0000000..8a294cf
--- /dev/null
+++ b/_1688.SDK/primitive/NullableFloat.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableFloat : NullablePrimitiveObject
+    {
+        public NullableFloat(float value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        float value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(float value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public float getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableInt.cs b/_1688.SDK/primitive/NullableInt.cs
new file mode 100644
index 0000000..a9fd6de
--- /dev/null
+++ b/_1688.SDK/primitive/NullableInt.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableInt : NullablePrimitiveObject
+    {
+        public NullableInt(int value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        int value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(int value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public int getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullableLong.cs b/_1688.SDK/primitive/NullableLong.cs
new file mode 100644
index 0000000..1dfd55a
--- /dev/null
+++ b/_1688.SDK/primitive/NullableLong.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullableLong : NullablePrimitiveObject
+    {
+        public NullableLong(long value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        long value;
+        private Boolean isNull;
+
+        public Boolean IsNull
+        {
+            get { return isNull; }
+        }
+
+        public void setValue(long value)
+        {
+            this.value = value;
+            this.isNull = false;
+        }
+
+        public long getValue()
+        {
+            return this.value;
+        }
+    }
+}
diff --git a/_1688.SDK/primitive/NullablePrimitiveObject.cs b/_1688.SDK/primitive/NullablePrimitiveObject.cs
new file mode 100644
index 0000000..e9a4ef4
--- /dev/null
+++ b/_1688.SDK/primitive/NullablePrimitiveObject.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.primitive
+{
+    public class NullablePrimitiveObject
+    {
+    }
+}
diff --git a/_1688.SDK/serialize/DeSerializer.cs b/_1688.SDK/serialize/DeSerializer.cs
new file mode 100644
index 0000000..332ed39
--- /dev/null
+++ b/_1688.SDK/serialize/DeSerializer.cs
@@ -0,0 +1,21 @@
+using com.alibaba.openapi.client.entity;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.serialize
+{
+    public interface DeSerializer
+    {
+        //返回该反序列化接口支持的数据协议.
+         String supportedContentType();
+
+         ResponseWrapper deSerialize(Stream istream, Type resultType, String charSet);
+
+         Exception buildException(Stream inputStream, int statusCode, String charSet);
+
+    }
+}
diff --git a/_1688.SDK/serialize/Json2Deserializer.cs b/_1688.SDK/serialize/Json2Deserializer.cs
new file mode 100644
index 0000000..2b12b42
--- /dev/null
+++ b/_1688.SDK/serialize/Json2Deserializer.cs
@@ -0,0 +1,56 @@
+using com.alibaba.openapi.client.entity;
+using com.alibaba.openapi.client.exception;
+using com.alibaba.openapi.client.policy;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.Serialization.Json;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.serialize
+{
+    public class Json2Deserializer : DeSerializer
+    {
+        //返回该反序列化接口支持的数据协议.
+        public String supportedContentType()
+        {
+            return Protocol.json2;
+        }
+
+        public ResponseWrapper deSerialize(Stream istream, Type resultType, String charSet)
+        {
+            StreamReader sr = new StreamReader(istream, Encoding.UTF8);
+            string strhtml = sr.ReadToEnd();
+            using (MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(strhtml)))
+            {
+                DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(resultType);
+                object result = jsonSerializer.ReadObject(ms);
+                ResponseWrapper responseWrapper = new ResponseWrapper();
+                responseWrapper.Result = result;
+
+                return responseWrapper;
+            }
+        }
+
+        public Exception buildException(Stream istream, int statusCode, String charSet)
+        {
+
+
+            //istream.Position = 0;
+            DataContractJsonSerializer jsonSerializer = new DataContractJsonSerializer(typeof(ErrorExceptionDesc));
+            object resultObj = jsonSerializer.ReadObject(istream);
+            ErrorExceptionDesc result = (ErrorExceptionDesc)resultObj;
+            String errorCodeStr = result.getError_code();
+            String errorMesage = result.getError_message();
+
+            OceanException oceanException = new OceanException(errorMesage);
+            oceanException.setError_code(errorCodeStr);
+            oceanException.setError_message(errorMesage);
+            return oceanException;
+
+
+        }
+    }
+}
diff --git a/_1688.SDK/serialize/Param2RequestSerializer.cs b/_1688.SDK/serialize/Param2RequestSerializer.cs
new file mode 100644
index 0000000..29093c7
--- /dev/null
+++ b/_1688.SDK/serialize/Param2RequestSerializer.cs
@@ -0,0 +1,137 @@
+using com.alibaba.openapi.client.policy;
+using com.alibaba.openapi.client.primitive;
+using com.alibaba.openapi.client.util;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.Serialization.Json;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.serialize
+{
+    public class Param2RequestSerializer : Serializer
+    {
+        public String supportedContentType()
+        {
+            return Protocol.param2;
+        }
+
+        public Dictionary serialize(Object serializer)
+        {
+            //Dictionary result = serializeNest(serializer);
+            //return result;
+            return serializeParam(serializer);
+        }
+
+        private Dictionary serializeNest(Object serializer)
+        {
+            Dictionary result = new Dictionary();
+            if (serializer == null)
+            {
+                return result;
+            }
+            Type type = serializer.GetType();
+
+            IEnumerable fis = type.GetRuntimeFields();
+            TextInfo tInfo = Thread.CurrentThread.CurrentCulture.TextInfo;
+
+            foreach (FieldInfo fi in fis)
+            {
+                Type fieldType = fi.FieldType;
+
+                String piName = fi.Name;
+                String firstCharacter = piName.Substring(0, 1);
+                String upperFirstCharacter = firstCharacter.ToUpper(Thread.CurrentThread.CurrentCulture);
+                String tempName = upperFirstCharacter + piName.Substring(1);
+                if (!"ApiId".Equals(tempName))
+                {
+                    MethodInfo mi = type.GetMethod("get" + tempName);
+                    object value = mi.Invoke(serializer, null);
+                    if (value != null)
+                    {
+                        object trueValue = null;
+                        if (fieldType.IsAssignableFrom(typeof(bool?))
+                            || fieldType.IsAssignableFrom(typeof(byte?))
+                            || fieldType.IsAssignableFrom(typeof(char?))
+                            || fieldType.IsAssignableFrom(typeof(double?))
+                            || fieldType.IsAssignableFrom(typeof(float?))
+                            || fieldType.IsAssignableFrom(typeof(int?))
+                            || fieldType.IsAssignableFrom(typeof(long?)))
+                        {
+                            trueValue = value;
+                        }
+                        else if (fieldType.IsAssignableFrom(typeof(String)))
+                        {
+                            if (value.GetType().IsAssignableFrom(typeof(DateTime)))
+                            {
+                                DateTime dateTime = (DateTime)value;
+                                trueValue = DateUtil.formatForOcean(dateTime);
+                            }
+                            else
+                            {
+                                trueValue = value;
+                            }
+                        }
+                        else if (fieldType.IsAssignableFrom(typeof(DateTime?)))
+                        {
+                            DateTime dateTime = (DateTime)value;
+                            trueValue = DateUtil.format(dateTime);
+                        }
+                        else if (fieldType.IsAssignableFrom(typeof(Byte[])) || fieldType.IsAssignableFrom(typeof(byte[])))
+                        {
+                            trueValue = Convert.ToBase64String((byte[])value);
+                        }
+                        else
+                        {
+                            DataContractJsonSerializer dataContractJsonSerializer = new DataContractJsonSerializer(fieldType);
+                            MemoryStream stream = new MemoryStream();
+                            dataContractJsonSerializer.WriteObject(stream, value);
+                            byte[] dataBytes = new byte[stream.Length];
+                            stream.Position = 0;
+                            stream.Read(dataBytes, 0, (int)stream.Length);
+
+                            string dataString = Encoding.UTF8.GetString(dataBytes);
+                            trueValue = dataString;
+                        }
+                        result.Add(piName, trueValue);
+                    }
+
+                }
+            }
+            return result;
+        }
+
+        private Dictionary serializeParam(object param)
+        {
+            Dictionary result = new Dictionary();
+            Type type = param.GetType();
+            var properties = type.GetProperties();
+            foreach (var property in properties)
+            {
+                var value = property.GetValue(param);
+                var valueType = value.GetType();
+                if (valueType.IsAssignableFrom(typeof(string)) ||
+                    valueType.IsAssignableFrom(typeof(bool?)) ||
+                    valueType.IsAssignableFrom(typeof(byte?)) ||
+                    valueType.IsAssignableFrom(typeof(char?)) ||
+                    valueType.IsAssignableFrom(typeof(double?)) ||
+                    valueType.IsAssignableFrom(typeof(float?)) ||
+                    valueType.IsAssignableFrom(typeof(int?)) ||
+                    valueType.IsAssignableFrom(typeof(long?)))
+                    result.Add(property.Name, value);
+                else
+                {
+                    result.Add(property.Name, JsonConvert.SerializeObject(value));
+                }
+            }
+            return result;
+        }
+
+    }
+}
diff --git a/_1688.SDK/serialize/Serializer.cs b/_1688.SDK/serialize/Serializer.cs
new file mode 100644
index 0000000..7dfba74
--- /dev/null
+++ b/_1688.SDK/serialize/Serializer.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.serialize
+{
+    public interface Serializer
+    {
+
+        //返回该反序列化接口支持的数据协议.
+         String supportedContentType();
+
+        //序列化方法
+         Dictionary serialize(Object serializer);
+    }
+}
diff --git a/_1688.SDK/serialize/SerializerProvider.cs b/_1688.SDK/serialize/SerializerProvider.cs
new file mode 100644
index 0000000..86249f5
--- /dev/null
+++ b/_1688.SDK/serialize/SerializerProvider.cs
@@ -0,0 +1,60 @@
+using com.alibaba.openapi.client.policy;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.serialize
+{
+    public class SerializerProvider
+    {
+        private static SerializerProvider instance;
+        private static Object lockObject=new Object();
+        public static SerializerProvider getInstance()
+        {
+            if (instance == null)
+            {
+                lock (lockObject)
+                {
+                    if (instance == null)
+                    {
+                        instance = new SerializerProvider();
+                        instance.initial();
+                    }
+                }
+            }
+            return instance;
+        }
+
+        private SerializerProvider()
+        {
+
+        }
+
+        private void initial()
+        {
+            serializerStore.Add(Protocol.param2, new Param2RequestSerializer());
+            deSerializerStore.Add(Protocol.param2, new Json2Deserializer());
+            deSerializerStore.Add(Protocol.json2, new Json2Deserializer());
+        }
+    
+        private  Dictionary serializerStore = new Dictionary();
+
+        public  Serializer getSerializer(String contentType)
+        {
+            return serializerStore[contentType];
+        }
+
+        private  Dictionary deSerializerStore = new Dictionary();
+
+        public  DeSerializer getDeSerializer(String contentType)
+        {
+            return deSerializerStore[contentType];
+        }
+
+        
+
+
+    }
+}
diff --git a/_1688.SDK/util/DateUtil.cs b/_1688.SDK/util/DateUtil.cs
new file mode 100644
index 0000000..242fd01
--- /dev/null
+++ b/_1688.SDK/util/DateUtil.cs
@@ -0,0 +1,66 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.util
+{
+    public class DateUtil
+    {
+        //这里定义两个日期格式,由于.Net平台的毫秒格式用fff表示,Ocean平台(Java)的毫秒格式用SSS表示。
+        private static string Date_Pattern = "yyyyMMddHHmmssfff";
+     
+        private static string Date_PatternForOcean = "yyyyMMddHHmmssSSS";
+
+
+        public static String getDatePattern()
+        {
+            return Date_PatternForOcean;
+        }
+
+        public static String format(DateTime date)
+        {
+            return date.ToString(Date_Pattern);
+        }
+
+        public static String formatForOcean(DateTime date)
+        {
+            String value = date.ToString("yyyyMMddHHmmssfffzzz");
+            String newValue = value.Replace(":", "");
+            return newValue;
+        }
+
+        public static DateTime formatFromStr(String dateDesc)
+        {
+            if (dateDesc.Contains("+") || dateDesc.Contains("-"))
+            {
+                try
+                {
+                    IFormatProvider culture = new CultureInfo("zh-CN", true);
+                    DateTime datetime = DateTime.ParseExact(dateDesc, "yyyyMMddHHmmssfffzzz", culture);
+                    return datetime;
+                }
+                catch (Exception x)
+                {
+                    String message = x.Message;
+                }
+            }
+                IFormatProvider newculture = new CultureInfo("zh-CN", true);
+                DateTime newdatetime = DateTime.ParseExact(dateDesc, Date_Pattern, newculture);
+                return newdatetime;
+        }
+
+
+
+        public static long currentTimeMillis()
+        {
+            System.DateTime current = new DateTime();
+            System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
+            double ms = (current - startTime).TotalMilliseconds;
+            long b = Convert.ToInt64(ms);
+            return b;
+        }
+    }
+}
diff --git a/_1688.SDK/util/SignatureUtil.cs b/_1688.SDK/util/SignatureUtil.cs
new file mode 100644
index 0000000..ceb22a2
--- /dev/null
+++ b/_1688.SDK/util/SignatureUtil.cs
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace com.alibaba.openapi.client.util
+{
+    public class SignatureUtil
+    {
+        public static byte[] hmacSha1(String path, Dictionary parameters, String signingKey)
+        {
+            List lists = new List();
+            foreach (KeyValuePair kvp in parameters)
+            {
+                lists.Add(kvp.Key + kvp.Value);
+            }
+            lists.Sort(StringComparer.Ordinal);
+            StringBuilder sb = new StringBuilder();
+            sb.Append(path);
+            foreach (String param in lists)
+            {
+                sb.Append(param);
+            }
+            String contentToHmac = sb.ToString();
+            byte[] byteToHmac = System.Text.Encoding.UTF8.GetBytes(contentToHmac);
+            byte[] byteArray = System.Text.Encoding.UTF8.GetBytes(signingKey);
+            HMACSHA1 hmac = new HMACSHA1(byteArray);
+            byte[] hashValue = hmac.ComputeHash(byteToHmac, 0, byteToHmac.Length);
+            return hashValue;
+        }
+
+        public static string toHex( byte[] bytes)
+        {
+            char[] c = new char[bytes.Length * 2];
+
+            byte b;
+
+            for (int bx = 0, cx = 0; bx < bytes.Length; ++bx, ++cx)
+            {
+                b = ((byte)(bytes[bx] >> 4));
+                c[cx] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30);
+
+                b = ((byte)(bytes[bx] & 0x0F));
+                c[++cx] = (char)(b > 9 ? b + 0x37 + 0x20 : b + 0x30);
+            }
+
+            return new string(c).ToUpper();
+        }
+
+        public static byte[] hexToBytes( string str)
+        {
+            if (str.Length == 0 || str.Length % 2 != 0)
+                return new byte[0];
+
+            byte[] buffer = new byte[str.Length / 2];
+            char c;
+            for (int bx = 0, sx = 0; bx < buffer.Length; ++bx, ++sx)
+            {
+                // Convert first half of byte
+                c = str[sx];
+                buffer[bx] = (byte)((c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0')) << 4);
+
+                // Convert second half of byte
+                c = str[++sx];
+                buffer[bx] |= (byte)(c > '9' ? (c > 'Z' ? (c - 'a' + 10) : (c - 'A' + 10)) : (c - '0'));
+            }
+
+            return buffer;
+        }
+    }
+}