|
@@ -86,11 +86,12 @@ func GetSumShopPerfomance(wxUserId, beginTime, endTime int64) int64 {
|
|
|
type Ret struct {
|
|
type Ret struct {
|
|
|
Count int64
|
|
Count int64
|
|
|
}
|
|
}
|
|
|
|
|
+ state := int64(1)
|
|
|
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 status=? 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, state, wxUserId).QueryRow(ret)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
beego.BeeLogger.Error("GetSumShopPerfomance err=[%s]", err)
|
|
beego.BeeLogger.Error("GetSumShopPerfomance err=[%s]", err)
|
|
|
return 0
|
|
return 0
|
|
@@ -105,11 +106,12 @@ func GetSumBalancePerfomance(wxUserId, beginTime, endTime int64) int64 {
|
|
|
type Ret struct {
|
|
type Ret struct {
|
|
|
Count int64
|
|
Count int64
|
|
|
}
|
|
}
|
|
|
|
|
+ state := int64(1)
|
|
|
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 state=? 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, state, wxUserId).QueryRow(ret)
|
|
|
if err != nil {
|
|
if err != nil {
|
|
|
beego.BeeLogger.Error("GetSumBalancePerfomance err=[%s]", err)
|
|
beego.BeeLogger.Error("GetSumBalancePerfomance err=[%s]", err)
|
|
|
return 0
|
|
return 0
|