You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
847 B
39 lines
847 B
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace app\Common\service;
|
|
|
|
use app\Common\model\LongbingUserInfo;
|
|
|
|
class LongbingUserInfoService
|
|
{
|
|
|
|
/**
|
|
* @param $userId
|
|
* @功能说明:获取员工姓名
|
|
* @author jingshuixian
|
|
* @DataTime: 2020/1/14 14:14
|
|
*/
|
|
public static function getNameByUserId($userId){
|
|
$userInfo = new LongbingUserInfo();
|
|
$name = $userInfo->where(['fans_id'=>$userId])->value('name');
|
|
|
|
return $name;
|
|
}
|
|
|
|
/**
|
|
* @param $userId
|
|
* @功能说明:判断是否为员工
|
|
* @author jingshuixian
|
|
* @DataTime: 2020/1/14 14:54
|
|
*/
|
|
public static function isStraffByUserId($userId){
|
|
|
|
$userInfo = new LongbingUserInfo();
|
|
$is_staff = $userInfo->where(['fans_id'=>$userId])->value('is_staff');
|
|
return $is_staff ? true : false ;
|
|
}
|
|
|
|
|
|
} |