Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
aa2212f05e
@ -7,6 +7,7 @@ using Fake.RabbitMQ;
|
||||
using FreeRedis;
|
||||
using InterfaceForward.Application.Contracts;
|
||||
using InterfaceForward.Application.Helpers;
|
||||
using InterfaceForward.Application.HostServices;
|
||||
using InterfaceForward.Domain.Shared;
|
||||
using InterfaceForward.Repositories;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@ -32,6 +33,8 @@ public class InterfaceForwardApplicationModule:FakeModule
|
||||
});
|
||||
|
||||
context.Services.Configure<InterfaceRelayOptions>(configuration.GetSection("InterfaceRelay"));
|
||||
|
||||
context.Services.AddHostedService<AppSubscribeHostService>();
|
||||
|
||||
var options = configuration.GetSection("Redis").Get<ConnectionStringBuilder>();
|
||||
if (options == null)
|
||||
|
||||
@ -10,6 +10,7 @@ using RabbitMQ.Client.Events;
|
||||
|
||||
namespace InterfaceForward.Application.Rabbit;
|
||||
|
||||
[ExposeServices(typeof(IRabbitHandler))]
|
||||
public class BatchForwardEventHandler(
|
||||
InterfaceForwardCommon forwardCommon,
|
||||
RabbitClient rabbitClient,
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace InterfaceForward.Domain.Shared.Enum;
|
||||
|
||||
public enum ParameterPlaceholder
|
||||
{
|
||||
[Description("$FromAccount")]
|
||||
FromAccount = 1,
|
||||
[Description("$FromBody")]
|
||||
FromBody,
|
||||
[Description("$TimeStamp")]
|
||||
TimeStamp,
|
||||
[Description("$DateTime")]
|
||||
DateTime,
|
||||
[Description("$Url")]
|
||||
Url,
|
||||
[Description("$token")]
|
||||
Token,
|
||||
}
|
||||
@ -65,14 +65,13 @@ ORDER BY `b`.`Sort` ASC
|
||||
// 因为入参映射有多个 出参映射只有一个(挂在第一个映射)
|
||||
return await Context.SqlQueryable<InterfaceParameterMapOutputValueObject>(@$"
|
||||
select `a`.`Id` AS `InterfaceMapDetailId` , `t`.`Id` AS `InterfaceMapId` , `b`.`Id` AS `Id`, b.InterfaceId, `b`.`Alias` AS `Alias` , `b`.`CnName` AS `CnName`
|
||||
, `e`.`Name` AS `Type`, `b`.`IsInPara` AS `IsInPara` , `b`.`IsRequired` AS `IsRequired` , `b`.`Description` AS `Description` , `d`.`Id` AS `FixedId`
|
||||
, `b`.`Type` AS `Type2`, `b`.`IsInPara` AS `IsInPara` , `b`.`IsRequired` AS `IsRequired` , `b`.`Description` AS `Description` , `d`.`Id` AS `FixedId`
|
||||
, `d`.`FieldValue` AS `FixedValue` , `a`.`MappedParaId` AS `MapId` , `c`.`Alias` AS `MapAlias`, `c`.`CnName` AS `MapCnName` , `c`.`Description` AS `MapDescription`
|
||||
from t_interface_map t
|
||||
LEFT JOIN `t_parameter` `b` ON {(isInParaMap ? "t.DownStreamId" : "t.UpStreamId")} = `b`.`InterfaceId` and b.IsInPara = {isInParaMap} AND ( `b`.`IsDeleted` = 0 ) AND ( `b`.`Type` <> 12 ) AND ( `b`.`Type` <> 10 )
|
||||
Left JOIN `t_interface_map_detail` `a` ON ( `t`.`Id` = `a`.`InterfaceMapId` ) and b.id = a.ParaId and a.IsDeleted = 0
|
||||
Left JOIN `t_parameter` `c` ON ( `a`.`MappedParaId` = `c`.`Id` ) AND ( `c`.`IsDeleted` = 0 )
|
||||
Left JOIN `t_parameter_fixed` `d` ON d.InterfaceId = b.InterfaceId and `b`.`Alias` = `d`.`FieldName` AND `d`.`FieldPositions` like concat('%', CAST(N'Body' AS CHAR),'%') AND d.IsDeleted = 0
|
||||
Left JOIN `t_dictionary` `e` ON (( `b`.`Type` = `e`.`Id` ) AND ( `e`.`Type` = N'ParameterType' ))
|
||||
WHERE {(isInParaMap ? $"t.id in ({ids})" : $"t.id = {mapIds.First()}")} and t.IsDeleted = 0
|
||||
ORDER BY `b`.`Sort` ASC").ToListAsync();
|
||||
}
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
namespace InterfaceForward.Repositories.Interface.ValueObjects;
|
||||
using InterfaceForward.Domain.Shared.Enum;
|
||||
using InterfaceForward.Domain.Shared.Helpers;
|
||||
|
||||
namespace InterfaceForward.Repositories.Interface.ValueObjects;
|
||||
|
||||
public class InterfaceParameterMapOutputValueObject
|
||||
{
|
||||
@ -35,7 +38,12 @@ public class InterfaceParameterMapOutputValueObject
|
||||
///<summary>
|
||||
/// 参数类型
|
||||
///</summary>
|
||||
public string Type { get; set; }
|
||||
public string Type => Type2.GetDescription();
|
||||
|
||||
///<summary>
|
||||
/// 参数类型
|
||||
///</summary>
|
||||
public ParameterType Type2 { get; set; }
|
||||
|
||||
///<summary>
|
||||
/// 是否入参
|
||||
|
||||
Loading…
Reference in New Issue
Block a user