|
|
@@ -202,11 +202,15 @@ namespace Learun.Application.OA |
|
|
|
|
|
|
|
if (newEntity.IsSend == "1" && status == 2) |
|
|
|
{ |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始run task') "); |
|
|
|
Task.Run(async () => { sendNew(newEntity); }); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'run task 报错"+ex.Message+"') "); |
|
|
|
if (ex is ExceptionEx) |
|
|
|
{ |
|
|
|
throw; |
|
|
@@ -233,6 +237,8 @@ namespace Learun.Application.OA |
|
|
|
string ports = ConfigurationManager.AppSettings["Ports"]; |
|
|
|
|
|
|
|
#endregion |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始组装实体') "); |
|
|
|
SemdNewList SendNew = new SemdNewList |
|
|
|
{ |
|
|
|
Title = newEntity.F_FullHead, |
|
|
@@ -248,10 +254,12 @@ namespace Learun.Application.OA |
|
|
|
{ |
|
|
|
{ "X-SS-API-KEY", ApiKey } |
|
|
|
}; |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始post cms') "); |
|
|
|
|
|
|
|
string responses = HttpMethods.HttpPosts("http://" + ports + "/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId); |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson),VALUES (newid(),'2222','"+responses+"') "); |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'"+HttpUtility.UrlEncode(responses)+"') "); |
|
|
|
|
|
|
|
//#region 修改审核状态 |
|
|
|
//string Nid = JsonConvert.DeserializeObject<Root>(responses).value.id; |
|
|
@@ -275,7 +283,7 @@ namespace Learun.Application.OA |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
BaseRepository() |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson),VALUES (newid(),'2222','"+ex.Message + "') "); |
|
|
|
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'"+ex.Message + "') "); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|