项目中,用到一个序列作单号,框架用的是ssh,在dao层去拿的时候,运行时报错为dual is not mapped,[select *.nextval nextvalue from dual] 后来检查发现,获取方式不对,于是改成下面这样,就可以正常获取了 //获取seq的最后一个值 public String findSeq(){ try { String sql = "select PATIENT_SEQ.nextval nextvalue from dual"; Integer
java 获取日期的几天前,几个月前和几年前. package bys.utils; import java.util.Date; /** * Created by toutou on 2015/3/23. */ public class DateHelper { public static final long ONE_MINUTE = 60000L; public static final long ONE_HOUR = 3600000L; public static final long
java获取取得Timestamp类型的当前系统时间java获取取得Timestamp类型的当前系统时间 格式:2010-11-04 16:19:42 方法1: Timestamp d = new Timestamp(System.currentTimeMillis()); 方法2: Date date = new Date(); Timestamp nousedate = new Timestamp(date.getTime()); ------------------------