Browse Source

最近一年数据

wangshan 4 years ago
parent
commit
58917df3b1
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/jfw/modules/common/src/qfw/util/bidsearch/search.go

+ 3 - 3
src/jfw/modules/common/src/qfw/util/bidsearch/search.go

@@ -124,9 +124,9 @@ func GetBidSearchQuery(area, publishtime, subtype, winner, buyerclass string) st
 			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-7, 0, 0, 0, 0, time.Local).Unix())
 		} else if publishtime == "lately-30" { //最近30天
 			starttime = fmt.Sprint(time.Date(now.Year(), now.Month(), now.Day()-30, 0, 0, 0, 0, time.Local).Unix())
-		} else if publishtime == "thisyear" { //
-			starttime = fmt.Sprint(time.Date(now.Year()-1, 1, 1, 0, 0, 0, 0, time.Local).Unix())
-			endtime = fmt.Sprint(time.Date(now.Year()-1, 12, 31, 23, 59, 59, 0, time.Local).Unix())
+		} else if publishtime == "thisyear" { //最近一
+			starttime = fmt.Sprint(time.Date(now.Year()-1, now.Month(), now.Day(), now.Hour(), now.Minute(), now.Second(), 0, time.Local).Unix())
+			endtime = fmt.Sprint(now.Unix())
 		} else {
 			starttime = strings.Split(publishtime, "_")[0]
 			endtime = strings.Split(publishtime, "_")[1]