package com.zzsn.knowbase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zzsn.knowbase.entity.KbKnowledgeProject;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author obcy
 * @since 2024-01-04
 */
@Mapper
public interface KbKnowledgeProjectMapper extends BaseMapper<KbKnowledgeProject> {

    @Select("<script>select id,CONCAT(realname,'（',username,'）') as typeName, '1826201944893501441' as pid from nt_system.sys_user where id in <foreach collection='userIds' open='(' separator=',' close=')' item='id'>#{id}</foreach></script>")
    List<KbKnowledgeProject> getListByUser(@Param("userIds") List<String> userIds);
}
