From ac412f3c34cee01728e12dad853b2cb7ea3fa23c Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 1 Dec 2022 19:59:42 +0800 Subject: [PATCH] add log --- db/db_order.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/db/db_order.go b/db/db_order.go index 401be1b..e9a1d77 100644 --- a/db/db_order.go +++ b/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{})