Commit 2490db6d authored by 任婷婷's avatar 任婷婷

.

parent 65fe9999
...@@ -95,11 +95,11 @@ def update_tag3_user_portrait(cl_id): ...@@ -95,11 +95,11 @@ def update_tag3_user_portrait(cl_id):
# } # }
# redis_client.set(key2, json.dumps(res2)) # redis_client.set(key2, json.dumps(res2))
# redis_client.expire(key2, 60 * 60 * 24 * 30) # redis_client.expire(key2, 60 * 60 * 24 * 30)
# print('*'*10)
write_user_portrait(cl_id, ",".join(first_solutions_score.keys()), ",".join(second_solutions_score.keys()), # write_user_portrait(cl_id, ",".join(first_solutions_score.keys()), ",".join(second_solutions_score.keys()),
",".join(first_demands_score.keys()), ",".join(second_demands_score.keys()), # ",".join(first_demands_score.keys()), ",".join(second_demands_score.keys()),
",".join(first_positions_score.keys()), ",".join(second_positions_score.keys()), # ",".join(first_positions_score.keys()), ",".join(second_positions_score.keys()),
",".join(projects_score.keys())) # ",".join(projects_score.keys()))
first_solutions = [] first_solutions = []
first_positions = [] first_positions = []
......
...@@ -17,6 +17,7 @@ def get_user_portrait_log(cl_id): ...@@ -17,6 +17,7 @@ def get_user_portrait_log(cl_id):
sql = """select cl_id,event_cn, first_solutions, second_solutions, first_demands, sql = """select cl_id,event_cn, first_solutions, second_solutions, first_demands,
second_demands, first_positions, second_positions, projects second_demands, first_positions, second_positions, projects
from kafka_tag3_log where cl_id in {} """.format(tuple(cl_id)) from kafka_tag3_log where cl_id in {} """.format(tuple(cl_id))
print('&'*100)
print("sql", sql) print("sql", sql)
db, cursor = get_jerry_test() db, cursor = get_jerry_test()
cursor.execute(sql) cursor.execute(sql)
......
...@@ -443,7 +443,7 @@ def write_user_portrait(cl_id, first_solutions, second_solutions, first_demands, ...@@ -443,7 +443,7 @@ def write_user_portrait(cl_id, first_solutions, second_solutions, first_demands,
def get_user_portrait_log(cl_id): def get_user_portrait_log(cl_id):
try: # try:
sql = """select cl_id,event_cn, first_solutions, second_solutions, first_demands, sql = """select cl_id,event_cn, first_solutions, second_solutions, first_demands,
second_demands, first_positions, second_positions, projects second_demands, first_positions, second_positions, projects
from kafka_tag3_log where cl_id in {} """.format(tuple(cl_id)) from kafka_tag3_log where cl_id in {} """.format(tuple(cl_id))
...@@ -454,9 +454,9 @@ def get_user_portrait_log(cl_id): ...@@ -454,9 +454,9 @@ def get_user_portrait_log(cl_id):
db.close() db.close()
cursor.close() cursor.close()
return data return data
except Exception as e: # except Exception as e:
print(e) # print(e)
return None # return None
def user_portrait_action_statistic(cl_id): def user_portrait_action_statistic(cl_id):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment