Browse Source

Merge branch '西昌分支' of 123.57.209.16:bjquanjiang/DigitalScholl into 西昌分支

西昌缴费二期
liangkun 3 years ago
parent
commit
6618f9fa2c
3 changed files with 24 additions and 16 deletions
  1. +21
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs

+ 21
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NewsController.cs View File

@@ -1,6 +1,7 @@
using Learun.Application.OA; using Learun.Application.OA;
using Learun.Application.TwoDevelopment.LR_Desktop; using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Util; using Learun.Util;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Configuration; using System.Configuration;
@@ -95,9 +96,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
if (entity.IsSend == "1") if (entity.IsSend == "1")
{ {
//获取配置文件 //获取配置文件
string siteId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["SiteId"]);
string channelId = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ChannelId"]);
string ApiKey = HttpUtility.UrlEncode(ConfigurationManager.AppSettings["ApiKey"]);
string siteId = ConfigurationManager.AppSettings["SiteId"];
string channelId = ConfigurationManager.AppSettings["ChannelId"];
string ApiKey = ConfigurationManager.AppSettings["ApiKey"];
SemdNewList SendNew = new SemdNewList SemdNewList SendNew = new SemdNewList
{ {
Title = entity.F_FullHead, Title = entity.F_FullHead,
@@ -110,20 +111,18 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
AddUserName = entity.F_CreateUserName, AddUserName = entity.F_CreateUserName,
}; };
WebHeaderCollection ApiId = new WebHeaderCollection WebHeaderCollection ApiId = new WebHeaderCollection
{
{ "X-SS-API-KEY", ApiKey }
};
string responses = Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId);
{
{ "X-SS-API-KEY", ApiKey }
};
string responses = Util.HttpMethods.HttpPosts("http://192.168.50.127:8007/api/v1/contents/" + siteId + "/" + channelId, SendNew.ToJson(), ApiId);


#endregion #endregion
#region 修改审核状态 #region 修改审核状态
JavaScriptSerializer Jss = new JavaScriptSerializer();
Dictionary<string, object> DicText = (Dictionary<string, object>)Jss.DeserializeObject(responses);
string Nid = DicText["id"].ToString();
string Nid = JsonConvert.DeserializeObject<Root>(responses).value.id;
AuditList AList = new AuditList(); AuditList AList = new AuditList();
if (Nid != null) if (Nid != null)
{ {
AList.siteId = siteId;
AList.siteId = Convert.ToInt32(siteId);
List<contents> listCon = new List<contents>(); List<contents> listCon = new List<contents>();
//这里应该循环,如果多个 //这里应该循环,如果多个
contents con = new contents(); contents con = new contents();
@@ -131,8 +130,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
con.id = Convert.ToInt32(Nid); con.id = Convert.ToInt32(Nid);
listCon.Add(con); listCon.Add(con);
AList.contents = listCon; AList.contents = listCon;
AList.reasons = "终审通过";
Util.HttpMethods.HttpPosts("http://localhost:8007/api/v1/contents/actions/check", AList.ToJson(), ApiId);
//AList.reasons = "终审通过";
Util.HttpMethods.HttpPosts("http://192.168.50.127:8007/api/v1/contents/check", AList.ToJson(), ApiId);
} }
#endregion #endregion
return Success("发布成功!"); return Success("发布成功!");
@@ -157,4 +156,13 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
#endregion #endregion


} }
public class Root
{
public RootValue value { get; set; }
}

public class RootValue
{
public string id { get; set; }
}
} }

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/system.config View File

@@ -172,7 +172,7 @@
<add key="ForbidLoginMinutes" value="10"/> <add key="ForbidLoginMinutes" value="10"/>


<!--下发新闻配置--> <!--下发新闻配置-->
<add key="SiteId" value="1"/>
<add key="ChannelId" value="6"/>
<add key="SiteId" value="39"/>
<add key="ChannelId" value="49"/>
<add key="ApiKey" value="fafc361a-40c1-4060-8eee-ea796640c39c"/> <add key="ApiKey" value="fafc361a-40c1-4060-8eee-ea796640c39c"/>
</appSettings> </appSettings>

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs View File

@@ -406,7 +406,7 @@ namespace Learun.Application.OA


public class AuditList public class AuditList
{ {
public string siteId { get; set; }
public int siteId { get; set; }
public List<contents> contents { get; set; } public List<contents> contents { get; set; }
public string reasons { get; set; } public string reasons { get; set; }
} }


Loading…
Cancel
Save