diff --git a/app/common/repositories/user/DepositRecordDailyRepository.php b/app/common/repositories/user/DepositRecordDailyRepository.php index 3bb9c6d..d958066 100644 --- a/app/common/repositories/user/DepositRecordDailyRepository.php +++ b/app/common/repositories/user/DepositRecordDailyRepository.php @@ -68,8 +68,9 @@ class DepositRecordDailyRepository extends BaseRepository $currentDeposit = $depositList[$record['deposit_id']]; if(time() - strtotime($record['create_time']) > 86400 * $currentDeposit['cycle'] and $record['status'] == 1){ - $record->status = 2; + $record->status = 3; $record->save(); + app(UserAssetsRepository::class)->updateAssets($record['uid'], array('deposit' => $record['price'])); } if ($item['diamond'] < $currentDeposit['diamond_max']) { diff --git a/app/common/repositories/user/UserAssetsRepository.php b/app/common/repositories/user/UserAssetsRepository.php index 436199f..0bb3397 100644 --- a/app/common/repositories/user/UserAssetsRepository.php +++ b/app/common/repositories/user/UserAssetsRepository.php @@ -99,6 +99,9 @@ class UserAssetsRepository extends BaseRepository if (isset($data['stock']) and $data['stock']) { $update['stock'] = $data['stock']; } + if (isset($data['deposit']) and $data['deposit']) { + $update['deposit'] = $data['deposit']; + } $updateData = array(); foreach ($update as $key => $value) { if ($value) { diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 9f07f33..dc695e5 100755 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -85,7 +85,7 @@ class Auth extends BaseController // app(UserAssetsLogRepository::class)->shareAward(1); // app(DepositRecordDailyRepository::class)->runDaily(); - event('pay_success_user_recharge', array('order_sn' => 'wxu2024041817195114')); +// event('pay_success_user_recharge', array('order_sn' => 'wxu2024041817195114')); return app('json')->success(); }