zhaojs
2023-06-10 2d91c100b7c1befbf542ff12c3c0a2f684f0eca6
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
<?php
namespace app\api\logic;
 
use app\common\logic\Basic as BasicLogic;
use app\api\model\Message as ModelMessage;
 
/**
 * 消息管理
 */
class Message extends BasicLogic
{
 
 
    protected $model = null;
 
    public function __construct()
    {
        parent::__construct();
 
        $this->model = new ModelMessage();
    }
 
    /**
     * 获取轮播图信息
     *
     * @return void
     */
    public function getList($offset,$limit)
    {
        $where['status'] = 1;
        $list = $this->model->where($where)->limit($offset,$limit)->order('id desc')->select();
        if(empty($list)) return [];
        return $list;
    }
 
    public static function getMessageTop()
    {
        return ModelMessage::where(['status'=>1])->limit(1)->order('id desc')->value('id');
    }
    
 
}