22 lines
438 B
PHP
22 lines
438 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace app\dao\syj;
|
|
|
|
use app\dao\BaseDao;
|
|
use app\model\syj\PromoteUserAmount;
|
|
|
|
class PromoteUserAmountDao extends BaseDao
|
|
{
|
|
protected function setModel(): string
|
|
{
|
|
return PromoteUserAmount::class;
|
|
}
|
|
|
|
public function lockByUid(int $uid): ?array
|
|
{
|
|
$row = $this->getModel()->where('uid', $uid)->lock(true)->find();
|
|
return $row ? $row->toArray() : null;
|
|
}
|
|
}
|