parent
f7642c0090
commit
51362eaa0c
@ -0,0 +1,25 @@
|
||||
using Entity.DbModel.Station;
|
||||
using HybirdFrameworkCore.Autofac.Attribute;
|
||||
using Repository.Station;
|
||||
namespace Service.Station;
|
||||
|
||||
[Scope("SingleInstance")]
|
||||
public class ElecPriceModelVersionService : BaseServices<ElecPriceModelVersion>
|
||||
{
|
||||
ElecPriceModelVersionRepository _elecPriceModelVersionRepository;
|
||||
public ElecPriceModelVersionService(ElecPriceModelVersionRepository dal)
|
||||
{
|
||||
_elecPriceModelVersionRepository = dal;
|
||||
BaseDal = dal;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回当前版本号
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<int> GetNowVersion()
|
||||
{
|
||||
ElecPriceModelVersion elecPriceModelVersion =await _elecPriceModelVersionRepository.QueryByClauseAsync(u => u.EndTime > DateTime.Now);
|
||||
return elecPriceModelVersion.Version;
|
||||
}
|
||||
}
|
Loading…
Reference in new issue