用Timestamp就行了
recordOuttime是Date类型
import java.sql.Timestamp;
Record record = recordMapper.selectByPrimaryKey(recordId);
Date recordIntime = record.getRecordIntime();
Date dNow = new Date();
Timestamp recordOuttime = new Timestamp(dNow.getTime());
record.setRecordOuttime(recordOuttime);