3.实体类;
@Data
public class Student {
private int id;
private String name;
private BigDecimal money;
}
4.mapper 中设置:
public interface StudentMapper {
@Insert("insert into student values(stuid.nextval,#{name},#{money})")
public int add(@Param("name") String name, @Param("money")BigDecimal money);
public Student queryById(int id);
@Select("select * from student")
public List query();
@Select("select * from student")
public List page(RowBounds r);
public List pages(@Param("start") int start,@Param("end") int end);
}
XX.xml设置:
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@Test
public void query() {
StudentMapper sdao = this.session.getMapper(StudentMapper.class);
//Student st = sdao.queryById(12);
//System.out.println(st);
System.out.println(sdao.query());
//RowBounds r = new RowBounds(2,2);
//RowBounds r = new RowBounds(0,3);
//System.out.println(sdao.page(r));
int currpage = 1;
int pagesize = 3;
//System.out.println(sdao.pages(currpage*pagesize,currpage*pagesize-pagesize));
System.out.println(sdao.pages(currpage,pagesize));
/*
*开发触发器
*/
--得到日期是周几
select to_char(sysdate+4,'DY','nls_date_language=AMERICAN') from dual;
select to_char(sysdate,'DY','nls_date_language=AMERICAN') from dual;
--建立BEFORE语句触发器
CREATE O
下面给大家整理了一些vim NERDTree的常用快捷键了,这里几乎包括了所有的快捷键了,希望文章对各位会带来帮助。
切换工作台和目录
ctrl + w + h 光标 focus 左侧树形目录ctrl + w + l 光标 focus 右侧文件显示窗口ctrl + w + w 光标自动在左右侧窗口切换ctrl + w + r 移动当前窗口的布局位置
o 在已有窗口中打开文件、目录或书签,并跳