共 3 篇文章 |
|
@Select("select t.id,t.code,t.language_type as languageType," + "t.content,t.remark from language t where t.code = #{code}") List<TLanguageIta> getLanguageListByCode(@Param("code")String code);@Select("select t.content from language t where t.code = #{code} and t.langu... 阅1364 转1 评0 公众公开 21-01-14 11:51 |
<resultMap id="roleWithStudent" type="Role"> <id property="roleid" column="roleid"></id> <result property="rolename" column="rolename"></result><! 阅1886 转1 评0 公众公开 21-01-14 10:46 |
Mybatis中的 ${} 和 #{}区别与用法。Mybatis 的Mapper.xml语句中parameterType向SQL语句传参有两种方式:#{}和${}我们经常使用的是#{},一般解说是因为这种方式可以防止SQL注入,简单的说#{}这种方式SQL语句是经过预编译的,它是把#{}中间的参数转义成字符串,举个例子:#{} 这种取值是编译好SQL语句再取值${} 这种是取值以后再去编译SQL语句。 阅84 转0 评0 公众公开 18-07-26 18:38 |