对外接口

master
wanghaomei 7 months ago
parent 2fa0f51bbe
commit 78d54e5333

@ -43,7 +43,7 @@ namespace Myshipping.Application.Entity
/// </summary>
[SugarColumn(ColumnName = "UserId")]
[Description("用户ID")]
public long UserId{ get; set; }
public long? UserId{ get; set; }
/// <summary>
/// 用户代码

@ -67,7 +67,7 @@ namespace Myshipping.Core
identity.AddClaim(new Claim(type: ClaimConst.TENANT_ID, value: tenant.Id.ToString()));
identity.AddClaim(new Claim(type: ClaimConst.TENANT_NAME, value: tenant.Name));
identity.AddClaim(new Claim(type: ClaimConst.DjyCompanyId, value: tenant.CompId == null ? string.Empty : tenant.CompId));
identity.AddClaim(new Claim(type: ClaimConst.DjyUserId, value: user.DjyUserId));
identity.AddClaim(new Claim(type: ClaimConst.DjyUserId, value: user.DjyUserId == null ? "" : user.DjyUserId));
ClaimsPrincipal claimsPrincipal = new ClaimsPrincipal(identity);
httpContext.User = claimsPrincipal;
return next();

@ -10154,6 +10154,11 @@
模块
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.OpenGetMappingPortLoadDto.CarrierCode">
<summary>
船司ID
</summary>
</member>
<member name="T:Myshipping.Core.Service.CommonDB.Dto.RelaPortCarrierLaneDto">
<summary>
航线与港口的的关系表

@ -12,6 +12,7 @@ using System;
using Myshipping.Core.Service.CommonDB.Dto;
using Microsoft.Extensions.Logging;
using Myshipping.Core.Entity.CommonDB;
using Microsoft.AspNetCore.Authorization;
namespace Myshipping.Core.Service;
/// <summary>
@ -2332,12 +2333,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// <summary>
/// 公开数据:获取起运港映射代码
/// </summary>
[HttpGet("/commondb/OpenGetMappingPortload"), ApiUser(ApiCode = "CommonDbOpenData")]
[HttpGet("/commondb/OpenGetMappingPortload"), AllowAnonymous, ApiUser(ApiCode = "CommonDbOpenData")]
public async Task<dynamic> OpenGetMappingPortload([FromQuery] OpenGetMappingPortLoadDto input)
{
List<MappingPortLoad> list = await _sysCacheService.GetAllMappingPortLoad();
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code);
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code && x.CarrierCode == input.CarrierCode);
if (map != null)
{
return new { map.MapCode, map.MapName };
@ -2349,12 +2350,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// <summary>
/// 公开数据:获取目的港映射代码
/// </summary>
[HttpGet("/commondb/OpenGetMappingPort"), ApiUser(ApiCode = "CommonDbOpenData")]
[HttpGet("/commondb/OpenGetMappingPort"), AllowAnonymous, ApiUser(ApiCode = "CommonDbOpenData")]
public async Task<dynamic> OpenGetMappingPort([FromQuery] OpenGetMappingPortLoadDto input)
{
List<MappingPort> list = await _sysCacheService.GetAllMappingPort();
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code);
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code && x.CarrierCode == input.CarrierCode);
if (map != null)
{
return new { map.MapCode, map.MapName };

@ -17,5 +17,10 @@ namespace Myshipping.Core.Service.CommonDB.Dto
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 船司ID
/// </summary>
public string CarrierCode { get; set; }
}
}

Loading…
Cancel
Save