quanwei
18 hours ago c441dea81bd86bdfb12dff35821fed51f4cc91c2
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
<?php
 
namespace app\operations\model\plus\collection;
 
use app\common\model\plus\collection\Collection as CollectionModel;
 
/**
 * 引导收藏 模型
 */
class Collection extends CollectionModel
{
    /**
     *获取appid的收藏状态
     */
    public function getAppData()
    {
        $app_id = self::$app_id;
        return $this->where('app_id', '=', $app_id)->find();
    }
 
    /**
     * 保存数据
     * @param $data
     * @return bool
     */
    public function saveData($data)
    {
        if (isset($data['app_id'])) {
            $this->where('app_id', '=', $data['app_id'])->update($data);
            return true;
        }
        $data['app_id'] = self::$app_id;
        return $this->save($data);
    }
}