智慧教务系统
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.
 
 
 
 
 
 

53 lines
1.9 KiB

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址:https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
namespace app\api\controller\apiController;
use app\Request;
use app\service\api\apiService\CoachStudentService;
use core\base\BaseApiService;
/**
* 教练端学员管理相关接口
* Class CoachStudent
* @package app\api\controller\apiController
*/
class CoachStudent extends BaseApiService
{
/**
* 获取教练端学员列表
* @param Request $request
* @return \think\Response
*/
public function getMyStudents(Request $request)
{
try {
$data = $this->request->params([
["name", ""], // 学员姓名搜索
["phone", ""], // 联系电话搜索
["campus_id", 0], // 校区ID
["status", 0], // 学员状态
["course_id", 0], // 课程ID搜索
["class_id", 0], // 班级ID搜索
["debug", false] // 调试模式
]);
$result = (new CoachStudentService())->getMyStudents($data);
if ($result['code'] === 1) {
return success('获取成功', $result['data']);
} else {
return fail($result['msg']);
}
} catch (\Exception $e) {
return fail('获取我的学员列表失败:' . $e->getMessage());
}
}
}