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