1 2 3 4 5 6 7 8 9 10
namespace FoodLabeling.Application.Helpers; /// <summary> /// 与平台端约定:列表接口 Query 的 <c>SkipCount</c> 表示 SqlSugar 分页<strong>页码(从 1 起)</strong>, /// 不是 0 基 offset。第一页应传 <c>SkipCount=1</c>。 /// </summary> public static class PagedQueryConvention { public static int PageIndexFromSkipCount(int skipCount) => skipCount <= 0 ? 1 : skipCount; }