package com.community.huiju.dao;


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

import java.util.List;

@Mapper
public interface TpActivityMapper {

    int deleteByPrimaryKey(Integer id);

    int insert(TpActivity record);

    int insertSelective(TpActivity record);

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

    int updateByPrimaryKeySelective(TpActivity record);

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

    /**
     * 获取活动轮播图
     * @param communityId
     * @param num
     * @return
     */
    List<TpActivity> getActivity(@Param("communityId")Integer communityId, @Param("num")Integer num);

    /**
     * 根据活动ID查询我参与过的活动
     * @param communityId
     * @return
     */
    List<TpActivity> selecttpActivity(@Param("id") Integer id, @Param("communityId") Integer communityId);
}