店铺单店token获取并使用逻辑实现

This commit is contained in:
wule committed 2026-02-06 15:13:43 +08:00
1 parent 4fd8d9cc17
commit b42155ae6c
12 files changed
+289 -203

No files matched your search

@@ -676,5 +676,60 @@ namespace KJD_Web.BLL.WXXD
}
return "{\"code\":19999,\"msg\":\"输入为空\"}";
}
public string E57GetFreightTemplate(string inputData)
{
if (string.IsNullOrEmpty(inputData))
return "{\"code\":19999,\"msg\":\"输入为空\"}";
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
// 供应商id
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
try
{
// 获取运费模板
//"https://po.e57.cn/prod-api/api/sys-api/system/open/api/freightTemplate/list?warehouseNum=10361546";
var urlShip = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/freightTemplate/list?warehouseNum=" + coid;
var shipRst = HttpUtils.e57GetResponse(urlShip, "");
return shipRst;
}
catch (Exception ex)
{
return "{\"code\":50001,\"msg\":\"" + ex.Message + "\"}";
}
}
public string E57AfterSale(string inputData)
{
if (string.IsNullOrEmpty(inputData))
return "{\"code\":19999,\"msg\":\"输入为空\"}";
var time = RegexUtils.GetStringQuery(ref inputData, "time").ParseToInt();
string time1 = RegexUtils.GetStringQuery(ref inputData, "code");
if (time1 != EncrypUtil.Encryption(time))
return "{\"code\":50000,\"msg\":\"校验失败\"}";
// 供应商id
string coid = RegexUtils.GetStringQuery(ref inputData, "coid")?.Replace("'", "\\'");
try
{
// 获取推单售后地址
//https://po.e57.cn/prod-api/api/sys-api/system/open/api/afterSale/info?warehouseNum=10361546&shopId=46568955
var urlAfter = "https://po.e57.cn/prod-api/api/sys-api/system/open/api/afterSale/info?warehouseNum=" + coid;
var shipRst = HttpUtils.e57GetResponse(urlAfter, "");
return shipRst;
}
catch (Exception ex)
{
return "{\"code\":50001,\"msg\":\"" + ex.Message + "\"}";
}
}
}
}