public ResponseModel DeleteContactList(CC_Contact request) { this.Remote.Action = "DeleteContactList"; this.Remote.Content = request.JsonSerialize(); _JSON = this.Remote.GetRemoteData(); return(_JSON.JsonDeserialize <ResponseModel>()); }
/// <summary> /// 活动奖励长度 /// </summary> /// <param name="request"></param> /// <returns></returns> public ResponseModel <long> GetContactLength(CC_Contact request) { this.Remote.Action = "GetContactLength"; this.Remote.Content = request.JsonSerialize(); _JSON = this.Remote.GetRemoteData(); return(_JSON.JsonDeserialize <ResponseModel <long> >()); }
public void SetRedisContact(CC_Contact contact) { RedisOpenAPI.Instance.CCContact().SetContact(new CC_Contact() { CustomerId = contact.CustomerId, ContactType = contact.ContactType, VipId = contact.VipId }); }
public int GetContactLength(CC_Contact contact) { var count = RedisOpenAPI.Instance.CCContact().GetContactLength(new CC_Contact() { CustomerId = contact.CustomerId, ContactType = contact.ContactType, VipId = contact.VipId }); if (count.Code != ResponseCode.Success) { return(0); } else { return(Convert.ToInt32(count.Result)); } }
public HttpResponseMessage DeleteContactList([FromBody] CC_Contact Contact) { try { var db = new RedisOperation(_RedisDB); var key = RedisKeys.CCContactKey(Contact.CustomerId); db.Delete(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 })); } }