Mybatis模糊查询

VideoMapper.java

/**
     * 根据评分和标题模糊查询
     * @param point
     * @param title
     * @return
     */
    List<Video> selectByPointAndTitleLike(@Param("point") double point,@Param("title") String title);

VideoMapper.xml

<select id="selectByPointAndTitleLike" resultType="net.cybclass.online.domain.Video">
select * from video where point=#{point} and title like concat(‘%‘,#{title},‘%‘)
    </select>

相关推荐