|
@@ -25,7 +25,7 @@ public sealed class NoticeController : BaseController
|
|
/// <param name="page"></param>
|
|
/// <param name="page"></param>
|
|
/// <param name="size"></param>
|
|
/// <param name="size"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
- [Route("notice"), AllowAccessFirewall, Route("n", Order = 1), ResponseCache(Duration = 600, VaryByQueryKeys = new[] { "page", "size" }, VaryByHeader = "Cookie")]
|
|
|
|
|
|
+ [Route("notice"), AllowAccessFirewall, Route("n", Order = 1), ResponseCache(Duration = 600, VaryByQueryKeys = ["page", "size"], VaryByHeader = "Cookie")]
|
|
public ActionResult Index([Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")] int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")] int size = 15)
|
|
public ActionResult Index([Range(1, int.MaxValue, ErrorMessage = "页码必须大于0")] int page = 1, [Range(1, 50, ErrorMessage = "页大小必须在0到50之间")] int size = 15)
|
|
{
|
|
{
|
|
var list = NoticeService.GetQuery(n => n.NoticeStatus == NoticeStatus.Normal, n => n.ModifyDate, false).ProjectDto().ToCachedPagedList(page, size);
|
|
var list = NoticeService.GetQuery(n => n.NoticeStatus == NoticeStatus.Normal, n => n.ModifyDate, false).ProjectDto().ToCachedPagedList(page, size);
|