mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
handle conflict
This commit is contained in:
@@ -65,6 +65,8 @@ class GenerateTemporaryInvite implements ShouldQueue
|
|||||||
}
|
}
|
||||||
$idArr = explode(",", $idStr);
|
$idArr = explode(",", $idStr);
|
||||||
do_log(sprintf("going to handle %d uid...", count($idArr)));
|
do_log(sprintf("going to handle %d uid...", count($idArr)));
|
||||||
|
$now = Carbon::now();
|
||||||
|
$expiredAt = Carbon::now()->addDays($this->days);
|
||||||
foreach ($idArr as $uid) {
|
foreach ($idArr as $uid) {
|
||||||
try {
|
try {
|
||||||
$hashArr = $toolRep->generateUniqueInviteHash([], $this->count, $this->count);
|
$hashArr = $toolRep->generateUniqueInviteHash([], $this->count, $this->count);
|
||||||
@@ -75,8 +77,8 @@ class GenerateTemporaryInvite implements ShouldQueue
|
|||||||
'invitee' => '',
|
'invitee' => '',
|
||||||
'hash' => $hash,
|
'hash' => $hash,
|
||||||
'valid' => 0,
|
'valid' => 0,
|
||||||
'expired_at' => Carbon::now()->addDays($this->days),
|
'expired_at' => $expiredAt,
|
||||||
'created_at' => Carbon::now(),
|
'created_at' => $now,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
if (!empty($data)) {
|
if (!empty($data)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user