|
|
@ -4,12 +4,13 @@ using Tiobon.Core.Model.Models; |
|
|
|
using Tiobon.Core.Services.BASE; |
|
|
|
using Tiobon.Core.Services.BASE; |
|
|
|
using Tiobon.Core.IRepository.Base; |
|
|
|
using Tiobon.Core.IRepository.Base; |
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
|
using Tiobon.Core.Common.Caches; |
|
|
|
|
|
|
|
using Tiobon.Core.Model; |
|
|
|
|
|
|
|
|
|
|
|
namespace Tiobon.Core.Services |
|
|
|
namespace Tiobon.Core.Services |
|
|
|
{ |
|
|
|
{ |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// 参数配置 (服务) |
|
|
|
/// 参数配置 (服务) |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public class Ghre_ConfigServices : BaseServices<Ghre_Config, Ghre_ConfigDto, InsertGhre_ConfigInput, EditGhre_ConfigInput>, IGhre_ConfigServices |
|
|
|
public class Ghre_ConfigServices : BaseServices<Ghre_Config, Ghre_ConfigDto, InsertGhre_ConfigInput, EditGhre_ConfigInput>, IGhre_ConfigServices |
|
|
|
{ |
|
|
|
{ |
|
|
|
private readonly IBaseRepository<Ghre_Config> _dal; |
|
|
|
private readonly IBaseRepository<Ghre_Config> _dal; |
|
|
@ -19,5 +20,19 @@ namespace Tiobon.Core.Services |
|
|
|
base.BaseDal = dal; |
|
|
|
base.BaseDal = dal; |
|
|
|
base._caching = caching; |
|
|
|
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(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |