package com.community.huiju.dao;

import com.community.huiju.model.MqMessage;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface MqMessageMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(MqMessage record);

    int insertSelective(MqMessage record);

    MqMessage selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(MqMessage record);

    int updateByPrimaryKeyWithBLOBs(MqMessage record);

    int updateByPrimaryKey(MqMessage record);

    /**
     * 统计小区开门开启次数
     * @return
     */
    int selectCommunityOpenDoorCount();

    /**
     * 统计单元门开启次数
     * @return
     */
    int selectUnitsOpenDoorCount(Integer eventType);
    
    String getConnectionByName();
    
    int updateConnectionByName();
}