This commit is contained in:
2025-08-23 22:38:20 +08:00
parent 8041fa1438
commit 12de39c6fb
4 changed files with 64 additions and 0 deletions

16
day8/订单号.py Normal file
View File

@ -0,0 +1,16 @@
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())