package com.fs.survey.mapper;

import java.util.List;
import com.fs.survey.domain.SurveyTaskPeriod;
import com.fs.survey.dto.PeriodDataDto;
import org.apache.ibatis.annotations.Param;

/**
 * 问卷任务期次Mapper接口
 * 
 * @author fs
 * @date 2026-02-06
 */
public interface SurveyTaskPeriodMapper 
{
    /**
     * 查询问卷任务期次
     * 
     * @param id 问卷任务期次主键
     * @return 问卷任务期次
     */
    public SurveyTaskPeriod selectSurveyTaskPeriodById(Long id);

    /**
     * 查询问卷任务期次列表
     * 
     * @param surveyTaskPeriod 问卷任务期次
     * @return 问卷任务期次集合
     */
    public List<SurveyTaskPeriod> selectSurveyTaskPeriodList(SurveyTaskPeriod surveyTaskPeriod);

    /**
     * 新增问卷任务期次
     * 
     * @param surveyTaskPeriod 问卷任务期次
     * @return 结果
     */
    public int insertSurveyTaskPeriod(SurveyTaskPeriod surveyTaskPeriod);

    /**
     * 修改问卷任务期次
     * 
     * @param surveyTaskPeriod 问卷任务期次
     * @return 结果
     */
    public int updateSurveyTaskPeriod(SurveyTaskPeriod surveyTaskPeriod);

    /**
     * 删除问卷任务期次
     * 
     * @param id 问卷任务期次主键
     * @return 结果
     */
    public int deleteSurveyTaskPeriodById(Long id);

    /**
     * 批量删除问卷任务期次
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSurveyTaskPeriodByIds(Long[] ids);

    List<SurveyTaskPeriod> selectSurveyTaskPeriodListByTaskId(@Param("taskId") Long taskId);

    void deleteSurveyTaskPeriodByTaskId(@Param("taskId")Long taskId);

    PeriodDataDto getPeriodData(Long taskId);

    Long getPeriodNum(@Param("taskId") Long taskId);
}
