From abf3ceabdd98abd0d955b03732e581a43c4e9fb0 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期一, 13 一月 2025 15:01:31 +0800 Subject: [PATCH] 解决冲突 --- Yw.BLL.Unit.Core/03-localclient/UnitDbFirstHelper.cs | 26 +++++++++++++ Yw.BLL.Unit.Core/04-bll/99-dbfirst/UnitDbFirstHelper.cs | 15 +++++++ Yw.Application.Unit.Core/99-dbfirst/UnitDbFirst_Controller.cs | 25 ++++++++++++ Yw.BLL.Unit.Core/02-httpclient/UnitDbFirstHelper.cs | 21 ++++++++++ Yw.BLL.Unit.Core/01-interface/IUnitDbFirstHelper.cs | 13 ++++++ 5 files changed, 100 insertions(+), 0 deletions(-) diff --git a/Yw.Application.Unit.Core/99-dbfirst/UnitDbFirst_Controller.cs b/Yw.Application.Unit.Core/99-dbfirst/UnitDbFirst_Controller.cs new file mode 100644 index 0000000..ae7c85d --- /dev/null +++ b/Yw.Application.Unit.Core/99-dbfirst/UnitDbFirst_Controller.cs @@ -0,0 +1,25 @@ +锘縩amespace Yw.Application +{ + /// <summary> + /// DbFirst + /// </summary> + [Route("Unit/DbFirst")] + [ApiDescriptionSettings("Unit", Name = "DbFirst", Order = 10000)] + public class UnitDbFirst_Controller : IDynamicApiController + { + /// <summary> + /// 鍒濆鍖� + /// </summary> + [Route("Initial@V1.0")] + [HttpGet] + public bool Initial() + { + var bol = Service.Unit.DbFirstHelper.Initial(out string Msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.L001, Msg); + } + return bol; + } + } +} \ No newline at end of file diff --git a/Yw.BLL.Unit.Core/01-interface/IUnitDbFirstHelper.cs b/Yw.BLL.Unit.Core/01-interface/IUnitDbFirstHelper.cs new file mode 100644 index 0000000..f328a39 --- /dev/null +++ b/Yw.BLL.Unit.Core/01-interface/IUnitDbFirstHelper.cs @@ -0,0 +1,13 @@ +锘縩amespace Yw.CAL +{ + /// <summary> + /// + /// </summary> + public interface IUnitDbFirstHelper : IBaseCAL + { + /// <summary> + /// + /// </summary> + Task<bool> Initial(); + } +} \ No newline at end of file diff --git a/Yw.BLL.Unit.Core/02-httpclient/UnitDbFirstHelper.cs b/Yw.BLL.Unit.Core/02-httpclient/UnitDbFirstHelper.cs new file mode 100644 index 0000000..e4f7175 --- /dev/null +++ b/Yw.BLL.Unit.Core/02-httpclient/UnitDbFirstHelper.cs @@ -0,0 +1,21 @@ +锘縩amespace Yw.CAL.HttpClient +{ + /// <summary> + /// + /// </summary> + public class UnitDbFirstHelper : BaseCAL, IUnitDbFirstHelper + { + protected override string Prefix + { + get { return $"{ConfigHelper.HttpUrl}/Unit/DbFirst"; } + } + + /// <summary> + /// + /// </summary> + public async Task<bool> Initial() + { + return await GetUrl("Initial@V1.0").Get<bool>(); + } + } +} \ No newline at end of file diff --git a/Yw.BLL.Unit.Core/03-localclient/UnitDbFirstHelper.cs b/Yw.BLL.Unit.Core/03-localclient/UnitDbFirstHelper.cs new file mode 100644 index 0000000..b472bc0 --- /dev/null +++ b/Yw.BLL.Unit.Core/03-localclient/UnitDbFirstHelper.cs @@ -0,0 +1,26 @@ +锘縰sing Yw.CAL; + +namespace HStation.CAL.LocalClient +{ + /// <summary> + /// + /// </summary> + public class UnitDbFirstHelper : IUnitDbFirstHelper + { + /// <summary> + /// + /// </summary> + public async Task<bool> Initial() + { + return await Task.Run(() => + { + var bol = Yw.Service.Unit.DbFirstHelper.Initial(out string Msg); + if (!bol) + { + throw YOops.Oh(eResultCode.Alert, InternalErrorCodes.L001, Msg); + } + return bol; + }); + } + } +} \ No newline at end of file diff --git a/Yw.BLL.Unit.Core/04-bll/99-dbfirst/UnitDbFirstHelper.cs b/Yw.BLL.Unit.Core/04-bll/99-dbfirst/UnitDbFirstHelper.cs new file mode 100644 index 0000000..e1c4cea --- /dev/null +++ b/Yw.BLL.Unit.Core/04-bll/99-dbfirst/UnitDbFirstHelper.cs @@ -0,0 +1,15 @@ +锘縩amespace Yw.BLL +{ + /// <summary> + /// + /// </summary> + public class UnitDbFirstHelper : Yw.CAL.IUnitDbFirstHelper + { + private readonly Yw.CAL.IUnitDbFirstHelper _cal = CALCreateHelper.CreateCAL<Yw.CAL.IUnitDbFirstHelper>(); + + public Task<bool> Initial() + { + return _cal.Initial(); + } + } +} \ No newline at end of file -- Gitblit v1.9.3