瀏覽代碼

add reverse:for v1.0.7 权益卡订单条件

tags/v1.0.7
huangjiajun 2 年之前
父節點
當前提交
90d86db75f
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      db/db_order.go

+ 2
- 2
db/db_order.go 查看文件

@@ -16,7 +16,7 @@ func OrderListCountByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, state,
fmt.Println(str)
total, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at=0", uid, stime, etime).In("state", state).Count(&model.OrdList{})
total1, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at>0", uid, stime, etime).Count(&model.OrdList{})
total2, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and state=?", uid, stime, etime, 1).Count(&model.PrivilegeCardOrd{})
total2, _ := Db.Where("uid = ? AND created_at > ? AND created_at < ? and state=?", uid, stime, etime, 1).Count(&model.PrivilegeCardOrd{})

fmt.Println(total)

@@ -75,7 +75,7 @@ func OrderListPaidPriceByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, sta
fmt.Println(str)
total, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at=0", uid, stime, etime).In("state", state).Sum(&model.OrdList{}, "paid_price")
total1, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and settle_at>0", uid, stime, etime).Sum(&model.OrdList{}, "paid_price")
total2, _ := Db.Where("uid = ? AND create_at > ? AND create_at < ? and state=?", uid, stime, etime, 1).Sum(&model.PrivilegeCardOrd{}, "paid_price")
total2, _ := Db.Where("uid = ? AND created_at > ? AND created_at < ? and state=?", uid, stime, etime, 1).Sum(&model.PrivilegeCardOrd{}, "paid_price")
fmt.Println(total)

return total + total1 + total2, nil


Loading…
取消
儲存