mybatis 一个小问题!
异常:Parameter'hcoce'notfound.Availableparametersare[param1,hcode]xml配置:<mappernamespac...
异常:Parameter 'hcoce' not found. Available parameters are [param1, hcode]
xml配置:
<mapper namespace="out.put.dao.SearchDao">
<resultMap type="users" id="usersMap">
<result property="hcode" column="hcode"/>
<result property="ccode" column="ccode"/>
<result property="servicecode" column="servicecode"/>
<result property="localvdn" column="localvdn"/>
<result property="repairvdn" column="repairvdn"/>
</resultMap>
<select id="getSearch" parameterType="String" resultMap="usersMap">
select h.hcode,h.ccode,h.servicecode,l.localvdn,l.repairvdn from Hcode1 h,LocalVDN l
where h.servicecode=l.servicecode
<if test="hcoce!= null and hcode!= '' ">
h.hcode = #{hcode}
</if>
</select>
实体类:
package out.put.impl;
public class SearchNews {
private String hcode;
private String ccode;
private String servicecode;
private String localvdn;
private String repairvdn;
已经getter和setter 展开
xml配置:
<mapper namespace="out.put.dao.SearchDao">
<resultMap type="users" id="usersMap">
<result property="hcode" column="hcode"/>
<result property="ccode" column="ccode"/>
<result property="servicecode" column="servicecode"/>
<result property="localvdn" column="localvdn"/>
<result property="repairvdn" column="repairvdn"/>
</resultMap>
<select id="getSearch" parameterType="String" resultMap="usersMap">
select h.hcode,h.ccode,h.servicecode,l.localvdn,l.repairvdn from Hcode1 h,LocalVDN l
where h.servicecode=l.servicecode
<if test="hcoce!= null and hcode!= '' ">
h.hcode = #{hcode}
</if>
</select>
实体类:
package out.put.impl;
public class SearchNews {
private String hcode;
private String ccode;
private String servicecode;
private String localvdn;
private String repairvdn;
已经getter和setter 展开
1个回答
2013-05-31
展开全部
<if test="hcoce!= null and hcode!= '' ">
h.hcode = #{hcode}
把hcode打成hcoce???
h.hcode = #{hcode}
把hcode打成hcoce???
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询