mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
perf: mac地址已存在检查
This commit is contained in:
parent
4f67329154
commit
1d90451b4e
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
use App\Exceptions\ApiException;
|
||||||
use App\Module\Base;
|
use App\Module\Base;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,6 +40,9 @@ class UserCheckinMac extends AbstractModel
|
|||||||
$ids = [];
|
$ids = [];
|
||||||
$list = [];
|
$list = [];
|
||||||
foreach ($array as $item) {
|
foreach ($array as $item) {
|
||||||
|
if (self::whereMac($item['mac'])->where('userid', '!=', $userid)->exists()) {
|
||||||
|
throw new ApiException("{$item['mac']} 已被其他成员设置");
|
||||||
|
}
|
||||||
$update = [];
|
$update = [];
|
||||||
if ($item['remark']) {
|
if ($item['remark']) {
|
||||||
$update = [
|
$update = [
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user