public HttpResponseMessage GetOrderSend([FromBody] CC_OrderSend OrderSend) { try { var db = new RedisOperation(_RedisDB); var key = RedisKeys.CCOrderSend(OrderSend.CustomerID); var result = db.SelectListQueue <CC_OrderSend>(key); if (result.CustomerID.IsNullStr() || result.ConfigData == null || result.OrderSendData == null) { return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel { Code = ResponseCode.DataNotFound, Message = "success" })); } return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <CC_OrderSend> { Code = ResponseCode.Success, Message = "success", Result = result })); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel { Code = ResponseCode.Fail, Message = "fail:" + ex.Message })); } }
public HttpResponseMessage SetOrderSend([FromBody] CC_OrderSend OrderSend) { try { var db = new RedisOperation(_RedisDB); var key = RedisKeys.CCOrderSend(OrderSend.CustomerID); db.InsertListQueue(key, OrderSend); return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel { Code = ResponseCode.Success, Message = "success" })); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel { Code = ResponseCode.Fail, Message = "fail:" + ex.Message })); } }
public HttpResponseMessage GetOrderSendLength([FromBody] CC_OrderSend OrderSend) { try { var db = new RedisOperation(_RedisDB); var key = RedisKeys.CCOrderSend(OrderSend.CustomerID); var result = db.GetListLength(key); return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <long> { Code = ResponseCode.Success, Message = "success", Result = result })); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel { Code = ResponseCode.Fail, Message = "fail:" + ex.Message })); } }