<?php /** *【线下培训-后台】班级添加人员接口 * * @author: ciajianhua * @email: 594609175@qq.com * @date : 2017-08-29 10:03:53 * @version $Id$ */ namespace Apicp\Controller\Team; use Common\Service\EducationService; use Common\Service\RightService; use Common\Service\RightUsersService; class AddUserController extends \Apicp\Controller\AbstractController { /** @var RightUsersService 班级表 */ protected $_right_users_service; public function before_action($action = '') { if (!parent::before_action($action)) { return false; } $this->_right_users_service = new RightUsersService(); return true; } public function Index_post() { $params = I('post.'); // 班级添加人员接口 $this->_result = $this->_right_users_service->add_user($params); // 更新首页推荐权限 $this->_right_users_service->recommender($params['ed_id']); return true; } }