Forráskód Böngészése

feat:项目明细数量限制

wangshan 2 éve
szülő
commit
550c4ac12e

+ 2 - 1
src/jfw/modules/bigmember/src/config.json

@@ -182,5 +182,6 @@
   },
   "contextOldVipLimit": 1664553600,
   "potentialCount": 1000,
-  "newDataTime": 1685606275
+  "newDataTime": 1685606275,
+  "projectCount": 5000
 }

+ 1 - 0
src/jfw/modules/bigmember/src/config/config.go

@@ -68,6 +68,7 @@ type config struct {
 	ContextOldVipLimit int64 `json:"contextOldVipLimit"` //超级订阅部分用户:--- 超前项目权限
 	PotentialCount     int   `json:"potentialCount"`     //潜在客户 潜在竞争对手数据量
 	NewDataTime        int64 `json:"newDataTime"`        // 用于周边月报区分是否为新数据 、配置为p350发版的时间
+	ProjectCount       int   `json:"projectCount"`       //画像和报告项目明细最大数量
 }
 
 type CustomerInfo struct {

+ 4 - 1
src/jfw/modules/bigmember/src/entity/marketAnalysis/marketAnalysisEntity.go

@@ -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