namespace Yw.CAL.HttpClient
{
///
/// 系统字典值
///
public partial class SysDictData : BaseCAL_Code_Sorter, ISysDictData
{
protected override string Prefix
{
get { return $"{Yw.BLL.ConfigHelper.HttpUrl}/Dict/Type"; }
}
protected override string GetUrl(string cmd)
{
return default;
}
///
/// 通过 TypeID 获取
///
public async Task> GetByTypeID(long TypeID)
{
var url = GetUrl("GetByTypeID@1.0");
var result = await RequestHelper.Request(url)
.SetQueryParam(nameof(TypeID), TypeID).GetAsync().ReceiveJson>>();
result.TryThrowException();
return result.Data;
}
///
/// 通过 TypeID 删除
///
public async Task DeleteByTypeID(long TypeID)
{
var url = GetUrl("DeleteByTypeID@1.0");
var result = await RequestHelper.Request(url)
.SetQueryParam(nameof(TypeID), TypeID).DeleteAsync().ReceiveJson>();
result.TryThrowException();
return result.Data;
}
}
}