浏览代码

更改统计条件

abiao 5 年之前
父节点
当前提交
fc3d65783f
共有 1 个文件被更改,包括 1 次插入1 次删除
  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)