/// <summary> /// 处理区域代理过期 /// </summary> public static void AgentAreaEnd() { List <Lebi_Agent_Area> areas = B_Lebi_Agent_Area.GetList("User_id>0 and datediff(d,Time_end,'" + System.DateTime.Now.Date + "')>" + ShopCache.GetBaseConfig().AgentEndDays + "", ""); foreach (Lebi_Agent_Area area in areas) { area.User_id = 0; area.User_UserName = ""; B_Lebi_Agent_Area.Update(area); } }
/// <summary> /// 处理区域代理过期 /// </summary> public static void AgentAreaEnd() { int d = 0; int.TryParse(ShopCache.GetBaseConfig().AgentEndDays, out d); d = 0 - d; List <Lebi_Agent_Area> areas = B_Lebi_Agent_Area.GetList("User_id>0 and Time_end<'" + System.DateTime.Now.Date.AddDays(d) + "')", ""); foreach (Lebi_Agent_Area area in areas) { area.User_id = 0; area.User_UserName = ""; B_Lebi_Agent_Area.Update(area); } }