DBInitController.cs 703 B

123456789101112131415161718192021222324252627282930
  1. using Microsoft.AspNetCore.Http;
  2. using Microsoft.AspNetCore.Mvc;
  3. using wms.service;
  4. using wms.service.IService;
  5. namespace wms.api.Controllers
  6. {
  7. [Route("api/[controller]/[action]")]
  8. [ApiController]
  9. public class DBInitController : ControllerBase
  10. {
  11. private readonly IDBService _dBService;
  12. public DBInitController(IDBService dBService)
  13. {
  14. _dBService = dBService;
  15. }
  16. /// <summary>
  17. /// 初始化时效库
  18. /// </summary>
  19. /// <returns></returns>
  20. [HttpGet(Name = "InitSxDB")]
  21. public string InitSxDB()
  22. {
  23. _dBService.InitSxDB();
  24. return "";
  25. }
  26. }
  27. }