店铺退货包裹读取放到后台
This commit is contained in:
1 parent
4693c42024
commit
2a4a3ef744
13 files changed
+1021
-377
No files matched your search
@@ -21,6 +21,7 @@ using System.Threading.Tasks;
|
||||
using Work;
|
||||
using Work.DouyinApiClass;
|
||||
using AllBase.Model.Param.TemuProductManage;
|
||||
using TemuKJD.KJDForms.ShopForms;
|
||||
|
||||
namespace TemuKJD
|
||||
{
|
||||
@@ -216,6 +217,40 @@ namespace TemuKJD
|
||||
//}
|
||||
});
|
||||
#endregion
|
||||
|
||||
#region 读取库存信息
|
||||
Task.Run(() =>
|
||||
{
|
||||
while (!IsShopInit)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
ReturnPackageDetailForm retrunPackageForm = new ReturnPackageDetailForm(null);
|
||||
retrunPackageForm.Show();
|
||||
retrunPackageForm.Hide();
|
||||
Dictionary<ShopLoginInfo, string> dicUpReturn = new Dictionary<ShopLoginInfo, string>();
|
||||
|
||||
while(true)
|
||||
{
|
||||
foreach(var shop in GlobalConfig.ShopLoginList)
|
||||
{
|
||||
if (string.IsNullOrEmpty(shop.ShopId))
|
||||
continue;
|
||||
|
||||
if (dicUpReturn.Keys.Contains(shop) && dicUpReturn[shop] == DateTime.Now.ToString("yyyyMMdd")) //今日已获取过
|
||||
continue;
|
||||
|
||||
var rst = retrunPackageForm.GetReturnPackage(shop, true);
|
||||
if (rst == false && shop.LoginStatus == "登录成功" && shop.LoginStatus2 == "国际版在线")
|
||||
{
|
||||
dicUpReturn[shop] = DateTime.Now.ToString("yyyyMMdd");
|
||||
}
|
||||
}
|
||||
Thread.Sleep(1000 * 60 * 60);
|
||||
}
|
||||
});
|
||||
#endregion
|
||||
}
|
||||
|
||||
public static void InitProxy()
|
||||
|
||||
Reference in new issue
Block a user