|
@@ -12,6 +12,13 @@ import ( |
|
|
func OrderListCountByUIDByOrderTypeByTime(Db *xorm.Engine, uid, buyType, state, stime, etime interface{}) (int64, error) { |
|
|
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", |
|
|
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.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("============test订单数=================") |
|
|
fmt.Println(str) |
|
|
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{}) |
|
|
total, _ := Db.Where("uid = ? AND confirm_at > ? AND confirm_at < ? and settle_at=0", uid, stime, etime).In("state", state).Count(&model.OrdList{}) |
|
|