|
@@ -172,8 +172,11 @@ func (mae *MarketAnalysisEntity) ForMatData() error {
|
|
|
mae.FormatParam.Buyer = mae.BaseParam.Buyer
|
|
|
//排序
|
|
|
mae.FormatParam.Sort = qutil.If(mae.BaseParam.Sort != 0 && mae.BaseParam.Sort != 1, 0, mae.BaseParam.Sort).(int)
|
|
|
+ if mae.BaseParam.PageNum*mae.BaseParam.PageSize > config.Config.ProjectCount {
|
|
|
+ mae.BaseParam.PageNum = config.Config.ProjectCount / mae.BaseParam.PageSize
|
|
|
+ }
|
|
|
//当前页码
|
|
|
- mae.FormatParam.PageNum = qutil.If(mae.BaseParam.PageNum < 1 || mae.BaseParam.PageNum > 100, 1, mae.BaseParam.PageNum).(int)
|
|
|
+ mae.FormatParam.PageNum = qutil.If(mae.BaseParam.PageNum < 1 || mae.BaseParam.PageNum > 500, 1, mae.BaseParam.PageNum).(int)
|
|
|
//默认每页10条
|
|
|
mae.FormatParam.PageSize = qutil.If(mae.BaseParam.PageSize < 1 || mae.BaseParam.PageSize > 50, 50, mae.BaseParam.PageSize).(int)
|
|
|
return nil
|