public HttpResponseMessage GetUser() { string key = "user"; //读库存缓存 var db = RedisHelper.GetRedisDB(); if (!db.KeyExists(key)) { string json = JsonConvert.SerializeObject(GetBll <UserInfo> .createDal().Get()); RedisHelper.SetString(key, json); } string result = RedisHelper.GetString(key); ResultMsg resultMsg = null; resultMsg = new ResultMsg(); resultMsg.StatusCode = (int)StatusCodeEnum.Success; resultMsg.Info = StatusCodeEnum.Success.GetEnumText(); resultMsg.Data = result; HttpResponseMessage obj = new HttpResponseMessage(HttpStatusCode.OK) { Content = new StringContent(JsonConvert.SerializeObject(resultMsg), Encoding.UTF8, "text/json") }; return(obj); }
public int UpdAdmin(AdminInfo admin) { return(GetBll <AdminInfo> .createDal().Upd(admin)); }
public int AddUser(UserInfo user) { return(GetBll <UserInfo> .createDal().Add(user)); }
//修改交易信息 public int UpdDeal(DealRecord deal) { return(GetBll <DealRecord> .createDal().Upd(deal)); }
public int DelAdmin(int id) { return(GetBll <AdminInfo> .createDal().Del(id)); }
//修改用户 public int UpdUser(OrderInfo order) { return(GetBll <OrderInfo> .createDal().Upd(order)); }
//删除交易信息 public int DelDeal(int id) { return(GetBll <DealRecord> .createDal().Del(id)); }
//添加用户 public int AddOrder(OrderInfo order) { return(GetBll <OrderInfo> .createDal().Add(order)); }
//删除用户 public int DelOrder(int id) { return(GetBll <OrderInfo> .createDal().Del(id)); }
//删除物品 public int DelRec(int id) { return(GetBll <Recycles> .createDal().Del(id)); }
//修改物品 public int UpdUser(Recycles recycles) { return(GetBll <Recycles> .createDal().Upd(recycles)); }
//添加物品 public int AddRec(Recycles recycles) { return(GetBll <Recycles> .createDal().Add(recycles)); }
//修改类别 public int UpdCategory(Category category) { return(GetBll <Category> .createDal().Upd(category)); }
//删除类别 public int DelCategory(int id) { return(GetBll <Category> .createDal().Del(id)); }
//修改回收员 public int UpdCollector(CollectorInfo collector) { return(GetBll <CollectorInfo> .createDal().Upd(collector)); }
//删除回收员 public int DelCollector(int id) { return(GetBll <CollectorInfo> .createDal().Del(id)); }