From e33f9223e8f912deb8038aa3cf46f9ac2b533047 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 4 Jun 2024 13:58:12 +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 --- app/admin/svc/order/svc_order_list.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/svc/order/svc_order_list.go b/app/admin/svc/order/svc_order_list.go index cca69c8..58e3722 100644 --- a/app/admin/svc/order/svc_order_list.go +++ b/app/admin/svc/order/svc_order_list.go @@ -531,7 +531,7 @@ func OrderGoodsTotal(c *gin.Context) { } where += " and o.enterprise_id in(" + php2go.Implode(",", oids) + ")" } - sql := "select SUM(IF(state!=5,num*price,0)) as amount,SUM(IF(state!=5,num,0)) as alls,SUM(IF(state=0,num,0)) as wait_do,SUM(IF(state=1,num,0)) as dos,SUM(IF(state=2,num,0)) as baking,SUM(IF(state=3,num,0)) as sorting,SUM(IF(state=4,num,0)) as success,SUM(IF(state=5,num,0)) as cancel from `order_goods` left join `order` o on o.oid=og.oid where %s" + sql := "select SUM(IF(og.state!=5,og.num*og.price,0)) as amount,SUM(IF(og.state!=5,og.num,0)) as alls,SUM(IF(og.state=0,og.num,0)) as wait_do,SUM(IF(og.state=1,og.num,0)) as dos,SUM(IF(og.state=2,og.num,0)) as baking,SUM(IF(og.state=3,og.num,0)) as sorting,SUM(IF(og.state=4,og.num,0)) as success,SUM(IF(og.state=5,og.num,0)) as cancel from `order_goods` og left join `order` o on o.oid=og.oid where %s" sql = fmt.Sprintf(sql, where) nativeString, _ := db.QueryNativeString(eg, sql) var res = make([]string, 0)