修改稽查报错
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d10020d944
commit
d852de4a5b
|
@ -365,6 +365,9 @@ namespace IRaCIS.Core.Domain.Share
|
|||
public static class HttpContextExtension
|
||||
{
|
||||
public static string GetClientIP(this HttpContext context)
|
||||
{
|
||||
//scp 服务创建的记录不能获取请求上下文
|
||||
if (context != null)
|
||||
{
|
||||
var ip = context.Request.Headers["Cdn-Src-Ip"].FirstOrDefault();
|
||||
if (!string.IsNullOrEmpty(ip))
|
||||
|
@ -378,6 +381,12 @@ namespace IRaCIS.Core.Domain.Share
|
|||
|
||||
return IpReplace(ip);
|
||||
}
|
||||
else
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static string IpReplace(string inip)
|
||||
{
|
||||
|
|
|
@ -110,7 +110,7 @@ public class SCPInstanceConfigration : IEntityTypeConfiguration<SCPInstance>
|
|||
{
|
||||
builder.HasKey(e => e.SeqId);
|
||||
|
||||
builder.HasOne(e => e.SCPStudy).WithMany().HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
builder.HasOne(e => e.SCPStudy).WithMany(t=>t.InstanceList).HasForeignKey(t => t.StudyId).HasPrincipalKey(st => st.Id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue