package io.renren.modules.sys.dao.dataset;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import io.renren.modules.sys.entity.algs.AlgorithmModel_Vo;
import io.renren.modules.sys.entity.dataset.DataSet_Vo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: Ivan Q
 * @Date: 2021/6/9 13:53
 */

@Mapper
public interface DataSetVoMapper extends BaseMapper<DataSet_Vo> {
    @Select("SELECT a.*, b.username FROM data_set a LEFT JOIN sys_user b ON a.uid = b.user_id ${ew.customSqlSegment}")
    List<DataSet_Vo> getModelInfo(@Param(Constants.WRAPPER) Wrapper wrapper);

    @Select("SELECT a.*, b.username FROM data_set a sys_user b WHERE a.uid = b.user_id and a.uid = #{id,jdbcType=BIGINT}")
    List<DataSet_Vo> getModelInfoById(@Param("id") Long id);
}
