liyinglin 2 years ago
parent c04682b4c5
commit 7ae2b65051

@ -446,10 +446,8 @@ class StatisticsController extends CommonController
public function lieToMoney($product_item_id, $factor_item_id, $orderIds)
{
$total = OrderItems::where('product_item_id', $product_item_id)
//->where('factors','like',"\"%factor_item_id\":{$factor_item_id}%")
// ->where('factors', 'like', '%"factor_item_id": '.$product_item_id.',%')
->whereRaw("factors like '%\"factor_item_id\": $factor_item_id%'")
->whereIn('order_id1', $orderIds)
->whereRaw("factors like '%\"factor_item_id\": $factor_item_id%'")
->whereIn('order_id', $orderIds)
->sum('total');
return $total;
}

Loading…
Cancel
Save