1
This commit is contained in:
@@ -4,7 +4,9 @@ namespace App\Services;
|
||||
|
||||
use App\Constants\HttpEnumCode;
|
||||
use App\Model\OrderPrescription;
|
||||
use App\Model\User;
|
||||
use App\Model\UserPharmacist;
|
||||
use App\Model\UserPharmacistInfo;
|
||||
|
||||
/**
|
||||
* 药师
|
||||
@@ -166,7 +168,24 @@ class UserPharmacistService extends BaseService
|
||||
{
|
||||
$user_info = $this->request->getAttribute("userInfo") ?? [];
|
||||
|
||||
// 获取用户数据
|
||||
$fields = [
|
||||
'age',
|
||||
'sex',
|
||||
'avatar',
|
||||
];
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$user = User::getOne($params,$fields);
|
||||
if (empty($user)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
// 获取药师数据
|
||||
$fields = [
|
||||
'pharmacist_id',
|
||||
'pharmacist_id',
|
||||
];
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$user_pharmacist = UserPharmacist::getOne($params);
|
||||
@@ -177,6 +196,11 @@ class UserPharmacistService extends BaseService
|
||||
// 获取药师详情数据
|
||||
$params = array();
|
||||
$params['user_id'] = $user_info['user_id'];
|
||||
$user_pharmacist_info = UserPharmacistInfo::getOne($params);
|
||||
if (empty($user_pharmacist_info)){
|
||||
return fail();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user