Exemple #1
0
 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
         }));
     }
 }
Exemple #2
0
 public HttpResponseMessage GetRechargeOrder([FromBody] CC_Order order)
 {
     try
     {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCRechargeOrder(order.CustomerID);
         var result = db.SelectListQueue <CC_Order>(key);
         if (result.CustomerID.IsNullStr())
         {
             return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
             {
                 Code = ResponseCode.DataNotFound,
                 Message = "success"
             }));
         }
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <CC_Order>
         {
             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 GetSuperRetailTraderOrder([FromBody] CC_Order Order)
 {
     try
     {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCSuperRetailTraderOrder(Order.CustomerID);
         var result = db.SelectListQueue <CC_Order>(key);  //队列按照先进先出的原则,左边进右边出
         if (result.CustomerID.IsNullStr() || result.LogSession == null || result.OrderInfo == null)
         {
             return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
             {
                 Code = ResponseCode.DataNotFound,
                 Message = "success"
             }));
         }
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <CC_Order>
         {
             Code = ResponseCode.Success,
             Message = "success",
             Result = result
         }));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
         {
             Code = ResponseCode.Fail,
             Message = "fail:" + ex.Message
         }));
     }
 }
Exemple #4
0
 public HttpResponseMessage GetBIUserData()
 {
     try
     {
         var db     = new RedisOperation(RedisDBEnum.Default);
         var result = db.SelectListQueue <BuryingPointEntity>(RedisKeys.BIBuryingKey);
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <BuryingPointEntity>
         {
             Code = ResponseCode.Success,
             Message = "success",
             Result = result
         }));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
         {
             Code = ResponseCode.Fail,
             Message = "fail:" + ex.Message
         }));
     }
 }
Exemple #5
0
 public HttpResponseMessage GetContact([FromBody] CC_Contact Contact)
 {
     try
     {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCContactKey(Contact.CustomerId);
         var result = db.SelectListQueue <CC_Contact>(key);
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <CC_Contact>
         {
             Code = ResponseCode.Success,
             Message = "success",
             Result = result
         }));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
         {
             Code = ResponseCode.Fail,
             Message = "fail:" + ex.Message
         }));
     }
 }
Exemple #6
0
 public HttpResponseMessage GetPrizePools([FromBody] CC_PrizePool prizePoolData)
 {
     try
     {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCPrizePoolsKey(prizePoolData.CustomerId, prizePoolData.EventId);
         var result = db.SelectListQueue <CC_PrizePool>(key);
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel <CC_PrizePool>
         {
             Code = ResponseCode.Success,
             Message = "success",
             Result = result
         }));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, new ResponseModel
         {
             Code = ResponseCode.Fail,
             Message = "fail:" + ex.Message
         }));
     }
 }