using Hncore.Infrastructure.Service; using Hncore.Pass.Vpn.Domain; using Hncore.Wx.Open; using Microsoft.AspNetCore.Http; using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Hncore.Pass.Vpn.Service { public partial class WxAppUserService : ServiceBase { WxAppService m_WxAppService; public WxAppUserService(WxAppService _WxAppService, CourseContext dbContext, IHttpContextAccessor httpContextAccessor) : base(dbContext, httpContextAccessor) { m_WxAppService = _WxAppService; } public async Task> GetWxUsers(List UserId) { return await this.Query(m => UserId.Contains(m.UserId)).ToListAsync(); } public async Task GetWxUser(string appId, int userId) { return await this.Query(m => m.Appid == appId && m.UserId == userId).FirstOrDefaultAsync(); } public async Task GetWxUser(string appId, string openId) { return await this.Query(m => m.Appid == appId && m.Openid == openId).FirstOrDefaultAsync(); } } }