public static ExpressInfo GetItem(uint Id) { if (itemCacheTimeout <= 0) return Select.WhereId(Id).ToOne(); string key = string.Concat("pifa_BLL_Express_", Id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) try { return ExpressInfo.Parse(value); } catch { } ExpressInfo item = Select.WhereId(Id).ToOne(); if (item == null) return null; RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return item; }
public static NewstagInfo GetItem(uint Id) { if (itemCacheTimeout <= 0) { return(Select.WhereId(Id).ToOne()); } string key = string.Concat("pifa_BLL_Newstag_", Id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(NewstagInfo.Parse(value)); } catch { } } NewstagInfo item = Select.WhereId(Id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static ShopInfo GetItemByCode(string Code) { if (itemCacheTimeout <= 0) { return(Select.WhereCode(Code).ToOne()); } string key = string.Concat("pifa_BLL_ShopByCode_", Code); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(ShopInfo.Parse(value)); } catch { } } ShopInfo item = Select.WhereCode(Code).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static MarketdescInfo GetItem(uint Market_id) { if (itemCacheTimeout <= 0) { return(Select.WhereMarket_id(Market_id).ToOne()); } string key = string.Concat("pifa_BLL_Marketdesc_", Market_id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(MarketdescInfo.Parse(value)); } catch { } } MarketdescInfo item = Select.WhereMarket_id(Market_id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static Shop_franchisingInfo GetItem(uint Franchising_id, uint Shop_id) { if (itemCacheTimeout <= 0) { return(Select.WhereFranchising_id(Franchising_id).WhereShop_id(Shop_id).ToOne()); } string key = string.Concat("pifa_BLL_Shop_franchising_", Franchising_id, "_,_", Shop_id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(Shop_franchisingInfo.Parse(value)); } catch { } } Shop_franchisingInfo item = Select.WhereFranchising_id(Franchising_id).WhereShop_id(Shop_id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static ShopsecurityInfo GetItemByIdcard(string Idcard) { if (itemCacheTimeout <= 0) { return(Select.WhereIdcard(Idcard).ToOne()); } string key = string.Concat("pifa_BLL_ShopsecurityByIdcard_", Idcard); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(ShopsecurityInfo.Parse(value)); } catch { } } ShopsecurityInfo item = Select.WhereIdcard(Idcard).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static MemberInfo GetItemByEmail(string Email) { if (itemCacheTimeout <= 0) { return(Select.WhereEmail(Email).ToOne()); } string key = string.Concat("pifa_BLL_MemberByEmail_", Email); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(MemberInfo.Parse(value)); } catch { } } MemberInfo item = Select.WhereEmail(Email).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static Product_attrInfo GetItem(uint Pattr_id, uint Product_id) { if (itemCacheTimeout <= 0) { return(Select.WherePattr_id(Pattr_id).WhereProduct_id(Product_id).ToOne()); } string key = string.Concat("pifa_BLL_Product_attr_", Pattr_id, "_,_", Product_id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(Product_attrInfo.Parse(value)); } catch { } } Product_attrInfo item = Select.WherePattr_id(Pattr_id).WhereProduct_id(Product_id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static Order_addressInfo GetItem(uint Order_id) { if (itemCacheTimeout <= 0) { return(Select.WhereOrder_id(Order_id).ToOne()); } string key = string.Concat("pifa_BLL_Order_address_", Order_id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(Order_addressInfo.Parse(value)); } catch { } } Order_addressInfo item = Select.WhereOrder_id(Order_id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }
public static Area_categoryInfo GetItem(uint Area_id, uint Category_id) { if (itemCacheTimeout <= 0) { return(Select.WhereArea_id(Area_id).WhereCategory_id(Category_id).ToOne()); } string key = string.Concat("pifa_BLL_Area_category_", Area_id, "_,_", Category_id); string value = RedisHelper.Get(key); if (!string.IsNullOrEmpty(value)) { try { return(Area_categoryInfo.Parse(value)); } catch { } } Area_categoryInfo item = Select.WhereArea_id(Area_id).WhereCategory_id(Category_id).ToOne(); if (item == null) { return(null); } RedisHelper.Set(key, item.Stringify(), itemCacheTimeout); return(item); }