Exemplo n.º 1
0
 public HttpResponseMessage SetActivityVipId([FromBody] ActivityVipMapping data)
 {
     try {
         var db     = new RedisOperation(_RedisDB);
         var key    = RedisKeys.CCActivity(data.CustomerId, data.ActivityId);
         var result = db.InsertSet(key, data.VipId);
         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
         }));
     }
 }