package com.ruoyi.frequency.appeal.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.controller.resp.AppealDetailResp;
import com.ruoyi.controller.resp.AppealPageResp;
import com.ruoyi.frequency.appeal.entity.Appeal;
import com.ruoyi.frequency.appeal.model.result.AppealCount;
import com.ruoyi.vo.UserVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 申诉Mapper接口
 * 
 * @author zj
 * @date 2023-10-13
 */
public interface AppealMapper  extends BaseMapper<Appeal>
{
    /**
     * 查询申诉
     * 
     * @param id 申诉主键
     * @return 申诉
     */
    public Appeal selectAppealById(Long id);

    /**
     * 查询申诉列表
     * 
     * @param appeal 申诉
     * @return 申诉集合
     */
    public List<Appeal> selectAppealList(Appeal appeal);

    /**
     * 新增申诉
     * 
     * @param appeal 申诉
     * @return 结果
     */
    public int insertAppeal(Appeal appeal);

    /**
     * 修改申诉
     * 
     * @param appeal 申诉
     * @return 结果
     */
    public int updateAppeal(Appeal appeal);

    /**
     * 删除申诉
     * 
     * @param id 申诉主键
     * @return 结果
     */
    public int deleteAppealById(Long id);

    /**
     * 批量删除申诉
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAppealByIds(Long[] ids);

    Page<AppealPageResp> appealPage(@Param("page") Page<Object> objectPage,@Param("userVo")  UserVo userVo);

    AppealDetailResp appealDetail(@Param("id") Long appealId, @Param("userVo") UserVo userVo);

    AppealCount statistics(@Param("list")List<Long> appealIdList);
}
