update
This commit is contained in:
parent
ec5d57c69b
commit
a0d5104838
|
@ -38,6 +38,11 @@ class AnimalInfoLogic extends BaseLogic
|
||||||
*/
|
*/
|
||||||
public static function add(array $params): bool
|
public static function add(array $params): bool
|
||||||
{
|
{
|
||||||
|
$repeat = AnimalInfo::where('sn', $params['sn'])->count();
|
||||||
|
if ($repeat > 0) {
|
||||||
|
self::setError('耳号已使用');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
Db::startTrans();
|
Db::startTrans();
|
||||||
try {
|
try {
|
||||||
AnimalInfo::create([
|
AnimalInfo::create([
|
||||||
|
|
Loading…
Reference in New Issue