huangsijun
2025-09-22 a78c011de350b188afb03beb2f26a73f35f71986
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
<?php
 
namespace app\supplier\model\ad;
use app\common\model\ad\Ad as AdModel;
/**
 * 广告模型
 */
class Ad extends AdModel
{
 
    /**
     * 添加新记录
     */
    public function add($data)
    {
        $data['app_id'] = self::$app_id;
        return $this->save($data);
    }
 
    /**
     * 编辑记录
     */
    public function edit($data)
    {
        return $this->save($data);
    }
 
    /**
     * 删除记录
     */
    public function remove()
    {
        return $this->delete();
    }
    /**
     * 获取广告总数量
     */
    public static function getAdTotal($where)
    {
        $model = new static;
        return $model->where($where)->count();
    }
}