Files
Learn/day8/订单号.py
2025-08-23 22:38:20 +08:00

17 lines
319 B
Python

import datetime
class Random:
def __init__(self):
self.cpu_id = 123
self.os_id = 890
def get(self):
timestamp = int(datetime.datetime.now().timestamp() * 1000000)
final = timestamp * 1000000 + self.cpu_id * 1000 + self.os_id
return final
r = Random()
print(r.get())