随笔分类 -  mybatis

mybatis相关
摘要:这里有一个删除方法: int deleteByPrimaryKey(Integer id); 然后对应的sql的xml如下: <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > delete from tablena 阅读全文
posted @ 2016-11-14 14:54 Enast 阅读(4423) 评论(0) 推荐(0)
摘要:mybatis 的if 比较标签在比较数值时可以这样写: <if test="value=0"> </if> 在比较字符串时可以这么写: <if test='str!=null and str!="" '> </if> 记得是外面是单引号,里面是双引号。 同时,字符串参数要设置getter 方法(我 阅读全文
posted @ 2016-11-08 09:32 Enast 阅读(76156) 评论(0) 推荐(1)