commit
4e6f8c9c84
|
|
@ -117,11 +117,11 @@ namespace Learn.Archives.API.Controllers
|
|||
return e.Id;
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置角色菜单
|
||||
/// 获取学生列表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public new async Task<PageResult<StudentInfoRes>> PageList()
|
||||
public new async Task<PageResult<StudentInfoRes>> PageList(object data)
|
||||
{
|
||||
var apiRes =await _userCenterService.CallAPI_GetPageUserList(_httpContextAccessor.HttpContext);
|
||||
var res= new PageResult<StudentInfoRes>() { Data = new List<StudentInfoRes>() };
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ namespace Learn.Archives.API.Expand
|
|||
//特殊处理:ResultIgnore,不进行返回结果包装,原样输出
|
||||
var endpoint = context.GetEndpoint();
|
||||
// 直接返回原始结果,不封装
|
||||
if (endpoint?.Metadata.GetMetadata<HttpLogEnable>() == null) return;
|
||||
if (endpoint?.Metadata.GetMetadata<HttpLogEnable>() == null&& e is null) return;
|
||||
|
||||
string request = null;
|
||||
var logId = Yitter.IdGenerator.YitIdHelper.NextId();
|
||||
|
|
@ -233,8 +233,6 @@ namespace Learn.Archives.API.Expand
|
|||
/// <param name="context"></param>
|
||||
public override async void OnActionExecuted(ActionExecutedContext context)
|
||||
{
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
BaseReturn<object>? res = ApiResultFormatting(context);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
},
|
||||
"DB": {
|
||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Database=learn.archives;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
||||
//正式库
|
||||
//"ConnectionString": "AllowLoadLocalInfile=true;Server=rm-2vc20nd3d11g0oh6g2o.rwlb.cn-chengdu.rds.aliyuncs.com;User ID=marking;Password=poiuytPOIUYT098765)(*&^%;Port=3306;Database=learn.archives;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||
"SqlType": "MySql",
|
||||
"UpdateTable": false
|
||||
},
|
||||
|
|
@ -24,12 +26,14 @@
|
|||
},
|
||||
"UserCenterService": {
|
||||
"API": "https://dca.w.23544.com:8843/api"
|
||||
//"API": "https://dcb.23544.com/api"
|
||||
},
|
||||
"OtherDBArr": [
|
||||
{
|
||||
"ConfigId": 1001, //用户中心
|
||||
//"ConnectionString": "AllowLoadLocalInfile=true;Server=192.168.2.9;User ID=root;Password=qwe123!@#;Port=3306;Database=usercenter;CharSet=utf8mb4;pooling=true;SslMode=None;",
|
||||
"ConnectionString": "AllowLoadLocalInfile=true;Server=58.17.132.2;User ID=marking;Password=qwe123!@#;Port=3306;Database=usercenter_v1;CharSet=utf8mb4;Port=43306;pooling=true;SslMode=None;",
|
||||
//"ConnectionString": "AllowLoadLocalInfile=true;Server=usercenter-mysql.23544.com;User ID=usercenter;Password=MPsSSNuvFO7wBqADXC9zweh9tdOPNwm6;Port=3306;Database=usercenter_v1;CharSet=utf8mb4;pooling=true;SslMode=None",
|
||||
|
||||
"SqlType": "MySql"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
|
|
@ -22,6 +22,16 @@ namespace Learn.Archives.Core.Common
|
|||
throw new OhException(message, code);
|
||||
}
|
||||
/// <summary>
|
||||
/// 抛出 异常
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="code"></param>
|
||||
/// <exception cref="OhException"></exception>
|
||||
public static T Error<T>(string message, int code = 500)
|
||||
{
|
||||
throw new OhException(message, code);
|
||||
}
|
||||
/// <summary>
|
||||
/// 抛出 模型校验异常
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
|
|
|
|||
|
|
@ -71,7 +71,18 @@ namespace Learn.Archives.Core.Common
|
|||
requestMessage.Content = new StringContent(data.ToJson(), Encoding.UTF8, "application/json");
|
||||
|
||||
var responseMessage = await httpClient.SendAsync(requestMessage, HttpCompletionOption.ResponseHeadersRead);
|
||||
var resStr = await responseMessage.Content?.ReadAsStringAsync();
|
||||
var resStr = string.Empty;
|
||||
try
|
||||
{
|
||||
resStr= await responseMessage?.Content?.ReadAsStringAsync();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return Oh.Error<UserImportRes>($"请求用户中心出现异常 {resStr} {ex.Message}");
|
||||
}
|
||||
if(string.IsNullOrEmpty(resStr))
|
||||
return Oh.Error<UserImportRes>($"请求用户中心出现异常 返回了空数据");
|
||||
var res = JsonSerializer.Deserialize<BaseReturn<UserImportRes>>(resStr);
|
||||
if (res == null || res.Code != 200)
|
||||
Oh.Error(res.Message, res.Code);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,6 @@
|
|||
<PackageReference Include="SqlSugar.IOC" Version="2.0.0" />
|
||||
<PackageReference Include="SqlSugarCore" Version="5.1.4.170" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="UserCenter.Model" Version="1.4.4" />
|
||||
<PackageReference Include="UserCenter.Model" Version="1.4.9" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -578,6 +578,6 @@ namespace Learn.Archives.Core.Model.Dto
|
|||
/// <summary>
|
||||
/// 职位状态
|
||||
/// </summary>
|
||||
public bool Status { get; set; }
|
||||
public object Status { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue