init: 北航大学BH-DAS项目首次入库
This commit is contained in:
51
WebApi/Controller/IpcController.cs
Normal file
51
WebApi/Controller/IpcController.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Http;
|
||||
using System.Collections.Concurrent;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Runtime.Remoting.Messaging;
|
||||
|
||||
|
||||
namespace WebApi
|
||||
{
|
||||
|
||||
public class IpcController : ApiController
|
||||
{
|
||||
readonly string headUrl = "Project/";
|
||||
/// <summary>
|
||||
/// 插入数据库
|
||||
/// </summary>
|
||||
/// <param name="jObject"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Route("IPC/product")]
|
||||
public HttpResponseMessage product([FromBody] JObject jobj)
|
||||
{
|
||||
return new HttpResponseMessage
|
||||
{
|
||||
Content = new StringContent(AnalysisMsg.product(headUrl + System.Reflection.MethodBase.GetCurrentMethod().Name, jobj), Encoding.GetEncoding("UTF-8"), "application/json")
|
||||
};
|
||||
}
|
||||
|
||||
[HttpGet]
|
||||
[Route("getInfo")]
|
||||
public HttpResponseMessage getInfo()
|
||||
{
|
||||
string pp = @"{\""Result\"":\""OK\""}";
|
||||
try
|
||||
{
|
||||
}
|
||||
catch (Exception err)
|
||||
{
|
||||
GlobalVar.log.Error(err.Message);
|
||||
}
|
||||
return new HttpResponseMessage { Content = new StringContent(pp, Encoding.GetEncoding("UTF-8"), "application/json") };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user