Example #1
0
        private static bool IsMatch(WxReplyKeyword keyword, string content)
        {
            if (keyword.Exact)
            {
                return(StringUtils.EqualsIgnoreCase(keyword.Text, content));
            }

            return(StringUtils.ContainsIgnoreCase(keyword.Text, content) ||
                   StringUtils.ContainsIgnoreCase(content, keyword.Text));
        }
Example #2
0
 public async Task UpdateAsync(WxReplyKeyword keyword)
 {
     await _repository.UpdateAsync(keyword, Q
                                   .CachingRemove(GetCacheKey(keyword.SiteId))
                                   );
 }
Example #3
0
 public async Task <int> InsertAsync(WxReplyKeyword keyword)
 {
     return(await _repository.InsertAsync(keyword, Q
                                          .CachingRemove(GetCacheKey(keyword.SiteId))
                                          ));
 }