package cn.wisenergy.mapper;

import cn.wisenergy.model.app.WorkProject;
import cn.wisenergy.model.dto.ManagerProjectsDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author chenqi
 * @since 2021-01-19
 */
public interface WorkProjectMapper extends BaseMapper<WorkProject> {

    /**
     * 条件查询项目集合
     * @param map
     * @return
     */
    List<WorkProject> getProjectsByCriteria(Map<String, Object> map);


    List<WorkProject> getProjectsByIds(@Param("ids") List<Integer> ids, @Param("isConclusion") Integer isConclusion);

    List<ManagerProjectsDto> getManagerProjectsDto(@Param("userId") Integer userId, @Param("type") Integer type, @Param("isConclusion") Integer isConclusion,@Param("deptIds") List<Integer> deptIds);
}
