weizong song 5 years ago
parent ad2896068a
commit 4188cf4a19

@ -50,7 +50,6 @@ class OrdersController extends CommonController
}])
->where("project_id", $id)
->selectRaw("select * from (select sum(max_price) as max_total,product_id from (select max(price) as max_price,product.id as product_id from product inner join factor on factor.product_id = product.id inner join factor_items on factor.id = factor_items.factor_id group by factor_items.factor_id) as a group by a.product_id) as b left join product on product.id = b.product_id")
->leftJoin("b","product.id","=","b.product_id")
->orderBy("myindex")
->first();
return response()->json($product->toArray());

Loading…
Cancel
Save