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

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import io.renren.modules.sys.entity.algs.AlgorithmModel;
import io.renren.modules.sys.entity.algs.AlgorithmModel_Vo;
import io.renren.modules.sys.entity.algs.AlgorithmTemplate_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/8 11:14
 */
@Mapper
public interface AlgorithmModelVoMapper {
    @Select("SELECT a.*, b.username FROM algorithm_model a LEFT JOIN sys_user b ON a.uid = b.user_id ${ew.customSqlSegment}")
    List<AlgorithmModel_Vo> getModelInfo(@Param(Constants.WRAPPER) Wrapper wrapper);

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

