using Entity.DbModel.System;
using HybirdFrameworkCore.Autofac.Attribute;
using Repository.System;
namespace Service.Mgr
{
[Scope("SingleInstance")]
public class SysDictDataMgr
{
private readonly SysDicDataRepository _sysDictDataRep;
public SysDictDataMgr(SysDicDataRepository sysDicTypeRep)
{
_sysDictDataRep = sysDicTypeRep;
}
///
/// 根据字典类型Id获取字典值集合
///
///
///
public async Task> GetDictDataListByDictTypeId(long dictTypeId)
{
return await _sysDictDataRep.QueryByOrderByClauseAsync(
u => u.DictTypeId == dictTypeId, u => new { u.OrderNo, u.Code });
}
///
/// 根据字典类型Id删除字典值
///
///
///
public async Task DeleteDictData(long dictTypeId)
{
return await _sysDictDataRep.DeleteAsync(u => u.DictTypeId == dictTypeId);
}
}
}