From ade2a25fc4652eec50c29c60cd59412ec8a34528 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 28 Mar 2025 09:38:12 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96tj=20=E5=8C=BB=E9=99=A2tokenI?= =?UTF-8?q?nfo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Management/DTO/UserModel.cs | 20 ++++++++++++++ .../Service/Management/UserService.cs | 26 ++++++++++++++----- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs index 5bc5d1afe..dc272bd2f 100644 --- a/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs +++ b/IRaCIS.Core.Application/Service/Management/DTO/UserModel.cs @@ -22,6 +22,26 @@ namespace IRaCIS.Application.Contracts public Guid? UserId { get; set; } } + public class TJUserInfoDto + { + public string Code { get; set; } + public string Msg { get; set; } + public TJUserInfoData Data { get; set; } + } + + public class TJUserInfoData + { + public string UserCode { get; set; } + public string UserName { get; set; } + public string DeptCode { get; set; } + public string Sex { get; set; } + public string Birthday { get; set; } + public string Title { get; set; } + public string UserType { get; set; } + } + + + public class LoginReturnDTO { public UserBasicInfo BasicInfo { get; set; } = new UserBasicInfo(); diff --git a/IRaCIS.Core.Application/Service/Management/UserService.cs b/IRaCIS.Core.Application/Service/Management/UserService.cs index 9bd8fc53c..c81eb9c46 100644 --- a/IRaCIS.Core.Application/Service/Management/UserService.cs +++ b/IRaCIS.Core.Application/Service/Management/UserService.cs @@ -629,16 +629,30 @@ namespace IRaCIS.Core.Application.Service } + [AllowAnonymous] + public async Task TJUserLoginInfo(string token) + { + //同济医院token 地址:http://192.168.40.88:8080 appid:third-hirs - //public async Task> HospitalUserLogin(string token) - //{ - // //同济医院token 地址:http://192.168.40.88:8080 appid:third-hirs + //本地测试地址接口 - // //本地测试地址接口 + var apiUrl = "http://192.168.40.88:8080/dock/userinfo"; + var headers = new Dictionary + { + { "Content-Type", "application/json" } // 根据需要添加其他头部信息 + }; - // RestClientAPI.PostAsync<> + var requestData = new + { + userToken = token, + appId = "third-hirs", + }; - //} + var tjUserInfo = await RestClientAPI.PostAsync(apiUrl, requestData, headers); + + + return ResponseOutput.Ok(tjUserInfo); + }