Ver a proveniência

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

西昌缴费二期
liangkun há 3 anos
ascendente
cometimento
6618f9fa2c
3 ficheiros alterados com 24 adições e 16 eliminações
  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 Ver ficheiro

@@ -1,6 +1,7 @@
using Learun.Application.OA;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Util;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Configuration;
@@ -95,9 +96,9 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
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
{
Title = entity.F_FullHead,
@@ -110,20 +111,18 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
AddUserName = entity.F_CreateUserName,
};
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
#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();
if (Nid != null)
{
AList.siteId = siteId;
AList.siteId = Convert.ToInt32(siteId);
List<contents> listCon = new List<contents>();
//这里应该循环,如果多个
contents con = new contents();
@@ -131,8 +130,8 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
con.id = Convert.ToInt32(Nid);
listCon.Add(con);
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
return Success("发布成功!");
@@ -157,4 +156,13 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
#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 Ver ficheiro

@@ -172,7 +172,7 @@
<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"/>
</appSettings>

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs Ver ficheiro

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

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


Carregando…
Cancelar
Guardar