From 90d86db75f24279ad5aaf0c5e8e023ffc9bb1dee Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 4 Aug 2022 13:44:51 +0800 Subject: [PATCH] =?UTF-8?q?add=20reverse:for=20v1.0.7=20=E6=9D=83=E7=9B=8A?= =?UTF-8?q?=E5=8D=A1=E8=AE=A2=E5=8D=95=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/db_order.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_order.go b/db/db_order.go index 4ea3918..ecd6106 100644 --- a/db/db_order.go +++ b/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