tap order 数据写入mysql
This commit is contained in:
parent
1b6e80f289
commit
417a57843a
@ -169,16 +169,19 @@ class TapTapReport:
|
|||||||
|
|
||||||
def main():
|
def main():
|
||||||
if len(sys.argv) == 3:
|
if len(sys.argv) == 3:
|
||||||
day = sys.argv[1]
|
day = sys.argv[2]
|
||||||
methods = sys.argv[2]
|
methods = sys.argv[1]
|
||||||
else:
|
else:
|
||||||
|
methods = sys.argv[1]
|
||||||
day = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
|
day = (datetime.date.today() - datetime.timedelta(days=1)).strftime('%Y-%m-%d')
|
||||||
|
if not (day and methods):
|
||||||
|
raise Exception(f"PLs input day={day} methods={methods}")
|
||||||
tap = TapTapReport(day)
|
tap = TapTapReport(day)
|
||||||
if methods == 'data':
|
if methods == 'data':
|
||||||
tap.get_order()
|
tap.get_order()
|
||||||
elif methods == "build":
|
elif methods == "report":
|
||||||
tap.build_report()
|
tap.build_report()
|
||||||
else:
|
else:
|
||||||
print("PLS input methods in ('data','build')")
|
print("PLS input methods in ('data','report')")
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user