package com.ruoyi.frequency.appeal.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.page.PageResult;
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.frequency.works.entity.Works;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.PageBasic;
import com.ruoyi.vo.UserVo;

import java.util.List;

/**
 * 申诉Service接口
 * 
 * @author zj
 * @date 2023-10-13
 */
public interface AppealService extends IService<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 ids 需要删除的申诉主键集合
     * @return 结果
     */
    public int deleteAppealByIds(Long[] ids);

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

    /**
     * 申诉处理
     * @param appeal
     * @return
     */
    AjaxResult handle(Appeal appeal);


    /**
     * 申诉列表
     * @param req
     * @param userVo
     * @return
     */
    ResponseData<PageResult<Page<AppealPageResp>>> appealPage(PageBasic req, UserVo userVo);


    /**
     * 申诉详情
     * @param appealId
     * @param userVo
     * @return
     */
    ResponseData<AppealDetailResp> appealDetail(Long appealId, UserVo userVo);

    AppealCount statistics(Appeal appeal);
}
