1. 程式人生 > >mybatis查詢引數找不到

mybatis查詢引數找不到

1.異常資訊 

com.ly.cloud.exception.CloudException: Parameter 'ew' not found. Available parameters are [pkid, param1]

2.並沒有出現有的引數

@Select("select s.pkid,s.rwbt ,s.rwsm,s.edgzl,cl2.mc as"
			+ " rwndjb,s.yjwcsj,s.wcsj,s.pgsm,c.jcrzw,cl1.mc as pddj,c.pdyj ,z.zrwbt"
			+ " ,x.xm from RWSB_GZRW_RW s left join RWSB_GZRW_ZRW  z on s.zrwid=z.pkid"
			+ " left join RWSB_GZRW_RWJC c on s.pkid=c.zrwid "
			+ "left join RWSB_JCSJ_RYXX x on x.pkid=s.djrid "
			+ "left join RWSB_DMK_CL cl1 on cl1.dm=c.pddj and cl1.dmbz='pddj'"
			+ "left join RWSB_DMK_CL cl2 on cl2.dm=s.rwndjb and cl2.dmbz='rwndjb' "
			+ "left join RWSB_DMK_CL cl3 on cl3.dm=s.rwzt   and cl3.dmbz='srwzt' "
			+ "where (z.rwzt='1' or z.rwzt='2') and s.pkid=#{pkid}")
	public GzrwRwPO selectOne(@Param("pkid")String pkid);

3 這個繼承了BaseMapper

@Mapper
public interface GzrwRwPOMapper extends BaseMapper<GzrwRwPO>

4. 在BaseMapper裡也有一個selectOne ,所以在命名的時候注意,不要同名了。

  T selectOne(@Param("ew") T entity);