//取当前时间 Date nowdate=new Date(); //转换时间格式 SimpleDateFormat simpleDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); order.setCreateTime(Timestamp.valueOf(simpleDate.format(nowdate)));