时间戳转date
Date date = new Date(((java.sql.Timestamp) message.getSendTime()).getTime()); DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); format.format(date); message.setSendTime(format.format(date));