31 lines
760 B
PHP
31 lines
760 B
PHP
<?php
|
|
|
|
namespace app\model;
|
|
|
|
/**
|
|
* 资料审核日志
|
|
*
|
|
* Class CheckLog
|
|
* @package app\model
|
|
*/
|
|
class CheckLog extends Base
|
|
{
|
|
// 获取用户待审核或审核失败的资料
|
|
public static function getCheckInfo(int $accountId)
|
|
{
|
|
return self::alias('cl')
|
|
->leftJoin('position p', 'p.id = cl.position')
|
|
->leftJoin('outsource o', 'o.id = cl.outsource_id')
|
|
->where('cl.account_id', $accountId)
|
|
->whereIn('cl.status', [self::COMMON_OFF])
|
|
->field('cl.*,p.name as position_name,o.name as outsource_name')
|
|
->order('cl.id', 'desc')
|
|
->find();
|
|
}
|
|
|
|
public function account()
|
|
{
|
|
return $this->hasOne(Account::class, 'id', 'account_id');
|
|
}
|
|
}
|