quanwei
2025-11-03 ef5d748e3e3331bd20d4065c33e7867c2637d1db
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
53
54
<?php
 
namespace app\shop\model\plus\live;
 
use app\common\model\plus\live\Room as RoomModel;
 
/**
 * 房间模型
 */
class Room extends RoomModel
{
    /**
     * 列表
     */
    public function getList($params)
    {
        return $this->with(['share', 'user','supplier','cover'])
            ->order(['create_time' => 'desc'])
            ->paginate($params);
    }
 
    /**
     * 删除记录 (软删除)
     */
    public function setDelete($where)
    {
        return self::update(['is_delete' => 1], $where);
    }
 
    public function edit($data)
    {
        return $this->save([
            'virtual_num' => $data['virtual_num'],
            'is_top' => $data['is_top'],
            'is_delete' => $data['is_delete'],
            'sort' => $data['sort'],
        ]);
    }
    /**
     * 审核
     */
    public function audit($data)
    {   
        if($this['live_status']!=0){
            $this->error = "已经审核";
            return false;
        }
        $data['status'] = $data['status']==10?102:100;
        return $this->save([
            'live_status' => $data['status'],
            'audit_remark' => $data['remark'],
        ]);
    }
}