using AllBase.Model.Param.FissionManage; using CefSharp.WinForms; using NaiBa.Util.Extension; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Web.Script.Serialization; using System.Xml.Serialization; namespace AllBase.Model.Result { public class DouShopLoginInfo { public string DbId { get; set; } public string LoginName { get; set; } public string Password { get; set; } public string ShopId { get; set; } = ""; public string ShopAccount { get; set; } = ""; public string Mobile { get; set; } public string ShopToken { get; set; } public string Signature { get; set; } public string TouTiaoId { get; set; } public string Cookies { get; set; } = ""; public Dictionary DictMultiCookies { get; set; } = new Dictionary(); public string LoginStatus { get; set; } public string ApiAuthStatus { get; set; } public List LstBrand { get; set; } /// /// 客服账户 /// public string ChatAccount { get { string accountStr = ""; foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "客服") accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } } /// /// 上货账户 /// public string UploadAccount { get { string accountStr = ""; foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "上货") accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } } /// /// 拍单(采购)用户账户 /// public string BuyAccount { get { string accountStr = ""; foreach (var sub in this.ShopSubAccountList) { if (sub.group_name == "采购") accountStr += sub.user_name + ","; } return accountStr.TrimEnd(','); } } public string Group { get; set; } public string LastRefreshDate { get; set; } public string AccessToken { get { return CurrentAuthInfo?.AccessToken; } } public string RefreshToken { get { return CurrentAuthInfo?.RefreshToken; } } public string AppKey { get { return CurrentAuthInfo?.AppKey; } } public DateTime AddTime { get { return CurrentAuthInfo?.AddTime == null ? new DateTime() : CurrentAuthInfo.AddTime; } } public DateTime ExpiresTime { get { return CurrentAuthInfo?.ExpiresTime == null ? new DateTime() : CurrentAuthInfo.ExpiresTime; } } /// /// 店铺运费模板 /// public long ExpressId { get; set; } /// /// 店铺是否可上传 /// public bool CanUpload = true; /// /// 店铺状态信息 /// public string Message; public List ApiAuthInfoList { get; set; } = new List(); public AuthInfo CurrentAuthInfo { get { return this.ApiAuthInfoList.OrderBy(a => a.ExpiresTime).LastOrDefault(); } } /// /// 拍单Api授权信息 /// public AuthInfo BuyApiAuth { get; set; } = new AuthInfo(); /// /// 子账户 /// public string SubUserName { get; set; } /// /// 子账户列表(抖店用) /// public List ShopSubAccountList { get; } = new List(); public int OnlineProductCount { get; set; } = -1; public int OfflineProductCount { get; set; } = -1; [JsonIgnore] [ScriptIgnore] [XmlIgnore] public ChromiumWebBrowser Chat { get; set; } = null; public int PayStatus { get; set; } = 0; /// /// 试用版最大上货计数,超过100限制 /// public int TrialUploadCount { get; set; } = 0; /// /// 试用版最大上货计数,超过100限制 /// public int TrialOperateCount { get; set; } = 0; [JsonIgnore] [ScriptIgnore] [XmlIgnore] public int UploadCount { get; set; } = 0; public int X { get; set; } public int Y { get; set; } public List LstShopCategory { get; set; } = new List(); } public class AuthInfo { public string AccessToken { get; set; } = ""; public string RefreshToken { get; set; } = ""; public string AppKey { get; set; } = ""; public DateTime ExpiresTime { get; set; } public DateTime AddTime { get; set; } public string ApiAuthStatus { get; set; } = "未授权"; } public class SubAccountInfo { public string user_name { get; set; } public string nick_name { get; set; } public string mobile { get; set; } public string group_id { get; set; } public string group_name { get { var n = "未定义"; if (group_id == "3") n = "主账户"; if (group_id == "4") n = "客服"; if (group_id == "9") n = "采购"; if (group_id == "5") n = "加盟"; if (group_id == "10") n = "上货"; if (group_id == "11") n = "数据"; if (group_id == "8") n = "登录"; return n; } } public int shop_count { get; set; } public int id { get; set; } } public class DouShopSubAccountInfo : SubAccountInfo { public string shop_login_name { get; set; } public string sub_user_id { get { return id.ToString(); } set { id = value.ParseToInt(); } } public string sub_user_name { get { return user_name; } set { user_name = value; } } public string status { get; set; } = "1"; public string company_id { get; set; } public string company_name { get; set; } } public class BrandInfo { public string brand_chinese_name { get; set; } public string brand_english_name { get; set; } public string brand_reg_num { get; set; } public long id { get; set; } } // temu 一个登录账号下可以有多个店铺 public class ShopCompany { public string UserName { get; set; } public string LoginName { get; set; } public string AccountId { get; set; } public string AccountName { get; set; } public string LoginStatus { get; set; } } }