作者 yangfu

feat: table data cache v1

@@ -20,7 +20,10 @@ type TablePreviewCommand struct { @@ -20,7 +20,10 @@ type TablePreviewCommand struct {
20 } 20 }
21 21
22 func (cmd *TablePreviewCommand) Valid(validation *validation.Validation) { 22 func (cmd *TablePreviewCommand) Valid(validation *validation.Validation) {
23 - 23 + if cmd.UseCache && cmd.PageSize==0{
  24 + cmd.PageNumber = 1
  25 + cmd.PageSize = 10000 //默认缓存前10000条
  26 + }
24 if cmd.PageSize > 0 { 27 if cmd.PageSize > 0 {
25 cmd.Where.PageNumber = cmd.PageNumber 28 cmd.Where.PageNumber = cmd.PageNumber
26 cmd.Where.PageSize = cmd.PageSize 29 cmd.Where.PageSize = cmd.PageSize