mybaits使用了@Param注解为什么仍然拿不到参数?

我确定到java层参数已经给到了,但是xml中的sql语句就是拿不到我的传参,永远返回null,而我把#{divisionCode,jdbcType=VARCHAR}写死成一个值又可以返回,求教

应该这么用
当你使用了使用@Param注解来声明参数时,如果使用 #{} 或 ${} 的方式都可以。
    @Select("select column from table where userid = ${userid} ")    public int selectColumn(@Param("userid") int userid);
 
温馨提示:答案为网友推荐,仅供参考