def get_datatype_saas(): client = MysqlClient("saas_meta") result = [[item["cdkey"], item["appkey"], item["plat"]] for item in client.getAppkey_kwargs( plat=["android", "ios", "all", "feeling"])] client.closeMysql() return result
def GetAppkeys(**kwargs): client = MysqlClient("saas_server") data = client.getAppkey_kwargs(**kwargs) result = {} for item in data: appkey = item["appkey"] dbname = item["cdkey"] plat = item["plat"] if (dbname, plat) not in result.get(appkey, []): result.setdefault(appkey, []).append((dbname, plat)) client.closeMysql() return result
def GetAppkey_h5(): plats = ["h5"] client = MysqlClient("saas_server") # result = client.getAppkey_h5() result = client.getAppkey_kwargs(plat=plats, mongo_id=mongo_id, filter_keys=["appkey", "cdkey"]) data = {} for item in result: dbname, appkey, plat = item["cdkey"], item["appkey"], item["plat"] if (dbname, plat) not in data.get(appkey, []): data.setdefault(appkey, []).append((dbname, plat)) client.closeMysql() return data
def GetAppkey_saas(): plats = ["ios", "android", "all", "feeling"] client = MysqlClient("saas_server") result = client.getAppkey_kwargs(plat=plats, mongo_id=mongo_id, filter_keys=["appkey", "cdkey"]) data = {} for item in result: print item dbname, appkey, plat = item["cdkey"], item["appkey"], item["plat"] if (dbname, plat) not in data.get(appkey, []): data.setdefault(appkey, []).append((dbname, plat)) client.closeMysql() return data
def GetAppkeys(**kwargs): client = MysqlClient("saas_server") result = client.getAppkey_kwargs(kwargs) return result
def get_datatype_saas_h5(): client = MysqlClient("saas_meta") result = [[item["cdkey"], item["appkey"], item["plat"]] for item in client.getAppkey_kwargs(plat=["h5"])] client.closeMysql() return result