| | |
| | | /*********************************************************************** |
| | | * Project: CoreCms |
| | | * ProjectName: 核心内容管理系统 |
| | | * Web: https://www.corecms.net |
| | | * Author: 大灰灰 |
| | | * Email: jianweie@163.com |
| | | * CreateTime: 2021/1/31 21:45:10 |
| | | * Project: baifenBinfa |
| | | * ProjectName: 百分兵法管理系统 |
| | | * Web: http://chuanyin.com |
| | | * Author: |
| | | * Email: |
| | | * CreateTime: 202403/02 |
| | | * Description: 暂无 |
| | | ***********************************************************************/ |
| | | |
| | | 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(); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |