using Microsoft.AspNetCore.Mvc; using SolarPower.Models; using SolarPower.Models.PowerStation; using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; namespace SolarPower.Controllers { public class ExceptionRecordController : MyBaseController { public IActionResult Index() { return View(); } public ApiResult> GetMyCities() { ApiResult> apiResult = new ApiResult>(); try { apiResult.Code = "0000"; apiResult.Data = myPowerStationService.GetMyCities(myUser); } catch (Exception exception) { apiResult.Code = "9999"; apiResult.Msg = exception.ToString(); } return apiResult; } public ApiResult> GetPowerStationByFilter(List cityIds) { ApiResult> apiResult = new ApiResult>(); try { var myPowerStations = myPowerStationService.GetMyPowerStations(myUser, cityIds); apiResult.Code = "0000"; apiResult.Data = myPowerStations; } catch (Exception exception) { apiResult.Code = "9999"; apiResult.Msg = exception.ToString(); } return apiResult; } } }