package com.sptg.estate.biz.mapper;

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

import java.util.List;

/**
 * title: ServerUserFaceImageMapper
 * package: com.sptg.estate.biz.mapper
 * description: 公告
 *
 *                
 *                
 */
public interface NoticeMapper extends BaseMapper<Notice> {
    /**
     * 功能描述:分页查询公告
     * @param page 分页条件
     * @param wrapper 查询条件
     * @return com.baomidou.mybatisplus.plugins.Page<com.sptg.estate.api.entity.Notice>
     *                
     *                      
     */
    public List<Notice> showNoticeList(@Param(value = "page") Pagination page, @Param(value = "ew") Wrapper<Notice> wrapper);
    /**
     * 功能描述:批量删除公告(更新删除状态)
     * @param ids
     * @return java.lang.Integer
     *                
     *                      
     */
    @Update("<script>update  estate_notice set   i_status=-1 " +
            "where  " +
            "l_id in " +
            "<foreach collection='ids' index='index' item='item' " +
            "        separator=',' open='(' close=')'> " +
            "        #{item} " +
            "    </foreach>" +
            "</script>")
    public Integer deleteNoticeListByIds(@Param(value ="ids") List<Long> ids);
}
