DengBiao 2 лет назад
Родитель
Сommit
ac412f3c34
1 измененных файлов: 7 добавлений и 0 удалений
  1. +7
    -0
      db/db_order.go

+ 7
- 0
db/db_order.go Просмотреть файл

@@ -12,6 +12,13 @@ import (
func OrderListCountByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, state, stime, etime interface{}) (int64, error) {
str := fmt.Sprintf("uid = %s AND order_type = %s AND ( state in (%s) or settle_at>0) AND create_at > %s AND create_at < %s",
zhios_condition_statistics_utils.AnyToString(uid), buyType, state, stime, etime)
zhios_condition_statistics_utils.FilePutContents("OrderListCountByUIDByOrderTypeByTime", zhios_condition_statistics_utils.SerializeStr(map[string]interface{}{
"uid": uid,
"buyType": buyType,
"state": state,
"stime": stime,
"etime": etime,
}))
fmt.Println("============test订单数=================")
fmt.Println(str)
total, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at=0", uid, stime, etime).In("state", state).Count(&model.OrdList{})


Загрузка…
Отмена
Сохранить