Esempio n. 1
0
        public HttpResponseMessage DeleteActivity([FromBody] ActivityVipMapping data)
        {
            try {
                var db  = new RedisOperation(_RedisDB);
                var key = RedisKeys.CCActivity(data.CustomerId, data.ActivityId);
                db.DeleteSet(key);

                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
                }));
            }
        }