Commit ba4a2532 by 泽锋 李

fix

parent 60db49a6
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoTurnOver.Common;
using AutoTurnOver.Models;
using AutoTurnOver.Services;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using AutoTurnOver.Utility;
namespace AutoTurnOver.Controllers
{
......@@ -83,11 +86,19 @@ namespace AutoTurnOver.Controllers
}
[HttpPost("FirstOrderSkuAdd")]
public JsonResult FirstOrderSkuAdd([FromBody]dc_auto_first_order_sku_input_dto inputData)
public async Task<JsonResult> FirstOrderSkuAdd()
{
try
{
new FirstOrderService().Add(inputData);
var result = string.Empty;
using (var reader = new StreamReader(Request.Body, Encoding.UTF8))
{
result = await reader.ReadToEndAsync();
new FirstOrderService().Add(result.ToObj<dc_auto_first_order_sku_input_dto>());
}
return new JsonResult(new
{
success = true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment