| | |
| | | ***********************************************************************/ |
| | | |
| | | using System; |
| | | using System.Linq; |
| | | using System.Threading.Tasks; |
| | | using CoreCms.Net.Configuration; |
| | | using CoreCms.Net.IRepository; |
| | | using CoreCms.Net.IRepository.UnitOfWork; |
| | | using CoreCms.Net.IServices; |
| | | using CoreCms.Net.Model.Entities; |
| | | using static SKIT.FlurlHttpClient.Wechat.Api.Models.CgibinExpressIntracityUpdateStoreRequest.Types; |
| | | |
| | | |
| | | namespace CoreCms.Net.Services |
| | |
| | | _unitOfWork = unitOfWork; |
| | | } |
| | | |
| | | |
| | | |
| | | public async Task<CoreCmsUserGrade> GetDefaultUserGrade() |
| | | { |
| | | return await _unitOfWork.GetDbClient().Queryable<CoreCmsUserGrade>().Where(x => x.isDefault == true).WithCache(300).FirstAsync(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取key |
| | | /// </summary> |
| | | /// <param name="Key"></param> |
| | | /// <returns></returns> |
| | | public async Task<CoreCmsUserGrade> GetUserGradeByValueKey(string Key) |
| | | { |
| | | return await _unitOfWork.GetDbClient().Queryable<CoreCmsUserGrade>().Where(x=>x.valueKey==Key).WithCache(300).FirstAsync(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |