//----------SysConfig开始----------
using System;
using System.Threading.Tasks;
using Admin.Core.IRepository;
using Admin.Core.IService.ISys;
using Admin.Core.Model.Sys;
namespace Admin.Core.Service.Sys
{
///
/// 参数配置表Service
///
public partial class SysConfigService : BaseServices, ISysConfigService
{
IBaseRepository dal;
public SysConfigService(IBaseRepository dal)
{
this.dal = dal;
BaseDal = dal;
}
///
/// 检查参数Key是否存在
///
///
///
public async Task CheckConfigKeyUnique(SysConfig sysConfig)
{
return (await dal.QueryAsync(x => x.ConfigID != sysConfig.ConfigID && x.ConfigKey == sysConfig.ConfigKey)).Count > 0;
}
}
}
//----------SysConfig结束----------