@Insert : 插入sql , 和xml insert sql语法完全一样
@Select : 查询sql, 和xmlselect sql语法完全一样
@Update : 更新sql, 和xmlupdatesql语法完全一样
@Delete : 删除sql, 和xmldelete sql语法完全一样
@Param : 入参
@Results : 设置结果集合
@Result : 结果
使用案例 查询所有信息 @Select("select * from t_emp") @Results(id = "empMap",value = { @Result(column = "emp_id",property = "empId",id = true), @Result(column = "emp_name",property = "empName"), @Result(column = "emp_tel",property = "empTel"), @Result(column = "emp_education",property = "empEducation"), @Result(column = "emp_birthday",property = "empBirthday") }) List getAll(); 查询单个信息 @Select("select * from t_emp where emp_id=#{empId}") @ResultMap(value="empMap") Employee getById(@Param("empId") Integer empId); 插入信息 @Insert("insert into t_emp (emp_id, emp_name, emp_tel, " + " emp_education, emp_birthday, fk_dept_id" + " )" values (#{empId}, #{empName}, #{empTel}, " + " #{empEducation}, #{empBirthday}, #{fkDeptId}" + " )") int insert(Employee record); 删除信息 @Delete("delete from t_emp where emp_id=#{empId}") int deleteByPrimaryKey(@Param("empId") Integer empId);