|
@@ -89,7 +89,7 @@ func GetSumShopPerfomance(wxUserId, beginTime, endTime int64) int64 {
|
|
|
ret := &Ret{}
|
|
ret := &Ret{}
|
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
|
tbn := "shop_applications"
|
|
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)
|
|
err := o.Raw(sql, beginTime, endTime, 1, wxUserId).QueryRow(ret)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
beego.BeeLogger.Error("GetSumShopPerfomance err=[%s]", err)
|
|
beego.BeeLogger.Error("GetSumShopPerfomance err=[%s]", err)
|
|
@@ -108,7 +108,7 @@ func GetSumBalancePerfomance(wxUserId, beginTime, endTime int64) int64 {
|
|
|
ret := &Ret{}
|
|
ret := &Ret{}
|
|
|
o := orm.NewOrm()
|
|
o := orm.NewOrm()
|
|
|
tbn := "balance_orders"
|
|
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)
|
|
err := o.Raw(sql, beginTime, endTime, 1, wxUserId).QueryRow(ret)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
beego.BeeLogger.Error("GetSumBalancePerfomance err=[%s]", err)
|
|
beego.BeeLogger.Error("GetSumBalancePerfomance err=[%s]", err)
|