namespace Admin.NET.Plugin.HwPortal; [AllowAnonymous] [Route("portal/aboutUsInfo")] public class HwAboutUsInfoController : HwPortalControllerBase { private readonly HwAboutUsInfoService _service; public HwAboutUsInfoController(HwAboutUsInfoService service) { _service = service; } [HttpGet("list")] public async Task> List([FromQuery] HwAboutUsInfo input) { return GetDataTable(await _service.SelectHwAboutUsInfoList(input)); } [HttpPost("export")] [Idempotent] public async Task Export([FromQuery] HwAboutUsInfo input) { return ExportExcel(await _service.SelectHwAboutUsInfoList(input), "关于我们数据"); } [HttpGet("{aboutUsInfoId:long}")] public async Task GetInfo(long aboutUsInfoId) { return Success(await _service.SelectHwAboutUsInfoByAboutUsInfoId(aboutUsInfoId)); } [HttpPost] [Idempotent] public async Task Add([FromBody] HwAboutUsInfo input) { return ToAjax(await _service.InsertHwAboutUsInfo(input)); } [HttpPut] [Idempotent] public async Task Edit([FromBody] HwAboutUsInfo input) { return ToAjax(await _service.UpdateHwAboutUsInfo(input)); } [HttpDelete("{aboutUsInfoIds}")] [Idempotent] public async Task Remove(string aboutUsInfoIds) { return ToAjax(await _service.DeleteHwAboutUsInfoByAboutUsInfoIds(ParseLongArray(aboutUsInfoIds))); } private static long[] ParseLongArray(string value) => value.Split(',', StringSplitOptions.RemoveEmptyEntries).Select(long.Parse).ToArray(); }