IdWorker is a tool class provided by mybatisPlus for generating IDs. The format is time, year, month, day, hour, minute and second + machine ID + serial number, thereby obtaining a globally unique ID under a distributed architecture.
public static void main(String[] args) {
String orderSn = IdWorker.getTimeId();
System.out.println(orderSn);
//202309111609454421701145994228621313
}