def getchgresult(method, user_id, **config): addconig = {'method': method, 'usernumber': user_id} addconig.update(config) userinfo = getuinfo(user_id) addconig.update(userinfo) params = getbody.getsign(**addconig) url = 'http://132.38.0.86:9200/openservlet' para = '' for i in params: para = para + i + "=" + str(params[i]) + "&" para = para[:-1] url = url + "?" + para print url respone = requests.get(url) context = respone.content result = demjson.decode(context) return result
def getchgresult(method,user_id,**config): addconig = {'method':method,'usernumber':user_id} addconig.update(config) userinfo = getuinfo(user_id) addconig.update(userinfo) params = getbody.getsign(**addconig) url = 'http://132.38.0.86:9200/openservlet' para = '' for i in params: para = para + i + "=" + str(params[i]) + "&" para = para[:-1] url = url + "?" + para print url respone = requests.get(url) context = respone.content result = demjson.decode(context) return result
def getresult(method, user_id, **config): addconig = {'method': method, 'usernumber': user_id} addconig.update(config) userinfo = getuinfo(user_id) addconig.update(userinfo) params = getbody.getsign(**addconig) url = 'http://132.38.0.86:9200/openservlet' respone = requests.get(url, params=params) context = respone.content result = demjson.decode(context) return result
def getuinfo(user_id): addconfig = {'method':'com.aop.method.realnamecheckqry','usernumber':user_id} params = getbody.getsign(**addconfig) url = 'http://132.38.0.86:9200/openservlet' respone = requests.get(url,params=params) context = respone.content result = demjson.decode(context) # for i in result: # print i + result[i] return {'provincecode':result['provincecode'], 'citycode':result['citycode'], 'nettype':result['nettype'], 'paytype':result['paytype']}
def getuinfo(user_id): addconfig = { 'method': 'com.aop.method.realnamecheckqry', 'usernumber': user_id } params = getbody.getsign(**addconfig) url = 'http://132.38.0.86:9200/openservlet' respone = requests.get(url, params=params) context = respone.content result = demjson.decode(context) # for i in result: # print i + result[i] return { 'provincecode': result['provincecode'], 'citycode': result['citycode'], 'nettype': result['nettype'], 'paytype': result['paytype'] }
def getresult(method,user_id,**config): addconig = {'method':method,'usernumber':user_id} addconig.update(config) userinfo = getuinfo(user_id) addconig.update(userinfo) params = getbody.getsign(**addconig) url = 'http://132.38.0.86:9200/openservlet' respone = requests.get(url,params=params) context = respone.content result = demjson.decode(context) return result