From bfecdacb76d3a6c5d99cd44a78f70f06316f7f0b Mon Sep 17 00:00:00 2001 From: liguoyang Date: Thu, 11 Jan 2024 14:49:31 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=8F=96=E6=B6=88=E5=8C=BF=E5=90=8D?= =?UTF-8?q?=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/BusinessPlacesController.cs | 2 -- .../Device/Controllers/DevicesController.cs | 2 -- .../Order/Controllers/OrdersController.cs | 1 - Src/Dlhis.Entity/Basic/Entity/DeviceEntity.cs | 2 +- Src/Dlhis.User.Api/ITenantApi.cs | 14 +++++++++++++- .../Identity/Controllers/TenantsController.cs | 1 - 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/Src/Dlhis.Basic/BusinessPlace/Controllers/BusinessPlacesController.cs b/Src/Dlhis.Basic/BusinessPlace/Controllers/BusinessPlacesController.cs index c5ed0e73..9649c414 100644 --- a/Src/Dlhis.Basic/BusinessPlace/Controllers/BusinessPlacesController.cs +++ b/Src/Dlhis.Basic/BusinessPlace/Controllers/BusinessPlacesController.cs @@ -63,7 +63,6 @@ public class BusinessPlacesController : ControllerBase /// /// /// - [AllowAnonymous] [HttpPost("shifts")] public async Task GetShiftsByPlaceCustomCodeHttpPostAsync(BusinessPlaceGetShiftsRequest request) { @@ -75,7 +74,6 @@ public class BusinessPlacesController : ControllerBase /// /// /// - [AllowAnonymous] [HttpGet("shifts")] public async Task GetShiftsByPlaceCustomCodeHttpGetAsync([FromQuery] BusinessPlaceGetShiftsRequest request) { diff --git a/Src/Dlhis.Basic/Device/Controllers/DevicesController.cs b/Src/Dlhis.Basic/Device/Controllers/DevicesController.cs index 7927b3c2..d5c82d0c 100644 --- a/Src/Dlhis.Basic/Device/Controllers/DevicesController.cs +++ b/Src/Dlhis.Basic/Device/Controllers/DevicesController.cs @@ -77,7 +77,6 @@ public class DevicesController : ControllerBase /// /// /// - [AllowAnonymous] [HttpPost("resigter")] public async Task ResigterAsync(DeviceResigterRequest request) { @@ -88,7 +87,6 @@ public class DevicesController : ControllerBase /// 获取激活码 /// /// - [AllowAnonymous] [HttpPost("resigter-code")] public object GetRegisterCode() { diff --git a/Src/Dlhis.Canteen/Order/Controllers/OrdersController.cs b/Src/Dlhis.Canteen/Order/Controllers/OrdersController.cs index 4189e6b8..f802eece 100644 --- a/Src/Dlhis.Canteen/Order/Controllers/OrdersController.cs +++ b/Src/Dlhis.Canteen/Order/Controllers/OrdersController.cs @@ -38,7 +38,6 @@ public class OrdersController : ControllerBase /// /// /// - [AllowAnonymous] [HttpPost] public async Task AddAsync(OrderAddRequest request) { diff --git a/Src/Dlhis.Entity/Basic/Entity/DeviceEntity.cs b/Src/Dlhis.Entity/Basic/Entity/DeviceEntity.cs index cfec400f..529fdb59 100644 --- a/Src/Dlhis.Entity/Basic/Entity/DeviceEntity.cs +++ b/Src/Dlhis.Entity/Basic/Entity/DeviceEntity.cs @@ -20,7 +20,7 @@ public class DeviceEntity : SugarBaseEntity, ITenantId /// /// 设备唯一码,IP/MAC/SNO /// - [SugarColumn(ColumnDescription = "设备唯一码")] + [SugarColumn(ColumnDescription = "设备唯一码", UniqueGroupNameList = new[] { "Idx_Device_UniqueNo" })] public string UniqueNo { get; set; } /// diff --git a/Src/Dlhis.User.Api/ITenantApi.cs b/Src/Dlhis.User.Api/ITenantApi.cs index 72be9696..3a9422b1 100644 --- a/Src/Dlhis.User.Api/ITenantApi.cs +++ b/Src/Dlhis.User.Api/ITenantApi.cs @@ -4,14 +4,26 @@ using Kurisu.RemoteCall.Attributes; namespace Dlhis.User.Api; - +/// +/// 租户Api +/// [EnableRemoteClient(Name = "user-service", BaseUrl = "${InternalRequest:UserRequestUrl}")] public interface ITenantApi { + /// + /// 获取所有租户 + /// + /// [Auth] [Get("/api/tenants/list")] Task>> GetTenantsAsync(); + /// + /// 根据code获取租户信息 + /// + /// + /// + [Auth] [Get("/api/tenants/single")] Task> GetTenantByCodeAsync(string code); } diff --git a/Src/Dlhis.User/Identity/Controllers/TenantsController.cs b/Src/Dlhis.User/Identity/Controllers/TenantsController.cs index c5228734..7b7c21ff 100644 --- a/Src/Dlhis.User/Identity/Controllers/TenantsController.cs +++ b/Src/Dlhis.User/Identity/Controllers/TenantsController.cs @@ -44,7 +44,6 @@ public class TenantsController : ControllerBase /// 获取租户 /// /// - [AllowAnonymous] [HttpGet("single")] public async Task GetTenantByCode(string code) {