初始化项目

This commit is contained in:
2025-11-20 13:11:05 +08:00
commit d5edc62c08
2412 changed files with 2201918 additions and 0 deletions

View File

@@ -0,0 +1,62 @@
using AUTS.Domain.ViewModels;
using AUTS.Services.Cache;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Web.Http;
namespace AUTS.Web.API
{
public class CacheController : ApiController
{
// GET api/<controller>
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
// GET api/<controller>/5
public string ClearCache()
{
CacheHelp.ClearUserDBProjectList();
return "value";
}
// POST api/<controller>
public HttpResponseMessage closeCache([FromBody]string value)
{
if (value!=""&&value.Length>0)
{
CacheHelp.ClearUserDBProjectList();
}
ReturnResult<object> result = new ReturnResult<object>
{
Status = 200,
Data = System.Web.HttpContext.Current.Request.UserHostAddress
};
//OBJ转化成JSON
string json = JsonConvert.SerializeObject(result);
return new HttpResponseMessage()
{
Content = new StringContent(json, Encoding.UTF8, "application/json"),
};
}
// PUT api/<controller>/5
public void Put(int id, [FromBody]string value)
{
}
// DELETE api/<controller>/5
public void Delete(int id)
{
}
}
}