wangshan 2 éve
szülő
commit
bcc9c8d3f7

+ 1 - 0
jyBXBuyer/rpc/internal/logic/buyerlistlogic.go

@@ -58,6 +58,7 @@ func (l *BuyerListLogic) BuyerList(in *bxbuyer.BuyerListReq) (*bxbuyer.BuyerList
 		if isBool {
 			query, CountQuery = model.BuyerListRedisCacheQuery(in.PageNum, in.PageSize)
 			resp = model.GetBuyerList(query, CountQuery, in, true)
+			model.SupplyBuyerListData(resp)
 			b, err := json.Marshal(resp.Data)
 			if err == nil {
 				redis.PutBytes("other", fmt.Sprintf(model.P_redis_key, in.PageNum, in.PageSize), &b, model.P_redis_time)

+ 3 - 2
jyBXBuyer/rpc/model/buyerListBYEs.go

@@ -89,7 +89,7 @@ func SupplyDataQuery(buyerList []string) (query string) {
 func getTimeRage() (st, et time.Time) {
 	now := time.Now()
 	eYear := now.Year()
-	sYear := now.Year() - 5
+	sYear := now.Year() - 2
 	//返回默认时间
 	sTimeStamp := time.Date(sYear, 1, 1, 0, 0, 0, 0, time.Local)
 	eTimeStamp := time.Date(eYear, now.Month(), now.Day(), now.Hour(), now.Minute(), 0, 0, time.Local)
@@ -268,8 +268,9 @@ func GetProjectContactCount(buyerName string) int64 {
 	if musts == nil || len(musts) == 0 {
 		return 0
 	}
-	searchSql := fmt.Sprintf(`{"query":{"bool":{"must":[%s]}},"_source":["_id","zbtime","projectname","list"],"sort":[{"zbtime":"desc"}],"size":500}`, strings.Join(musts, ","))
+	searchSql := fmt.Sprintf(`{"query":{"bool":{"must":[%s]}},"_source":["list"],"sort":[{"zbtime":"desc"}],"size":500}`, strings.Join(musts, ","))
 	projectList := elastic.Get(P_INDEX, P_TYPE, searchSql)
+	logx.Info("GetProjectContactCount esget 耗时", time.Since(start), searchSql)
 	if projectList == nil || len(*projectList) == 0 {
 		return 0
 	}