HSCodeController.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Microsoft.AspNetCore.Authorization;
  2. using Microsoft.AspNetCore.Mvc;
  3. using System.Collections.Generic;
  4. using System.Threading.Tasks;
  5. using XYY.Authentication.Standard;
  6. using XYY.Core.Standard.Mvc;
  7. using XYY.Service.Standard.Order;
  8. namespace XYY.Api.Order.Controllers
  9. {
  10. [Route("api/[controller]/[action]")]
  11. [ApiController]
  12. public class HSCodeController : ApiControllerBase
  13. {
  14. private readonly IHSCodeService _iHSCodeService;
  15. public HSCodeController(IHSCodeService iHSCodeService)
  16. {
  17. _iHSCodeService = iHSCodeService;
  18. }
  19. [AllowAnonymous]
  20. public async Task<IActionResult> test(string code)
  21. {
  22. await _iHSCodeService.InsEUHSCode(code);
  23. return Ok();
  24. }
  25. [HttpPost]
  26. public async Task<IActionResult> InsPage(List<int>Ids)
  27. {
  28. var result = await _iHSCodeService.GetEUHSCodeDtos(Ids);
  29. return Ok(result);
  30. }
  31. [HttpPost]
  32. public async Task<IActionResult> SaveEUHSCodeUpdate(List<XYY.Model.Standard.Dto.Logistics.EUHSCodeDto> dtos)
  33. {
  34. var u = User.GetUserContent();
  35. await _iHSCodeService.SaveEUHSCodeUpdate(dtos,u);
  36. return Ok();
  37. }
  38. }
  39. }