package com.community.huiju.dao;

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

import java.util.List;

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

    int insert(TpPhase record);

    int insertSelective(TpPhase record);

    TpPhase selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(TpPhase record);

    int updateByPrimaryKey(TpPhase record);

    /**
     * 根据小区查询 期
     * @param communityId
     * @return
     */
    @ResultMap("BaseResultMap")
    @Select("select * from tp_phase where community_id = #{communityId}")
    List<TpPhase> selectByAddress(@Param("communityId") Integer communityId);
}