public DisplayNotice ShouldDisplayNotice(string sign, int theMonth) { var redis = _redisHelper.GetDatabase(); string awardeeKey = string.Format(KEY_AWARDEE_NOTICE, theMonth); if (redis.KeyExists(awardeeKey)) { if (!_redisHelper.SetContains(awardeeKey, sign)) { return(DisplayNotice.Awardee); } } string awardKey = string.Format(KEY_AWARD_NOTICE, theMonth); if (redis.KeyExists(awardKey)) { if (!_redisHelper.SetContains(awardKey, sign)) { return(DisplayNotice.Award); } } return(DisplayNotice.None); }
public bool HasLovedMotto(string uid, long mid) { var key = string.Format(KEY_USER_ALL_LOVED_MOTTOS_FMT, uid); return(_redisHelper.SetContains(key, mid.ToString())); }