fixbug
This commit is contained in:
parent
be867ea227
commit
db302dfaa9
@ -12,6 +12,7 @@ import logging
|
|||||||
import datetime
|
import datetime
|
||||||
import requests
|
import requests
|
||||||
from ops.mmysql import MysqlBase
|
from ops.mmysql import MysqlBase
|
||||||
|
import copy
|
||||||
import json
|
import json
|
||||||
|
|
||||||
db_conf = {'user': 'mytga', 'pswd': 'gzVwh4HGR68G', 'host': '10.10.3.5', 'db': 'external_data'}
|
db_conf = {'user': 'mytga', 'pswd': 'gzVwh4HGR68G', 'host': '10.10.3.5', 'db': 'external_data'}
|
||||||
@ -532,15 +533,17 @@ class TapWeeklyReport:
|
|||||||
temp["row_name"].append(self.row_cn.get(k))
|
temp["row_name"].append(self.row_cn.get(k))
|
||||||
temp["row_data"] = []
|
temp["row_data"] = []
|
||||||
for line in data_key[0]:
|
for line in data_key[0]:
|
||||||
print(f"line={line}")
|
#print(f"line={line}")
|
||||||
pdb.set_trace()
|
#pdb.set_trace()
|
||||||
tt = {}
|
tt = {}
|
||||||
# (30802, '死战骑士团', 56, 56, 56, 0, 5.1, '付费,策略,单机', 8984, 0, 7794, 0, 272, 34)
|
# (30802, '死战骑士团', 56, 56, 56, 0, 5.1, '付费,策略,单机', 8984, 0, 7794, 0, 272, 34)
|
||||||
tt['gameid'], tt['title'], tt['order'], tt['min_order'], tt['max_order'], tt['diff_order'],tt['score'], tt['tags'], tt['watch'], tt['download'], tt['sell'], tt['reserve'], tt['review'],tt['topic'] = line
|
tt['gameid'], tt['title'], tt['order'], tt['min_order'], tt['max_order'], tt['diff_order'],tt['score'], tt['tags'], tt['watch'], tt['download'], tt['sell'], tt['reserve'], tt['review'],tt['topic'] = line
|
||||||
|
|
||||||
|
new_tt = copy.deepcopy(tt)
|
||||||
for item in tt.keys():
|
for item in tt.keys():
|
||||||
if item not in rows:
|
if item not in rows:
|
||||||
tt.pop(item)
|
new_tt.pop(item)
|
||||||
temp["row_data"].append(tt)
|
temp["row_data"].append(new_tt)
|
||||||
except Exception:
|
except Exception:
|
||||||
log.error(f"struct data with {line} Failed", exc_info=True)
|
log.error(f"struct data with {line} Failed", exc_info=True)
|
||||||
return r_data
|
return r_data
|
||||||
|
Loading…
x
Reference in New Issue
Block a user