Merge branch 'master' of https://gitee.com/frane-yang/SGGL_CWCEC
This commit is contained in:
@@ -1256,6 +1256,8 @@ namespace BLL
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.GET);
|
||||
request.AddHeader("token", Token);
|
||||
request.AddHeader("ClientId", SysConstSetService.ClientId);
|
||||
request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal) + 1));
|
||||
IRestResponse response = client.Execute(request);
|
||||
Console.WriteLine(response.Content);
|
||||
return response.Content;
|
||||
@@ -1268,6 +1270,8 @@ namespace BLL
|
||||
client.Timeout = -1;
|
||||
var request = new RestRequest(Method.POST);
|
||||
request.AddHeader("token", Token);
|
||||
request.AddHeader("ClientId", SysConstSetService.ClientId);
|
||||
request.AddHeader("OperationCode", Baseurl.Substring(Baseurl.LastIndexOf("/", StringComparison.Ordinal) + 1));
|
||||
if (!string.IsNullOrEmpty(JsonBody))
|
||||
{
|
||||
request.AddJsonBody(JsonBody);
|
||||
@@ -1276,6 +1280,7 @@ namespace BLL
|
||||
IRestResponse response = client.Execute(request);
|
||||
return response.Content;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
public static class SysConstSetService
|
||||
{
|
||||
private static string _CNCECPath;
|
||||
private static string _CncecEsbPath;
|
||||
private static string _CNCECToken;
|
||||
private static string _CNCECTokenExTime;
|
||||
private static string _ClientId;
|
||||
|
||||
public static string CNCECPath
|
||||
{
|
||||
@@ -31,6 +33,46 @@
|
||||
_CNCECPath = value;
|
||||
}
|
||||
}
|
||||
public static string CncecEsbPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Const where x.ConstText == "集团ESB地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_CncecEsbPath = sysSet5.ConstValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_CncecEsbPath = "";
|
||||
}
|
||||
return _CncecEsbPath;
|
||||
}
|
||||
set
|
||||
{
|
||||
_CncecEsbPath = value;
|
||||
}
|
||||
}
|
||||
public static string ClientId
|
||||
{
|
||||
get
|
||||
{
|
||||
var sysSet5 = (from x in Funs.DB.Sys_Const where x.ConstText == "ClientId" select x).ToList().FirstOrDefault();
|
||||
if (sysSet5 != null)
|
||||
{
|
||||
_ClientId = sysSet5.ConstValue;
|
||||
}
|
||||
else
|
||||
{
|
||||
_ClientId = "";
|
||||
}
|
||||
return _ClientId;
|
||||
}
|
||||
set
|
||||
{
|
||||
_ClientId = value;
|
||||
}
|
||||
}
|
||||
public static string CNCECToken
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user