fix register 3
This commit is contained in:
@@ -12,7 +12,8 @@ use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use \App\Http\Controllers\Customer\FundController;
|
||||
use App\Http\Controllers\Site\ReportController ;
|
||||
use App\Http\Controllers\Site\ReportController;
|
||||
use App\Services\ConfigService;
|
||||
|
||||
|
||||
class ProductController extends SuperController
|
||||
@@ -138,6 +139,7 @@ class ProductController extends SuperController
|
||||
// }
|
||||
// }catch (\Exception $e){}
|
||||
|
||||
$config = app(ConfigService::class);
|
||||
$products = Product::with([])->whereNotNull('reading_method')->get();
|
||||
foreach ($products as $product) {
|
||||
$collection = collect($RPrices);
|
||||
@@ -158,6 +160,9 @@ class ProductController extends SuperController
|
||||
'price' => $RPrice['price'],
|
||||
'price_profit' => $RPrice['profit'],
|
||||
]);
|
||||
$config->trackDailyPriceExtreme(
|
||||
(float) $RPrice['price'] + (float) ($RPrice['profit'] ?? 0)
|
||||
);
|
||||
|
||||
if ($product->bubble == 1) {
|
||||
$ReportController = new ReportController();
|
||||
@@ -176,6 +181,7 @@ class ProductController extends SuperController
|
||||
'price_profit' => 0,
|
||||
'updated_at' => \Carbon\Carbon::now()->format('Y-m-d H:i:s'),
|
||||
]);
|
||||
$config->trackDailyPriceExtreme((float) $cp);
|
||||
}
|
||||
|
||||
return response()->json(true);
|
||||
|
||||
Reference in New Issue
Block a user