优化了微店商品上传 优化pdd买手读单
This commit is contained in:
1 parent
6c4f16b897
commit
f360688c43
62 files changed
+5620
-1432
No files matched your search
@@ -2861,7 +2861,7 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
|
||||
=> row.Cells["colSelect"]?.Value.ParseToBool() == true).Select(r => r.Cells["colShopId"]?.Value.ToString()).ToList();
|
||||
foreach (var shop in GlobalConfig.ShopLoginList)
|
||||
{
|
||||
if (isForceRefresh || (shop.AuthAddTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
|
||||
if (isForceRefresh || (shop.AuthUpdateTime <= DateTime.Now.AddDays(-1) && shop.AuthExpiresTime <= DateTime.Now))
|
||||
{
|
||||
Invoke(new Action(() =>
|
||||
{
|
||||
@@ -2876,26 +2876,26 @@ namespace TemuKJD.PDDForms.ProductForms.ActivityForms
|
||||
}));
|
||||
}
|
||||
}
|
||||
List<List<AuthInfo>> NewApiInfolsts = JsonHelper.DeserializeJsonToList<List<AuthInfo>>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList()));
|
||||
foreach (var newLst in NewApiInfolsts)
|
||||
{
|
||||
if (newLst.FirstOrDefault()!= null)
|
||||
{
|
||||
var oldApiAuths = PddApiHelper.LstAuthInfos.FirstOrDefault(oldLst => oldLst.FirstOrDefault()?.ShopId == newLst.FirstOrDefault().ShopId);
|
||||
if (oldApiAuths != null)
|
||||
{
|
||||
oldApiAuths.Clear();
|
||||
oldApiAuths.AddRange(newLst);
|
||||
}
|
||||
else
|
||||
{
|
||||
PddApiHelper.LstAuthInfos.Add(newLst);
|
||||
}
|
||||
}
|
||||
}
|
||||
//List<List<AuthInfo>> NewApiInfolsts = JsonHelper.DeserializeJsonToList<List<AuthInfo>>(JsonHelper.SerializeObject(GlobalConfig.ShopLoginList.Select(s => s.ApiAuthInfoList).ToList()));
|
||||
//foreach (var newLst in NewApiInfolsts)
|
||||
//{
|
||||
// if (newLst.FirstOrDefault()!= null)
|
||||
// {
|
||||
// var oldApiAuths = PddApiHelper.LstAuthInfos.FirstOrDefault(oldLst => oldLst.FirstOrDefault()?.ShopId == newLst.FirstOrDefault().ShopId);
|
||||
// if (oldApiAuths != null)
|
||||
// {
|
||||
// oldApiAuths.Clear();
|
||||
// oldApiAuths.AddRange(newLst);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// PddApiHelper.LstAuthInfos.Add(newLst);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
PddApiHelper.LstAuthInfos = PddApiHelper.LstAuthInfos.Where(a => a.OrderBy(o => o.AddTime).LastOrDefault().AddTime > DateTime.Now.AddDays(-30)).ToList();
|
||||
NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", PddApiHelper.LstAuthInfos);
|
||||
//PddApiHelper.LstAuthInfos = PddApiHelper.LstAuthInfos.Where(a => a.OrderBy(o => o.UpdateTime).LastOrDefault().UpdateTime > DateTime.Now.AddDays(-30)).ToList();
|
||||
//NaiBa.Util.Helper.ConfigHelper.SaveConfig("pdd_shop_api_auth_info_lists", PddApiHelper.LstAuthInfos);
|
||||
Invoke(new Action(() => { pbShopLoading.Visible = false; }));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user