using AllBase.Model.Param.FissionManage; using CefSharp.WinForms; using NaiBa.Util; 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 ShopLoginInfo { 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 Notes { get; set; } public string CompanyName { get; set; } public string ShopToken { get; set; } public string Signature { get; set; } public string TouTiaoId { get; set; } public string Cookies { get; set; } = ""; public string Cookies2 { get; set; } = ""; public string pddid { get; set; } public ConcurrentList AntiContents { get; set; } = new ConcurrentList(); public string openid { get; set; } public Dictionary DictMultiCookies { get; set; } = new Dictionary(); public string LoginStatus { get; set; } public string LoginStatus2 { 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 GroupName { 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 UserName { get; set; } /// /// 子账户 /// public string SubUserName { get; set; } /// /// 分管二级账户 /// public string OperateSubSaName { 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; /// /// 月选品上传限额剩余,默认40 /// public int AddProductRemaining { get; set; } [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(); //在一次检测中是否已检测同一个账户下的不同店铺,如果已检测,使用相同cookie即可,不用多次检测 public bool isCheckLogin { get; set; } /// /// temu推广直通车用户Id /// public string ad_seller_unique_id { get; set; } /// /// temu推广直通车链接地址(含信息) /// public string ad_url { get; set; } /// /// temu推广直通车cookie /// public string ad_cookie { get; set; } /// /// temu推广直通车登录状态 /// public string ad_login_status { get; set; } public DateTime? jit_expire_time { get; set; } } 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 int id { get; set; } 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 s = "未定义"; if (group_id == "3") s = "主账户"; if (group_id == "4") s = "客服"; if (group_id == "9") s = "采购"; if (group_id == "5") s = "加盟"; if (group_id == "10") s = "上货"; if (group_id == "11") s = "数据"; if (group_id == "8") s = "登录"; return s; } } public int shop_count { get; set; } public int sa_level { get; set; } public string sa_level_name { get { var s = "普通用户"; if (sa_level == 1) s = "一级超管"; if (sa_level == 2) s = "二级超管"; return s; } } /// /// 用户(JIT推单)授权金额 /// public decimal? authorized_amount { get; set; } } public class ShopSubAccountInfo : 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; } /// /// 拼多多校验数据列表 /// public string AntiContent { get; set; } /// /// 微信小店开放Id信息 /// public string openid { get; set; } } public class ShopOrderStatisticsInfo { #region 店铺基础信息 public long shop_id { get; set; } public string shop_account { get; set; } /// /// 备注/分组 /// public string notes { get; set; } #endregion #region 四个模块是否读取成功 /// /// 首页订单信息 /// public bool is_search_1 { get; set; } = false; /// /// 日到账金额信息 /// public bool is_search_2 { get; set; } = false; /// /// 月到账金额信息 /// public bool is_search_3 { get; set; } = false; /// /// 店铺保证金信息 /// public bool is_search_4 { get; set; } = false; /// /// 店铺利润详情计算 /// public bool is_search_5 { get; set; } = false; public string err_msg { get; set; } #endregion /// /// 首页订单信息 有已发布商品 /// public bool? havePublishProduct { get; set; } = null; /// /// 首页订单信息 缺货数量? /// public int? lackSkcNumber { get; set; } = null; /// /// 首页订单信息 建议备货 /// public int? advicePrepareSkcNumber { get; set; } = null; /// /// 首页订单信息 商品信息待修改 /// public int? waitProductNumber { get; set; } = null; /// /// 首页订单信息 调价待确认 /// public int? adjustPrice { get; set; } = null; /// /// 首页订单信息 开款待价格确认 /// public int? reviewAdjustPrice { get; set; } = null; /// /// 首页订单信息 在售商品数 /// public int? onSaleProductNumber { get; set; } = null; /// /// 首页订单信息 今日销量 /// public int? saleVolume { get; set; } = null; /// /// 首页订单信息 近7日销量 /// public int? sevenDaysSaleVolume { get; set; } = null; /// /// 首页订单信息 近30日销量 /// public int? thirtyDaysSaleVolume { get; set; } = null; //public ShopStatisticsPermissionsInfo permissions { get; set; } /// /// 首页订单信息 即将售罄(商品数量) /// public int? aboutToSellOutNumber { get; set; } = null; /// /// 首页订单信息 已经售罄(商品数量) /// public int? alreadySoldOutNumber { get; set; } = null; /// /// 首页订单信息 近90天品质售后率 /// public int? qualityAfterSaleRatio90d { get; set; } = null; /// /// 首页订单信息 高价限流商品数 /// public int? highPriceLimitNumber { get; set; } = null; public decimal? yesterdayIncomeAmount { get; set; } = 0; public decimal? thisMonthIncomeAmount { get; set; } = 0; public decimal? lastMonthIncomeAmount { get; set; } = 0; /// /// 可提现金额(可用余额) /// public decimal? availableBalance { get; set; } = 0; /// /// 预留额度(门槛)(这两个不清楚具体哪个对哪个) /// public decimal? mallDepositThreshold { get; set; } = 0; /// /// 账户预留金额(这两个不清楚具体哪个对哪个) /// public decimal? mallDepositLimitAmount { get; set; } = 0; /// /// 提现总金额 /// public decimal? withdrawCashAmount { get; set; } = 0; /// /// 今日利润(通过KJD库获取进货价计算获得) /// public decimal? todayProfit { get; set; } = null; /// /// 近7日利润(通过KJD库获取进货价计算获得) /// public decimal? sevenDaysProfit { get; set; } = null; /// /// 近30日利润(通过KJD库获取进货价计算获得) /// public decimal? thirtyDaysProfit { get; set; } = null; /// /// 销售货值 /// public decimal? goodsValue { get; set; } /// /// 成本 /// public decimal? goodsCost { get; set; } } public class ShopWorkStatisticsInfo { #region 店铺基础信息 public long shop_id { get; set; } public string shop_account { get; set; } /// /// 备注/分组 /// public string notes { get; set; } #endregion #region 两个模块是否读取成功 /// /// 首页订单信息 /// public bool is_search_1 { get; set; } = false; /// /// 日到账金额信息 /// public bool is_search_2 { get; set; } = false; public string err_msg { get; set; } #endregion public int? waitCreat { get; set; } public int? waitSend { get; set; } /// /// 已缺货 /// public int? lackNum { get; set; } /// /// 已断货 /// public int? completelySoldOutSkcNum { get; set; } /// /// 已断码 /// public int? saleOutSkcNum { get; set; } /// /// 即将断码 /// public int? soonSaleOutSkcNum { get; set; } /// /// 建议备货 /// public int? adviceStockSkcNum { get; set; } /// /// 热销款库存不足 /// public int? hotInventoryLackNum { get; set; } /// /// 站外广告曝光中 /// public int? adSkcNum { get; set; } } //public class ShopStatisticsPermissionsInfo //{ // public bool? thirtyDaysSaleVolume { get; set; } // public bool? qualityAfterSaleRatio90d { get; set; } // public bool? adjustPrice { get; set; } // public bool? alreadySoldOutNumber { get; set; } // public bool? reviewAdjustPrice { get; set; } // public bool? aboutToSellOutNumber { get; set; } // public bool? advicePrepareSkcNumber { get; set; } // public bool? waitProductNumber { get; set; } // public bool? highPriceLimitNumber { get; set; } // public bool? saleVolume { get; set; } // public bool? lackSkcNumber { get; set; } // public bool? sevenDaysSaleVolume { get; set; } // public bool? onSaleProductNumber { get; set; } //} }