Procházet zdrojové kódy

调试post cms

临城职教中职
liangkun před 2 roky
rodič
revize
26a0f71682
1 změnil soubory, kde provedl 10 přidání a 2 odebrání
  1. +10
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs

+ 10
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsService.cs Zobrazit soubor

@@ -202,11 +202,15 @@ namespace Learun.Application.OA


if (newEntity.IsSend == "1" && status == 2) 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); }); Task.Run(async () => { sendNew(newEntity); });
} }
} }
catch (Exception ex) 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) if (ex is ExceptionEx)
{ {
throw; throw;
@@ -233,6 +237,8 @@ namespace Learun.Application.OA
string ports = ConfigurationManager.AppSettings["Ports"]; string ports = ConfigurationManager.AppSettings["Ports"];


#endregion #endregion
BaseRepository()
.ExecuteBySql("insert INTO LR_Base_Log(F_LogId,F_CategoryId,F_SourceContentJson) VALUES (newid(),2222,'准备开始组装实体') ");
SemdNewList SendNew = new SemdNewList SemdNewList SendNew = new SemdNewList
{ {
Title = newEntity.F_FullHead, Title = newEntity.F_FullHead,
@@ -248,10 +254,12 @@ namespace Learun.Application.OA
{ {
{ "X-SS-API-KEY", ApiKey } { "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); string responses = HttpMethods.HttpPosts("http://" + ports + "/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId);
BaseRepository() 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 修改审核状态 //#region 修改审核状态
//string Nid = JsonConvert.DeserializeObject<Root>(responses).value.id; //string Nid = JsonConvert.DeserializeObject<Root>(responses).value.id;
@@ -275,7 +283,7 @@ namespace Learun.Application.OA
catch (Exception ex) catch (Exception ex)
{ {
BaseRepository() 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 + "') ");
} }
} }




Načítá se…
Zrušit
Uložit