52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
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") };
|
|
}
|
|
}
|
|
}
|