From fe7bba4f9ff8bd8dcfb165a50d9bb7468a63d193 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 18 May 2023 14:43:44 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/db_mall_order.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db_mall_order.go b/db/db_mall_order.go index c622004..ba453a2 100644 --- a/db/db_mall_order.go +++ b/db/db_mall_order.go @@ -72,7 +72,7 @@ func MallOrdByTime(Db *xorm.Engine, uid, buyType, state, stime, etime interface{ sess = sess.And(" confirm_time > ? AND confirm_time < ?", stime, etime) } if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 { - sess.And("order_type", buyType) + sess.And("order_type=?", buyType) } total, err := sess.Sum(&model.MallOrd{}, "cost_price") fmt.Println(err) @@ -142,7 +142,7 @@ func MallOrderRelateListByState(Db *xorm.Engine, uid, state interface{}) (*map[i func MallOrd(Db *xorm.Engine, uid, buyType, state interface{}) (float64, error) { sess := Db.Where("uid = ? ", uid).In("state", state) if zhios_condition_statistics_utils.AnyToInt64(buyType) > 0 { - sess.And("order_type", buyType) + sess.And("order_type=?", buyType) } total, err := sess.Sum(&model.MallOrd{}, "cost_price") fmt.Println(err)