package com.community.huiju.dao;

import com.community.huiju.model.TpEquipmentTree;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;

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

    int insert(TpEquipmentTree record);

    int insertSelective(TpEquipmentTree record);

    TpEquipmentTree selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpEquipmentTree record);

    int updateByPrimaryKey(TpEquipmentTree record);

    /**
     * 根据小区查询
     * @param communityId
     * @return
     */
    @ResultMap("BaseResultMap")
    @Select("select * from tp_equipment_tree where community_id = #{communityId}")
    TpEquipmentTree selectByCommunityId(Integer communityId);
}