71 lines
1.4 KiB
C#
71 lines
1.4 KiB
C#
using Asp.Versioning;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using StoreHub.KJDWebService.Services;
|
|
|
|
namespace StoreHub.KJDWebService.Controllers
|
|
{
|
|
[ApiController]
|
|
[ApiVersionNeutral]
|
|
[Route("update/[action]")]
|
|
public class UpdateController : BaseApiController
|
|
{
|
|
private readonly UpdateService _updateService;
|
|
|
|
public UpdateController(UpdateService updateService)
|
|
{
|
|
_updateService = updateService;
|
|
}
|
|
|
|
[AcceptVerbs("GET", "POST")]
|
|
public IActionResult hello_world()
|
|
{
|
|
|
|
return Content("Hello World");
|
|
|
|
}
|
|
|
|
[AcceptVerbs("GET", "POST")]
|
|
public IActionResult get_update()
|
|
{
|
|
|
|
var jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = _updateService.GetUpdate(jsontext);
|
|
|
|
return WriteJson(result);
|
|
|
|
}
|
|
|
|
[AcceptVerbs("GET", "POST")]
|
|
public IActionResult get_update_new()
|
|
{
|
|
|
|
var jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = _updateService.GetUpdateNew(jsontext);
|
|
|
|
return WriteJson(result);
|
|
|
|
}
|
|
|
|
[AcceptVerbs("GET", "POST")]
|
|
public IActionResult get_wx_finder_order_update()
|
|
{
|
|
|
|
var jsontext = GetRequestJsonString();
|
|
|
|
var result = jsontext;
|
|
result = _updateService.GetWxFindOrderUpdate(jsontext);
|
|
|
|
return WriteJson(result);
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|