错误:Parameter ‘0‘ not found.Available parameters are [arg1, arg0, param1, param2]的解决方法
mapper接口方法:List<Card> temp = cardService.queryRepeat(String type,String shop);mybatis xml中方法的实现方式:< select id="queryRepeat" parameterType="String" resultType="Card">select * from card wher
·
mapper接口方法:
List<Card> temp = cardService.queryRepeat(String type,String shop);
mybatis xml中方法的实现方式:
< select id="queryRepeat" parameterType="String" resultType="Card">
select * from card where card_type=#{type} and shop=#{shop}
< /select >
此时调用报错:Parameter ‘0’ not found.Available parameters are [arg1, arg0, param1, param2]
解决方法1:
List<Card> temp = cardService.queryRepeat(@param(“type”) String type,@param(“shop”) String shop);
解决方法2:
< select id="queryRepeat" parameterType="String" resultType="Card">
select * from card where card_type=#{arg0} and shop=#{arg1}
< /select >
更多推荐
已为社区贡献2条内容
所有评论(0)