package com.cab.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cab.model.CabMymessage;

public interface CabMymessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CabMymessage record);

    int insertSelective(CabMymessage record);

    CabMymessage selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CabMymessage record);

    int updateByPrimaryKey(CabMymessage record);
    
    List<CabMymessage> getMymessageCount(@Param("cabUserId")Long cabUserId,@Param("isRead")String isRead);
    
    List<CabMymessage> getMymessageByType(@Param("cabUserId")Long cabUserId,@Param("type")Integer type,@Param("isRead")String isRead);
    
    long getMymessageCountByRead(@Param("cabUserId")Long cabUserId);

    //admin
    List<CabMymessage> getList(@Param("type")Integer type,@Param("title") String title,@Param("start") Long start,@Param("limit") Long limit);

    Long getCount(@Param("type")Integer type,@Param("title") String title);

    void insertUserMessage(List<CabMymessage> list);
}