Esempio n. 1
0
        public async Task <bool> UserAdd(WxChat chat)
        {
            var isSession = await _repository.ExistsAsync(Q
                                                          .Where(nameof(WxChat.SiteId), chat.SiteId)
                                                          .Where(nameof(WxChat.OpenId), chat.OpenId)
                                                          .Where(nameof(WxChat.IsReply), true)
                                                          .WhereDate(nameof(WxChat.CreatedDate), ">", DateTime.Now.AddDays(-1))
                                                          );

            await _repository.InsertAsync(chat);

            return(isSession);
        }
Esempio n. 2
0
 public async Task ReplyAdd(WxChat chat)
 {
     await _repository.InsertAsync(chat);
 }