public RedisAppReviewEvidence updateStatus(string userPhone, string status) { using (var redis = new ann_shop_redis()) { var byteEvidence = redis.HGet( APP_REVIEW_EVIDENCE, _convertToByte(userPhone) ); if (byteEvidence != null) { var evidence = JsonConvert.DeserializeObject <RedisAppReviewEvidence>(_convertToString(byteEvidence)); evidence.status = status; redis.HSet( APP_REVIEW_EVIDENCE, _convertToByte(evidence.userPhone), _convertToByte(JsonConvert.SerializeObject(evidence)) ); return(evidence); } return(null); } }
/// <summary> /// Lấy thông tin review của app của khách hàng /// </summary> /// <param name="userPhone"></param> /// <returns></returns> public RedisAppReviewEvidence get(string userPhone) { using (var redis = new ann_shop_redis()) { var byteEvidence = redis.HGet( APP_REVIEW_EVIDENCE, _convertToByte(userPhone) ); if (byteEvidence != null) { return(JsonConvert.DeserializeObject <RedisAppReviewEvidence>(_convertToString(byteEvidence))); } return(null); } }