tap order 数据写入mysql

This commit is contained in:
pengtao 2019-10-16 17:45:58 +08:00
parent 1b6e80f289
commit 417a57843a

View File

@ -169,16 +169,19 @@ class TapTapReport:
def main():
if len(sys.argv) == 3:
day = sys.argv[1]
methods = sys.argv[2]
day = sys.argv[2]
methods = sys.argv[1]
else:
methods = sys.argv[1]
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)
if methods == 'data':
tap.get_order()
elif methods == "build":
elif methods == "report":
tap.build_report()
else:
print("PLS input methods in ('data','build')")
print("PLS input methods in ('data','report')")
if __name__ == "__main__":
main()