From d45955a9a0fe8ac0b44191f7761087f16deac14a Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 28 Jun 2024 16:23:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E7=A6=BB=E7=BA=BF=E6=B6=88=E8=B4=B9?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Middle/Controllers/GainfosController.cs | 2 +- Src/Dlhis.Middle/Controllers/OrdersController.cs | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Src/Dlhis.Middle/Controllers/GainfosController.cs b/Src/Dlhis.Middle/Controllers/GainfosController.cs index 5be9a57a..a8f72fa6 100644 --- a/Src/Dlhis.Middle/Controllers/GainfosController.cs +++ b/Src/Dlhis.Middle/Controllers/GainfosController.cs @@ -33,7 +33,7 @@ public class GainfosController : ControllerBase public async Task GetFaceAsync(string token) { var hostName = _configuration.GetSection("HostName").Value; - var httpClient = _httpClientFactory.CreateClient(); + var httpClient = _httpClientFactory.CreateClient("face"); _logger.LogInformation("token:{token}", token); diff --git a/Src/Dlhis.Middle/Controllers/OrdersController.cs b/Src/Dlhis.Middle/Controllers/OrdersController.cs index 0813c676..9e379662 100644 --- a/Src/Dlhis.Middle/Controllers/OrdersController.cs +++ b/Src/Dlhis.Middle/Controllers/OrdersController.cs @@ -1,6 +1,7 @@ using Dlhis.Middle.Api; using Dlhis.Middle.Request; using Dlhis.Middle.Response; +using Dlhis.Middle.Services; using Kurisu.AspNetCore.DataAccess.SqlSugar.Aop; using Kurisu.AspNetCore.UnifyResultAndValidation; using Microsoft.AspNetCore.Mvc; @@ -14,11 +15,11 @@ namespace Dlhis.Middle.Controllers; [ApiController] public class OrdersController : ControllerBase { - private readonly ICanteenApi _canteenApi; + private readonly IOrderService _orderService; - public OrdersController(ICanteenApi canteenApi) + public OrdersController(IOrderService orderService) { - _canteenApi = canteenApi; + _orderService = orderService; } /// @@ -30,6 +31,7 @@ public class OrdersController : ControllerBase [IgnoreTenant] public async Task> AddAsync(OrderAddRequest request) { - return await _canteenApi.AddAsync(request); + return await _orderService.AddAsync(request); + } } \ No newline at end of file