diff --git a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs
index b8cfa63d..28988eda 100644
--- a/BBWY.Server.Business/PlatformSDK/JDBusiness.cs
+++ b/BBWY.Server.Business/PlatformSDK/JDBusiness.cs
@@ -2097,5 +2097,18 @@ namespace BBWY.Server.Business
// throw new BusinessException($"设置全国仓库存失败-{(string.IsNullOrEmpty(res.ErrorMsg) ? res.ErrMsg : res.ErrorMsg)}");
}
}
+
+ public override JToken GetCategoryInfoById(GetCategoryInfoByIdRequest request)
+ {
+ var jdClient = GetJdClient(request.AppKey, request.AppSecret);
+ var req = new CategoryReadFindByIdRequest();
+ req.cid = request.CategoryId;
+ req.field = "id,fid,name,lev";
+
+ var res = jdClient.Execute(req, request.AppToken, DateTime.Now.ToLocalTime());
+ if (res.Json == null)
+ res.Json = JObject.Parse(res.Body);
+ return res.Json["jingdong_category_read_findById_responce"]["category"];
+ }
}
}
diff --git a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs
index d4024b1c..3461ee95 100644
--- a/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs
+++ b/BBWY.Server.Business/PlatformSDK/PlatformSDKBusiness.cs
@@ -304,5 +304,10 @@ namespace BBWY.Server.Business
{
throw new NotImplementedException();
}
+
+ public virtual JToken GetCategoryInfoById(GetCategoryInfoByIdRequest request)
+ {
+ throw new NotImplementedException();
+ }
}
}
diff --git a/BBWY.Server.Model/Dto/Request/JD/GetCategoryInfoByIdRequest.cs b/BBWY.Server.Model/Dto/Request/JD/GetCategoryInfoByIdRequest.cs
new file mode 100644
index 00000000..5c02b87b
--- /dev/null
+++ b/BBWY.Server.Model/Dto/Request/JD/GetCategoryInfoByIdRequest.cs
@@ -0,0 +1,11 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace BBWY.Server.Model.Dto.Request.JD
+{
+ public class GetCategoryInfoByIdRequest:PlatformRequest
+ {
+ public int CategoryId { get; set; }
+ }
+}
diff --git a/JD.API/Controllers/PlatformSDKController.cs b/JD.API/Controllers/PlatformSDKController.cs
index 5920eb90..5f04d3a9 100644
--- a/JD.API/Controllers/PlatformSDKController.cs
+++ b/JD.API/Controllers/PlatformSDKController.cs
@@ -498,9 +498,20 @@ namespace JD.API.API.Controllers
///
///
[HttpPost]
- public void SetSkuStockNum([FromBody]SetSkuStockNumRequest request)
+ public void SetSkuStockNum([FromBody] SetSkuStockNumRequest request)
{
platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).SetSkuStockNum(request);
}
+
+ ///
+ /// 获取类目信息
+ ///
+ ///
+ ///
+ [HttpPost]
+ public JToken GetCategoryInfoById([FromBody] GetCategoryInfoByIdRequest request)
+ {
+ return platformSDKBusinessList.FirstOrDefault(p => p.Platform == request.Platform).GetCategoryInfoById(request);
+ }
}
}