初始化仓库
This commit is contained in:
41
service/modules/v1/controllers/HomeController.php
Normal file
41
service/modules/v1/controllers/HomeController.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
namespace service\modules\v1\controllers;
|
||||
|
||||
use common\core\BaseServiceController;
|
||||
use common\models\PatientVisitRecord;
|
||||
|
||||
/**
|
||||
* @doc-module 首页
|
||||
*/
|
||||
class HomeController extends BaseServiceController
|
||||
{
|
||||
/**
|
||||
* @doc-name 精选列表
|
||||
* @doc-return mixed @PatientVisitRecord{*,@DocInfo{su_id-int-服务端id,name-string-医生}} 问诊记录列表
|
||||
*/
|
||||
public function actionSelectList()
|
||||
{
|
||||
return PatientVisitRecord::find()
|
||||
->where([
|
||||
'su_id'=>\Yii::$app->user->identity->id
|
||||
])
|
||||
->with(['docInfo'=>function($query){
|
||||
$query->select('su_id,name');
|
||||
}])
|
||||
->asArray()->orderBy(['id'=>SORT_DESC])->all();
|
||||
}
|
||||
|
||||
/**
|
||||
* @doc-name 设置精选
|
||||
* @doc-return mixed @PatientVisitRecord{*} 问诊记录列表
|
||||
*/
|
||||
public function actionSetSelect()
|
||||
{
|
||||
return PatientVisitRecord::find()
|
||||
->where([
|
||||
'su_id'=>\Yii::$app->user->identity->id
|
||||
])
|
||||
->all();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user