|
@@ -531,7 +531,7 @@ func OrderGoodsTotal(c *gin.Context) { |
|
|
} |
|
|
} |
|
|
where += " and o.enterprise_id in(" + php2go.Implode(",", oids) + ")" |
|
|
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) |
|
|
sql = fmt.Sprintf(sql, where) |
|
|
nativeString, _ := db.QueryNativeString(eg, sql) |
|
|
nativeString, _ := db.QueryNativeString(eg, sql) |
|
|
var res = make([]string, 0) |
|
|
var res = make([]string, 0) |
|
|