Explorar el Código

更改统计条件

abiao hace 5 años
padre
commit
fc3d65783f
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      go/gopath/src/fohow-statement-api/models/d5c_user.go

+ 1 - 1
go/gopath/src/fohow-statement-api/models/d5c_user.go

@@ -267,7 +267,7 @@ func GetFohowRankMonthNewUsers(startTime, endTime time.Time) (list []*MonthItem)
 		ORDER BY
 			ym ASC;
 		`
-	sql = fmt.Sprintf(sql, "%Y%m", "%m", endTime, startTime)
+	sql = fmt.Sprintf(sql, "%Y%m", "%m", endTime.Format("2006-01-02"), startTime.Format("2006-01-02"))
 	beego.Warn("sqlquery%s", sql)
 	_, err := o.Raw(sql).QueryRows(&list)