def readFromMysql(): mysqlClient = MySqlClient.from_setting(setting.MYSQL) sql = """ SELECT type, sitename, alias, url, op_user FROM `site_name` """ data = mysqlClient.readlines(mysqlClient.conn, sql) return data
def readFromMysql(): mysqlClient = MySqlClient.from_setting(MS_MYSQL) sql = """ SELECT type_label, ms_only, ms_ignore FROM `ms_props` """ data = mysqlClient.readlines(mysqlClient.conn, sql) return data
def dealWithConcept(): mysqlClient = MySqlClient.from_setting(setting.MYSQL_SERVERS["52"]) type = "_所属概念" sql = """ SELECT t.id, t.`name` FROM `concept_list` t """ data = mysqlClient.readlines(mysqlClient.conn, sql) if data is None: return False new_data = [] for item in data: tup = item.split('\t') if len(tup) == 2 : new_data.append(GetOneDictLine.getOneDictLineWithId(tup[1],type,tup[0].lower())) return FindTheChangedPart.run(new_data,setting.STOCK_CONCEPT_FILE)
def readFromMysql(dbConf,sql): mysqlClient = MySqlClient.from_setting(dbConf) data = mysqlClient.readlines(mysqlClient.conn, sql) return data