package com.mcwl.resource.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.response.ResponseWorkFlow;
import com.mcwl.resource.domain.vo.ModelLikeVo;
import com.mcwl.resource.domain.vo.PageVo;
import com.mcwl.resource.domain.vo.WorkFlowLikeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 工作流
 * @author DaiZibo
 * @date 2025/1/9
 * @apiNote
 */

@Mapper
public interface WorkFlowMapper extends BaseMapper<WorkFlow> {

    void updateWorkFlow(WorkFlow workFlow);

    List<WorkFlow> fetchWorkFlowSortedByTopStatus();

    void setworkFlowTop(@Param("id") Long id, @Param("i") int i);

    List<ResponseWorkFlow> workFlowList(PageVo pageVo);

    Long sumWorkFlowNumber(Long userId);

    List<WorkFlowLikeVo> selectLikedWorkFlowsByUser(@Param("page") Page<WorkFlowLikeVo> page,
                                                    @Param("userId") Long userId,
                                                    @Param("orderByColumn") String orderByColumn);
}
