You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.6 KiB
C#
60 lines
1.6 KiB
C#
namespace Admin.NET.Plugin.HwPortal;
|
|
|
|
[AllowAnonymous]
|
|
[Route("portal/hwWeb1")]
|
|
public class HwWeb1Controller : HwPortalControllerBase
|
|
{
|
|
private readonly HwWeb1Service _service;
|
|
|
|
public HwWeb1Controller(HwWeb1Service service)
|
|
{
|
|
_service = service;
|
|
}
|
|
|
|
[HttpGet("list")]
|
|
public async Task<HwPortalTableDataInfo<HwWeb1>> List([FromQuery] HwWeb1 input)
|
|
{
|
|
return GetDataTableWithoutPaging(await _service.SelectHwWebList(input));
|
|
}
|
|
|
|
[HttpPost("export")]
|
|
[Idempotent]
|
|
public async Task<IActionResult> Export([FromQuery] HwWeb1 input)
|
|
{
|
|
return ExportExcel(await _service.SelectHwWebList(input), "官网详情页数据");
|
|
}
|
|
|
|
[HttpGet("{webCode:long}")]
|
|
public async Task<HwPortalAjaxResult> GetInfo(long webCode)
|
|
{
|
|
return Success(await _service.SelectHwWebByWebcode(webCode));
|
|
}
|
|
|
|
[HttpPost]
|
|
[Idempotent]
|
|
public async Task<HwPortalAjaxResult> Add([FromBody] HwWeb1 input)
|
|
{
|
|
return ToAjax(await _service.InsertHwWeb(input));
|
|
}
|
|
|
|
[HttpPut]
|
|
[Idempotent]
|
|
public async Task<HwPortalAjaxResult> Edit([FromBody] HwWeb1 input)
|
|
{
|
|
return ToAjax(await _service.UpdateHwWeb(input));
|
|
}
|
|
|
|
[HttpDelete("{webIds}")]
|
|
[Idempotent]
|
|
public async Task<HwPortalAjaxResult> Remove(string webIds)
|
|
{
|
|
return ToAjax(await _service.DeleteHwWebByWebIds(ParseLongArray(webIds)));
|
|
}
|
|
|
|
[HttpGet("getHwWeb1List")]
|
|
public async Task<HwPortalAjaxResult> GetHwWeb1List([FromQuery] HwWeb1 input)
|
|
{
|
|
return Success(await _service.SelectHwWebList(input));
|
|
}
|
|
}
|