Beispiel #1
0
 public HttpResponseMessage GetBIUserDataLength()
 {
     try
     {
         var db     = new RedisOperation(RedisDBEnum.Default);
         var result = db.GetListLength(RedisKeys.BIBuryingKey);
         return(Request.CreateResponse(HttpStatusCode.OK, new
         {
             code = "0000",
             message = "success",
             result = result
         }));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.OK, new
         {
             code = "0001",
             message = "fail:" + ex.Message
         }));
     }
 }
Beispiel #2
0
 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
         }));
     }
 }
Beispiel #3
0
 public HttpResponseMessage GetCouponListLength([FromBody] CC_Coupon couponData)
 {
     try
     {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCCouponKey(couponData.CustomerId, couponData.CouponTypeId);
         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
         }));
     }
 }