package com.lz.modules.performance.dao;
/**
* <p>
* 任务进度更新表 服务类
* </p>
*
* @author quyixiao
* @since 2020-12-08
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lz.modules.app.model.TaskModel;
import com.lz.modules.performance.dto.TaskProcessRecordDto;
import com.lz.modules.performance.entity.TaskProcessRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TaskProcessRecordMapper extends BaseMapper<TaskProcessRecord> {


	TaskProcessRecord selectTaskProcessRecordById(@Param("id") Long id);

	Long insertTaskProcessRecord(TaskProcessRecord taskProcessRecord);

	int updateTaskProcessRecordById(TaskProcessRecord taskProcessRecord);

	int updateCoverTaskProcessRecordById(TaskProcessRecord taskProcessRecord);

	int deleteTaskProcessRecordById(@Param("id") Long id);

	List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskId(@Param("page") IPage page, @Param("taskId") Long taskId,@Param("useType") Integer useType);

    int deleteTaskProcessRecordsByTaskId(@Param("taskId") Long taskId);

	TaskProcessRecordDto selectTaskProcessRecordLastByTaskId(@Param("taskId") Long taskId);

	List<TaskProcessRecordDto> selectTaskProcessRecordsByTaskIdsAndType(@Param("page") IPage page, @Param("taskIds") List<Long> taskIds,@Param("useType") Integer useType);

	List<TaskProcessRecord> selectByCondition(@Param("page") IPage page, @Param("taskModel") TaskModel taskModel);

    TaskProcessRecord selectCommentTaskProcessRecordByDetailId(@Param("detailId") Long detailId);

	TaskProcessRecord selectCommentTaskProcessRecordByTaskId(@Param("taskId") Long taskId);
}