随笔分类 - Mybatis
摘要:方法一: <if test="projectName != null "> and project_name like concat('%',#{projectName},'%') </if> 方法二: <if test="projectName != null "> <bind name="bin
阅读全文
摘要:这里有一个删除方法: int deleteByPrimaryKey(Integer id); 然后对应的sql的xml如下: <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" > delete from tablena
阅读全文
摘要:原博文链接 1. 匿名参数,顺序传递参数 mapper: List<Employee> selectByGenderAndAge(Short gender,String age ); xml: <select id="selectByGenderAndAge" resultMap="BaseResu
阅读全文
摘要:1. 第一个Mybatis程序 Mybatis-01 1.1 mybatis-config编写 <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0
阅读全文