新增查询时间
Signed-off-by: yinzijian <yinzijian@haomozhixing.onaliyun.com>
This commit is contained in:
parent
acbf7c5987
commit
e161101976
|
|
@ -830,6 +830,23 @@ class PhaseTableDbHelper(TableDbHelperBase):
|
|||
return None, e
|
||||
finally:
|
||||
self.close(conn, cursor)
|
||||
|
||||
def query_cross_phase_update_time(self, crossids, citycode):
|
||||
conn, cursor = self.connect()
|
||||
try:
|
||||
sql = f"""select xl_crossid, max(update_time) max_update_time
|
||||
from phase_record
|
||||
where xl_crossid in %s
|
||||
and nodeid = %s
|
||||
group by xl_crossid"""
|
||||
print(cursor.mogrify(sql, (crossids,citycode)))
|
||||
cursor.execute(sql, (crossids,citycode))
|
||||
result = cursor.fetchall()
|
||||
return result, None
|
||||
except Exception as error:
|
||||
return None, error
|
||||
finally:
|
||||
self.close(conn, cursor)
|
||||
# if __name__ == '__main__':
|
||||
# tt_5min = get_latest_5min_timestamp()
|
||||
# print(tt_5min)
|
||||
|
|
|
|||
Loading…
Reference in New Issue