package com.railway.business.safetool.mapper;

import com.github.pagehelper.Page;
import com.railway.business.safetool.domain.SecScheduled;
import com.railway.business.safetool.domain.vo.SecScheduledCountVo;
import com.railway.business.safetool.domain.vo.SecScheduledListParmVo;
import com.railway.business.safetool.domain.vo.SecScheduledToolListVo;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
* 安全工具计划表
* @author lijie
* @date 2021/12/04
*/
@Mapper
@Repository
public interface SecScheduledMapper {

    /**
    * 新增
    */
    int insert(SecScheduled secScheduled);

    /**
    * 删除
    */
    int delete(@Param("id") String id);

    /**
    * 更新
    */
    int update(SecScheduled secScheduled);

    int updateScheduled(@Param("secid") String secid, @Param("state") String state);

    /**
     * 获取单个
     */
    SecScheduled getInfo(@Param("id") Long id);

    /**
     * 获取单个
     */
    SecScheduledToolListVo getDetail(@Param("id") Long id);

    /**
    * 查询列表
    */
    Page<SecScheduledCountVo> getList(SecScheduledListParmVo secScheduled);

    /**
     * 根据工具ID列出相关的计划
     * @param toolId 工具ID
     * @return 计划列表
     */
    List<SecScheduled> listScheduled(@Param("toolId") Long toolId);

}
