预存到期转为可提现金额

main
fengxinyhyl 10 months ago
parent bbb7357e9a
commit 6a4444c65e
  1. 3
      app/common/repositories/user/DepositRecordDailyRepository.php
  2. 3
      app/common/repositories/user/UserAssetsRepository.php
  3. 2
      app/controller/api/Auth.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']) {

@ -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) {

@ -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();
}

Loading…
Cancel
Save