abiao лет назад: 5
Родитель
Сommit
49e5ab4f26

+ 2 - 2
go/gopath/src/fohow.com/apps/models/summary_model/user_perfomance.go

@@ -89,7 +89,7 @@ func GetSumShopPerfomance(wxUserId, beginTime, endTime int64) int64 {
 	ret := &Ret{}
 	o := orm.NewOrm()
 	tbn := "shop_applications"
-	sql := fmt.Sprintf("SELECT sum(`total`) as count FROM `%s` WHERE  UNIX_TIMESTAMP(pass_time)>? and UNIX_TIMESTAMP(pass_time)<? and  state=? and wx_user_id=? ;", tbn)
+	sql := fmt.Sprintf("SELECT sum(`total`) as count FROM `%s` WHERE  UNIX_TIMESTAMP(pass_time)>? and UNIX_TIMESTAMP(pass_time)<? and  status=? and wx_user_id=? ;", tbn)
 	err := o.Raw(sql, beginTime, endTime, 1, wxUserId).QueryRow(ret)
 	if err != nil {
 		beego.BeeLogger.Error("GetSumShopPerfomance err=[%s]", err)
@@ -108,7 +108,7 @@ func GetSumBalancePerfomance(wxUserId, beginTime, endTime int64) int64 {
 	ret := &Ret{}
 	o := orm.NewOrm()
 	tbn := "balance_orders"
-	sql := fmt.Sprintf("SELECT sum(`paied_price`) as count FROM `%s` WHERE  paied_at>? and paied_at<? and  status=? and wx_user_id=? ;", tbn)
+	sql := fmt.Sprintf("SELECT sum(`paied_price`) as count FROM `%s` WHERE  paied_at>? and paied_at<? and  state=? and wx_user_id=? ;", tbn)
 	err := o.Raw(sql, beginTime, endTime, 1, wxUserId).QueryRow(ret)
 	if err != nil {
 		beego.BeeLogger.Error("GetSumBalancePerfomance err=[%s]", err)