package com.sptg.estate.biz.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.sptg.estate.api.entity.NoticePush;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

/**
 * title: NoticePushMapper
 * package: com.sptg.estate.biz.mapper
 * description: 公告发布详细-DAO接口
 *
 *                
 *                
 */
public interface NoticePushMapper extends BaseMapper<NoticePush> {
    /**
     * 功能描述:分页查询公告发布详细
     * @param page 分页条件
     * @param wrapper 查询条件
     * @return com.baomidou.mybatisplus.plugins.Page<com.sptg.estate.api.entity.NoticePush>
     *                
     *                      
     */
    public List<NoticePush> showNoticePushList(@Param(value = "page") Pagination page, @Param(value = "ew") Wrapper<NoticePush> wrapper);
    /**
     * 功能描述:根据id查询公告发布信息
     * @param id
     * @return com.sptg.estate.api.entity.NoticePush
     *                
     *                       
     */
    public NoticePush findNoticePushById(@Param(value = "id") long id);
    /**
     * 功能描述:更新公告发布状态
     * @param id
     * @param pushStatus
     * @return int
     *                
     *                       
     */
    @Update("update estate_notice_push  set i_push_status=#{pushStatus} where l_id=#{id}")
    public int updatePushStatus(@Param(value = "id") long id,@Param(value = "pushStatus") int pushStatus);

    /**
     * 功能描述:查询住户的公告列表
     * @param wrapper
     * @param ids
     * @param regionIds
     * @return List<NoticePush>
     *               
     *                     
     */
    List<NoticePush> getListByUser(@Param(value = "ew")EntityWrapper<NoticePush> wrapper, @Param(value = "ids")List<Long> ids,
                                   @Param(value = "regionIds")List<Long> regionIds,@Param(value = "pageSize")int pageSize,
                                   @Param(value = "pageNum")int pageNum);
}
