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.EstateRepair;
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 EstateRepairMapper extends BaseMapper<EstateRepair> {
    /**
     * 功能描述:分页查询物业报修
     * @param page 分页条件
     * @param wrapper 查询条件
     * @return com.baomidou.mybatisplus.plugins.Page<com.sptg.estate.api.entity.EstateRepair>
     *                
     *                      
     */
    public List<EstateRepair> showEstateRepairList(@Param(value = "page") Pagination page, @Param(value = "ew") Wrapper<EstateRepair> wrapper);
    /**
     * 功能描述:批量删除物业报修(更新删除状态)撤销
     * @param ids
     * @return java.lang.Integer
     *                
     *                      
     */
    @Update("<script>update  estate_estateRepair set   i_status=-1 " +
            "where  " +
            "l_id in " +
            "<foreach collection='ids' index='index' item='item' " +
            "        separator=',' open='(' close=')'> " +
            "        #{item} " +
            "    </foreach>" +
            "</script>")
    public Integer deleteEstateRepairListByIds(@Param(value = "ids") List<Long> ids);
}
