|
@@ -13,6 +13,7 @@
|
|
|
|
|
|
|
|
namespace crmeb\listens;
|
|
namespace crmeb\listens;
|
|
|
|
|
|
|
|
|
|
+use app\common\model\user\AwardIntegralPrice;
|
|
|
use app\common\repositories\user\AwardIntegralPriceRepository;
|
|
use app\common\repositories\user\AwardIntegralPriceRepository;
|
|
|
use crmeb\interfaces\ListenerInterface;
|
|
use crmeb\interfaces\ListenerInterface;
|
|
|
use crmeb\services\TimerService;
|
|
use crmeb\services\TimerService;
|
|
@@ -29,7 +30,8 @@ class AutoSavePriceListen extends TimerService implements ListenerInterface
|
|
|
$day = date('Y-m-d', strtotime('-1 day'));
|
|
$day = date('Y-m-d', strtotime('-1 day'));
|
|
|
$service = app()->make(AwardIntegralPriceRepository::class);
|
|
$service = app()->make(AwardIntegralPriceRepository::class);
|
|
|
$yesterday = $service->awardIntegralPrice($day);
|
|
$yesterday = $service->awardIntegralPrice($day);
|
|
|
- @file_put_contents('yesterday.txt', json_encode($yesterday));
|
|
|
|
|
|
|
+ @file_put_contents('yesterday.txt', json_encode($yesterday) . PHP_EOL, FILE_APPEND);
|
|
|
|
|
+ @file_put_contents('yesterday.txt', AwardIntegralPrice::getLastSql());
|
|
|
if (!isset($yesterday['basePrice'])) {
|
|
if (!isset($yesterday['basePrice'])) {
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|