public static ShopstatInfo Parse(string stringify) { string[] ret = stringify.Split(new char[] { '|' }, 7, StringSplitOptions.None); if (ret.Length != 7) { throw new Exception("格式不正确,ShopstatInfo:" + stringify); } ShopstatInfo item = new ShopstatInfo(); if (string.Compare("null", ret[0]) != 0) { item.Shop_id = uint.Parse(ret[0]); } if (string.Compare("null", ret[1]) != 0) { item.Today_fav = uint.Parse(ret[1]); } if (string.Compare("null", ret[2]) != 0) { item.Today_session = uint.Parse(ret[2]); } if (string.Compare("null", ret[3]) != 0) { item.Today_share = uint.Parse(ret[3]); } if (string.Compare("null", ret[4]) != 0) { item.Total_fav = uint.Parse(ret[4]); } if (string.Compare("null", ret[5]) != 0) { item.Total_session = uint.Parse(ret[5]); } if (string.Compare("null", ret[6]) != 0) { item.Total_share = uint.Parse(ret[6]); } return(item); }
public ShopstatInfo AddShopstat(ShopstatInfo item) { item.Shop_id = this.Id; return(item.Save()); }
public static string ToJson(this ShopstatInfo item) { return(string.Concat(item)); }