package com.community.huiju.dao;


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

import java.util.List;

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

    int insert(TpAnnouncement record);

    int insertSelective(TpAnnouncement record);

    TpAnnouncement selectByPrimaryKey(@Param("id") Integer id, @Param("communityId") Integer communityId);

    int updateByPrimaryKeySelective(@Param("id")Integer id, @Param("viewCount")Integer viewCount);

    int updateByPrimaryKey(TpAnnouncement record);
	
	List<TpAnnouncement> getAnnouncements(@Param("communityId") Integer communityId,@Param("title") String title);

    /**
     * 公告轮播图
     * @param communityId
     * @param sum
     * @return
     */
    List<TpAnnouncement> getAnnouncement(@Param("communityId")Integer communityId, @Param("sum")Integer sum);
}