package com.railway.business.push.mapper;

import com.github.pagehelper.Page;
import com.railway.business.push.domain.BusPushMsg;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* 个推消息表
* @author author
* @date 2021/11/16
*/
@Mapper
@Repository
public interface BusPushMsgMapper {

    /**
    * 新增
    */
    int insert(BusPushMsg busPushMsg);

    /**
    * 删除
    */
    int delete(@Param("id") String id);

    /**
    * 更新
    */
    int update(BusPushMsg busPushMsg);

    /**
    * 获取单个
    */
    BusPushMsg getInfo(@Param("id") String id);

    /**
    * 查询列表
    */
    Page<BusPushMsg> getList(BusPushMsg busPushMsg);

    List<BusPushMsg> selectAppMsg();

    /**
     * 查询最近5条
     * @param busPushMsg
     * @return
     */
    Page<BusPushMsg> getListTop5(BusPushMsg busPushMsg);
}
