UpdateController.class.php
1.21 KB
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
45
46
47
48
49
50
51
52
<?php
/**
* Created by PhpStorm.
* User: zhoutao
* Date: 2018/1/8
* Time: 下午3:54
*/
namespace Apicp\Controller\VhLiveOperate;
use Common\Common\Constant;
use Common\Common\Vhall;
use Common\Service\MainService;
class UpdateController extends AbstractController
{
/**
* Update
* @author houyingcai
* @desc 更新接口
* @return bool
*/
public function Index_post()
{
$postData = I('post.');
// 初始化微吼直播类
$vh_class = Vhall::instance();
//获取直播中 更多设置
$setting = $this->getLiveSetting($postData, Constant::VH_MORE_SETTING_FIELD);
// 获取数据表原始数据
$vh_set_info = $this->vhall_service->get_by_conds(['vh_id' => $postData['id']]);
// 获取微吼直播详情
$uc_info = $vh_class->details($postData['id']);
$postData['liveHost']=$postData['teacher_name'];
// 更新直播数据
$vh_class->update($postData);
// 更新设置
$this->vhall_service->update_by_conds(['vh_id' => $postData['id']], $setting);
// 更新发布消息
$this->update_send_msg($postData, $uc_info, $vh_set_info);
return true;
}
}