<!-- 无意之中,再一次打开我的配置文件出现了一个错误,标注在mapper标签开始的位置: 错误的内容为:The content of element type "mapper" must match "(cache-ref|cache|resultMap*|parameterMap*|sql*|insert*|update*|delete*| select*)+". 在线急等求解答! --> <?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="dao.JaigeDao"> <!-- 添加新数据 --> <insert id="SaveJiage" parameterType="Jiage"> insert into xcphonefix.jiage(jgnum,pjid,xhid) values (#{jgnum},#{pjid},#{xhid}) </insert> <!-- 分页查询 start --> <!-- 分页查询所有数据 --> <select id="indexSee" resultType="Jiage" parameterType="map"> select * from jiage where pjid = #{topPJid} and xhid #{topXHid} limit #{0},#{0} </select> <!-- 返回的价格数据集合 --> <resuleMap type="Jiage" id="JiageMapper"> <id column="jgid" property="jgid"/> <association property="xinghao" column="xhid" javaType="Xinghao"> <id column="xhid" property="xhid"/> <association property="pinpai" column="ppid" javaType="Pinpai"> <id column="ppid" property="ppid"/> </association> </association> <association property="peijian" column="pjid" javaType="Peijian"> <id column="pjid" property="pjid"/> </association> </resuleMap> <!-- 更新数据 start --> <!-- 拉取展示数据,用以编辑 --> <select id="SeeAllJiage" resultType="JiageMapper" parameterType="map" > select jgid,jgnum,pjname,xhname,ppname,jgShow from xcphonefix.jiage j left join xcphonefix.peijian pj on j.pjid=pj.pjid left join xcphonefix.xinghao xh on j.xhid=xh.xhid order by pubdate DESC limit #{pagebegin},#{pagesize} </select> <!-- 拉取要更新的数据 --> <select id="SeeOneJiage" resultType="Jiage" parameterType="int"> select jgid,jgnum,pjid,xhid,jgShow from xcphonefix.jiage where jgid=#{jgid} </select> <!-- 更新数据 --> <update id="updateJiage" parameterType="map"> update set jgnum=#{jgnum},pjid=#{pjid},xhid=#{xhid},jgShow=#{jgShow} where jgid=#{jgid} </update> <!-- 更新数据 end --> <!-- 删除数据 start --> <delete id="deleteJiage"> delete from xcphonefix.jiage where jgid=#{jgid} </delete> <!-- 删除数据 end --> </mapper>
HansonQ