Open
Description
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.forum.mapper.AdsMapper.getAdList
my xml :
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.forum.mapper.AdsMapper">
<select id="getAdList" parameterType="int" resultType="com.example.forum.dto.query.AdsQueryDTO">
SELECT * FROM forum_ads WHERE channel_id IN (#{channelId},0) AND status = 0 ORDER BY sort DESC
</select>
</mapper>
my dao:
package com.example.forum.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.forum.dto.query.AdsQueryDTO;
import com.example.forum.entity.Ads;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface AdsMapper extends BaseMapper<Ads> {
List<AdsQueryDTO> getAdList(int channelId);
}