コード例 #1
0
ファイル: CCActivityController.cs プロジェクト: radtek/crm
 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
         }));
     }
 }