You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Tiobon.Web/Tiobon.Core.Services/Ghre/Ghre_ConfigServices.cs

29 lines
949 B

namespace Tiobon.Core.Services;
/// <summary>
/// 参数配置 (服务)
/// </summary>
public class Ghre_ConfigServices : BaseServices<Ghre_Config, Ghre_ConfigDto, InsertGhre_ConfigInput, EditGhre_ConfigInput>, IGhre_ConfigServices
{
private readonly IBaseRepository<Ghre_Config> _dal;
public Ghre_ConfigServices(ICaching caching, IBaseRepository<Ghre_Config> dal)
{
this._dal = dal;
base.BaseDal = dal;
base._caching = caching;
}
public async Task<ServiceResult> BulkUpdateValue(List<Ghre_ConfigDto> entitys)
{
for (int i = 0; i < entitys.Count; i++)
{
await Db.Updateable<Ghre_Config>()
.SetColumns(it => new Ghre_Config()
{
ConfigValue = entitys[i].ConfigValue
})
.Where(x => x.Id == entitys[i].Id).ExecuteCommandAsync();
}
return ServiceResult.OprateSuccess();
}
}