using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Logging; using Ropin.Inspection.Api.Common; using Ropin.Inspection.Model; using Ropin.Inspection.Service; using System; using System.Collections.Generic; using System.Threading.Tasks; namespace Ropin.Inspection.Api.Controllers { public class TbdmProvController : BaseController { public readonly ILogger _logger; private readonly ITbdmProvService _TbdmProvService; /// /// 构造函数 /// /// /// public TbdmProvController(ITbdmProvService TbdmProvService, ILogger logger) { _TbdmProvService = TbdmProvService; _logger = logger; } /// /// 获取行政区域树 /// /// [HttpGet("GetProvListTreeAsync")] [AllowAnonymous] public async Task GetProvListTreeAsync() { try { var content = await _TbdmProvService.GetProvListTreeAsync(); return new ApiResult>(content); } catch (Exception ex) { return new ApiResult(ReturnCode.GeneralError, ex.Message); } } } }