AddUserController.class.php
1012 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?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;
}
}