from base import BaseCore

baseCore = BaseCore.BaseCore()
r = baseCore.r
log = baseCore.getLogger()
cursor = baseCore.cursor_

sql = "SELECT social_credit_code FROM sys_base_enterprise_ipo WHERE securities_type='新三板' and listed='1'"
cursor.execute(sql)
results = cursor.fetchall()
nq_social_list = [item[0] for item in results]
for item in nq_social_list:
    r.rpush('Jingyingfenxi:finance_socialCode_xsb', item)

baseCore.close()
