|
|
@@ -70,7 +70,7 @@ func GetSumOrderPerfomance(wxUserId, orderType, beginTime, endTime int64) int64
|
|
|
ret := &Ret{}
|
|
|
o := orm.NewOrm()
|
|
|
tbn := "orders"
|
|
|
- sql := fmt.Sprintf("SELECT sum(`paied_price`-`freight`) as count FROM `%s` WHERE paied_at >? and paied_at<? and status in (?, ?, ?) ) and wx_user_id=? and order_type=?;", tbn)
|
|
|
+ sql := fmt.Sprintf("SELECT sum(`paied_price`-`freight`) as count FROM `%s` WHERE paied_at >? and paied_at<? and status in (?, ?, ?) and wx_user_id=? and order_type=?;", tbn)
|
|
|
err := o.Raw(sql, beginTime, endTime, order_model.STATUS_PROCESSING, order_model.STATUS_DISPATCH, order_model.STATUS_COMPLETE, wxUserId, orderType).QueryRow(ret)
|
|
|
if err != nil {
|
|
|
beego.BeeLogger.Error("GetSumOrderPerfomance err=[%s]", err)
|
|
|
@@ -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 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 state=? 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)
|