拼多多版权限管理 指定类目上传 ai图片上传权限管理

This commit is contained in:
wule committed 2026-05-06 18:24:59 +08:00
1 parent 58798805ed
commit ce23b0a49a
28 files changed
+1265 -483

No files matched your search

+8 -1
View File
@@ -102,6 +102,13 @@ namespace TemuKJD.BLL.PddApi
return html;
}
public string PddGoodsCatsGet()
{
string type = "pdd.goods.cats.get";
string html = PddApiRequest(type, Data);
return html;
}
public string PddPopAuthTokenCreate(string code)
{
string type = "pdd.pop.auth.token.create";
@@ -299,7 +306,7 @@ namespace TemuKJD.BLL.PddApi
return "{\"success\":false, \"error_msg\":\"调用Api编号不能为空\"}";
if (!dict.Keys.Contains("access_token") || string.IsNullOrWhiteSpace(dict["access_token"].ParseToString()))
return "{\"success\":false, \"error_msg\":\"调用令牌不能为空\"}";
var clientSecret = GlobalConfig.PddClentInfoList.FirstOrDefault(c => c.client_id == dict["client_id"].ParseToString())?.client_secret;
var clientSecret = GlobalConfig.PddClientInfoList.FirstOrDefault(c => c.client_id == dict["client_id"].ParseToString())?.client_secret;
if (clientSecret.IsNullOrEmpty())
return "{\"success\":false, \"error_msg\":\"调用密钥不能为空\"}";
+4 -4
View File
@@ -19,7 +19,7 @@ namespace TemuKJD.BLL.PddApi
{
if (isForceRefresh || (shop.AuthUpdateTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
{
if (!GlobalConfig.PddClentInfoList.Any(c => c.client_id == PddApi.clientId_pi_xiu_guan_jia))
if (!GlobalConfig.PddClientInfoList.Any(c => c.client_id == PddApi.clientId_pi_xiu_guan_jia))
return;
string errStr = "";
@@ -107,7 +107,7 @@ namespace TemuKJD.BLL.PddApi
{
var dataStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["data"]);
var serverApiAuthList = JsonHelper.DeserializeJsonToList<AuthInfo>(dataStr);
serverApiAuthList = serverApiAuthList.Where(a => GlobalConfig.PddClentInfoList.Any(c => c.client_id == a.AppKey)).ToList();
serverApiAuthList = serverApiAuthList.Where(a => GlobalConfig.PddClientInfoList.Any(c => c.client_id == a.AppKey)).ToList();
foreach (var serverAuth in serverApiAuthList)
{
var shop = shopList.FirstOrDefault(s => s.ShopId == serverAuth.ShopId);
@@ -169,8 +169,8 @@ namespace TemuKJD.BLL.PddApi
try
{
var clientDataStr = JsonHelper.SerializeObject(JsonHelper.JObjectParse(html)["data"]);
GlobalConfig.PddClentInfoList.Clear();
GlobalConfig.PddClentInfoList.AddRange(JsonHelper.DeserializeJsonToList<PddClientInfo>(clientDataStr));
GlobalConfig.PddClientInfoList.Clear();
GlobalConfig.PddClientInfoList.AddRange(JsonHelper.DeserializeJsonToList<PddClientInfo>(clientDataStr));
}
catch { }
}