fix: mapping body cache not found problems
All checks were successful
Build and Deploy / deploy (push) Successful in 1m15s

This commit is contained in:
xiaolipro 2026-09-17 15:17:33 +08:00
parent 2c3a884264
commit 208ba73a12
2 changed files with 11 additions and 10 deletions

View File

@ -50,15 +50,16 @@ public class InterfaceMapRepository : BasicRepository<InterfaceMapEntity>, IScop
bool isInParaMap)
{
/*
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` , `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 ( `t`.`UpStreamId` = `b`.`InterfaceId` ) and b.IsInPara = false AND ( `b`.`Type` <> 12 ) AND ( `b`.`Type` <> 10 ) and `b`.`IsDeleted` = 0
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 (( `t`.`UpStreamId` = 30 ) AND ( `t`.`ServiceProviderId` = 137 )) and t.IsDeleted = 0 and t.DownStreamId = 509
ORDER BY `b`.`Sort` ASC
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` ,
`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 ( `t`.`DownStreamId` = `b`.`InterfaceId` ) and b.IsInPara = true AND ( `b`.`Type` <> 3 ) AND ( `b`.`Type` <> 5 ) and `b`.`IsDeleted` = 0
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 `t`.`Id` = 195 ORDER BY `b`.`Sort` ASC
*/
var ids = mapIds.JoinAsString(",");

View File

@ -267,7 +267,7 @@ ORDER BY `b`.`Sort` ASC").ToListAsync();
int interfaceId)
{
var fixedFieldList = await Context.Queryable<FixedParameterEntity>()
.Where(a => a.ServiceProviderId == serviceProviderId)
.Where(a => a.ServiceProviderId == serviceProviderId || a.InterfaceId == interfaceId)
.Select(x => new
{
x.ServiceProviderId,