Kirin 1 vuosi sitten
vanhempi
commit
b61a13feaa
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app/controller/api/v1/PublicController.php

+ 1 - 1
app/controller/api/v1/PublicController.php

@@ -70,7 +70,7 @@ class PublicController extends BaseController
             ->where('is_system_del', 0)
             ->where('refund_status', 0)
             ->whereIn('status', [2, 3])
-            ->sum('(total_price-cost)');
+            ->field('sum(total_price-cost) as total_price_sum')->find();
         var_dump($order_price);
     }