|
@@ -5,6 +5,7 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/gogf/gf/v2/util/gconv"
|
|
|
"jy/src/jfw/modules/publicapply/src/config"
|
|
|
+ "math"
|
|
|
"strconv"
|
|
|
"strings"
|
|
|
"time"
|
|
@@ -79,7 +80,8 @@ func (es *EnterpriseSearch) Check() (*EnterpriseSearch, error) {
|
|
|
if es.PageSize == 0 { //默认十条
|
|
|
es.PageSize = 10
|
|
|
}
|
|
|
- if (es.PageNum+1)*es.PageSize > gconv.Int(config.Config.EntSearchLimit) {
|
|
|
+ maxPageSize := math.Ceil(gconv.Float64(config.Config.EntSearchLimit) / gconv.Float64(es.PageSize))
|
|
|
+ if es.PageNum > gconv.Int(maxPageSize) {
|
|
|
return nil, fmt.Errorf("超出查询数量限制")
|
|
|
}
|
|
|
//注册资本[min-max]
|