Invalid bound statement (not found): com.aaa.mapper.PaisanMapper.findAllJiang

报错内容: Invalid bound statement (not found): com.aaa.mapper.PaisanMapper.findAllJiang
在这里插入图片描述
在这里插入图片描述
一直报这个错误,导致界面的数据无法加载出来,后来定位发现,原来是mapper.java与mapper.xml没有对应起来的原因。

修改内容:
PaisanMapper.java

package com.aaa.mapper;
import com.aaa.entity.Jiang;
import com.aaa.entity.Paisan;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface PaisanMapper {
    List<Paisan> findAllPaisan(Paisan paisan);
    int editPaisan(Paisan paisan);
    List<Jiang> findAllJiang();
    int insertPaisan(Paisan paisan);
    int count(Integer Id);
}

PaisanMapper.xml(原)

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.aaa.mapper.PaibanMapper">
     <select id="findAllPaiban" resultType="paiban">
     select d.doctorId doctorId,d.doctorName  doctorName, p.one one,p.two two,p.three three,p.four four,p.five five,p.six six,p.seven seven from doctor d LEFT JOIN paiban p on  p.doctorId=d.doctorId where d.dstate!=3
      <where>
       <if test="doctorName!=null and doctorName!=''">
        doctorName like concat('%' ,concat(#{doctorName},'%'))
       </if>
      </where> order by d.doctorId desc
     </select>

     <update id="editPaiban" parameterType="paiban">
      update paiban set one=#{one},two=#{two},three=#{three},four=#{four},five=#{five},six=#{six},seven=#{seven} where doctorId=#{doctorId}
     </update>

    <select id="findAllBan" resultType="ban">
        select*from ban
    </select>

    <insert id="insertPaiban" parameterType="paiban">
        insert into paiban (one,two,three,four,five,six,seven,doctorId)values (#{one},#{two},#{three},#{four},#{five},#{six},#{seven},#{doctorId})
    </insert>

    <select id="count" resultType="Integer">
        select count(doctorId) from paiban where doctorId=#{Id}
    </select>
</mapper>

PaisanMapper.xml(现)

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.aaa.mapper.PaisanMapper">
     <select id="findAllPaisan" resultType="paisan">
        select d.doctorId doctorId,d.doctorName  doctorName, p.one one,p.two two,p.three three,p.four four,p.five five,p.six six,p.seven seven from doctor d LEFT JOIN paisan p on  p.doctorId=d.doctorId where d.dstate!=3
          <where>
               <if test="doctorName!=null and doctorName!=''">
                doctorName like concat('%' ,concat(#{doctorName},'%'))
               </if>
          </where> order by d.doctorId desc
     </select>

     <update id="editPaisan" parameterType="paisan">
      update paisan set one=#{one},two=#{two},three=#{three},four=#{four},five=#{five},six=#{six},seven=#{seven} where doctorId=#{doctorId}
     </update>

    <select id="findAllJiang" resultType="jiang">
        select*from jiang
    </select>

    <insert id="insertPaisan" parameterType="paisan">
        insert into paisan (one,two,three,four,five,six,seven,doctorId)values (#{one},#{two},#{three},#{four},#{five},#{six},#{seven},#{doctorId})
    </insert>

    <select id="count" resultType="Integer">
        select count(doctorId) from paisan where doctorId=#{Id}
    </select>
</mapper>

数据展示出现:
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

郁慕斯-ing

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值