|
@@ -55,7 +55,7 @@ def cstCallBack(quantdata):
|
|
|
if "None" == str(result[2][j]):
|
|
|
continue
|
|
|
stockRestPojo = StockRestPojo()
|
|
|
- stockRestPojo.date = "20201123"
|
|
|
+ stockRestPojo.date = "20201221"
|
|
|
stockRestPojo.time = str(result[0][j])
|
|
|
stockRestPojo.now = str(result[1][j])
|
|
|
stockRestPojo.high = str(result[2][j])
|
|
@@ -103,10 +103,10 @@ def cstCallBack(quantdata):
|
|
|
|
|
|
datTime = ""
|
|
|
if len(str(result[0][j])) != 6:
|
|
|
- datTime = time.mktime(time.strptime("202011230" + str(result[0][j]), "%Y%m%d%H%M%S"))
|
|
|
+ datTime = time.mktime(time.strptime("202012210" + str(result[0][j]), "%Y%m%d%H%M%S"))
|
|
|
stockRestPojo.realTime = str(int(datTime))
|
|
|
else:
|
|
|
- datTime = time.mktime(time.strptime("20201123" + str(result[0][j]), "%Y%m%d%H%M%S"))
|
|
|
+ datTime = time.mktime(time.strptime("20201221" + str(result[0][j]), "%Y%m%d%H%M%S"))
|
|
|
stockRestPojo.realTime = str(int(datTime))
|
|
|
|
|
|
min_ = time.localtime(datTime).tm_min # 获取分钟
|
|
@@ -180,7 +180,7 @@ try:
|
|
|
print("login in fail")
|
|
|
exit()
|
|
|
db = dbOperation(db_config.db_gupiao)
|
|
|
- stockPojoList = db.query_list("select id, code, name, list_date listDate, seralid from t_stock_base_info where 1 = 1 and id > 216 order by id asc")
|
|
|
+ stockPojoList = db.query_list("select id, code, name, list_date listDate, seralid from t_stock_base_info where 1=1 order by id asc")
|
|
|
# cst使用范例
|
|
|
for stockPojo in stockPojoList:
|
|
|
# sql = "SELECT count(1) count FROM data_rt_" + stockPojo['code'].replace(".", "_").lower() + " WHERE `date` = '20201123'"
|
|
@@ -188,7 +188,7 @@ try:
|
|
|
# if int(count['count']) <= 4000:
|
|
|
# sql1 = "delete from data_rt_" + stockPojo['code'].replace(".", "_").lower() + " where date = '20201123'"
|
|
|
# db.dele(sql1)
|
|
|
- data = c.cst(stockPojo['code'], 'Time,Now,High,Low,Open,PreClose,Volume,Amount,HighLimit,LowLimit,BuyPrice1,BuyPrice2,BuyPrice3,BuyPrice4,BuyPrice5,BuyVolume1,BuyVolume2,BuyVolume3,BuyVolume4,BuyVolume5,SellPrice1,SellPrice2,SellPrice3,SellPrice4,SellPrice5,SellVolume1,SellVolume2,SellVolume3,SellVolume4,SellVolume5,ClosedTime,ClosedVolume,ClosedAmount', '093001', '150000','',cstCallBack)
|
|
|
+ data = c.cst(stockPojo['code'], 'Time,Now,High,Low,Open,PreClose,Volume,Amount,HighLimit,LowLimit,BuyPrice1,BuyPrice2,BuyPrice3,BuyPrice4,BuyPrice5,BuyVolume1,BuyVolume2,BuyVolume3,BuyVolume4,BuyVolume5,SellPrice1,SellPrice2,SellPrice3,SellPrice4,SellPrice5,SellVolume1,SellVolume2,SellVolume3,SellVolume4,SellVolume5,ClosedTime,ClosedVolume,ClosedAmount', '144300', '150000','',cstCallBack)
|
|
|
db.close()
|
|
|
input("press any key to quit cst \r\n")
|
|
|
#退出
|