|
|
@ -946,7 +946,7 @@ class UserRepository extends BaseRepository |
|
|
|
$config = systemConfig(['extension_limit', 'extension_limit_day', 'integral_user_give']); |
|
|
|
$config = systemConfig(['extension_limit', 'extension_limit_day', 'integral_user_give']); |
|
|
|
event('user.spread.before', compact('user', 'spreadUid')); |
|
|
|
event('user.spread.before', compact('user', 'spreadUid')); |
|
|
|
Db::transaction(function () use ($spread, $spreadUid, $user, $config) { |
|
|
|
Db::transaction(function () use ($spread, $spreadUid, $user, $config) { |
|
|
|
$user->spread_uid = $spreadUid; |
|
|
|
$user->spread_uid2 = $spreadUid; |
|
|
|
$user->spread_time = date('Y-m-d H:i:s'); |
|
|
|
$user->spread_time = date('Y-m-d H:i:s'); |
|
|
|
if ($config['extension_limit'] && $config['extension_limit_day']) { |
|
|
|
if ($config['extension_limit'] && $config['extension_limit_day']) { |
|
|
|
$user->spread_limit = date('Y-m-d H:i:s', strtotime('+ ' . $config['extension_limit_day'] . ' day')); |
|
|
|
$user->spread_limit = date('Y-m-d H:i:s', strtotime('+ ' . $config['extension_limit_day'] . ' day')); |
|
|
|