app Support user balance , Sometimes the balance needs to be paid , Modification table , There are several watches to look for , And modify the table directly ,app page
There will be no recharge records . use python Make interface request , Simulate real operation .
#!/usr/bin/python #coding=UTF-8 import requests import hashlib import conf def
get_cash(uid):# Get balance operation code cash_code_url = conf.cash_code_url cash_code_data = {
"uid":uid,"operator_id":"1002543687","operator_name":"zhaoyuzhong"} req_post =,data=cash_code_data)try: idx = str(req_post.json()[
'data']['cash_idx']) return idx except: print req_post.json()['msg'] def
recharge(uid,username,count_balance):# Manual payment interface cash_idx=get_cash(uid) check_str
= conf.check_str checksum = md5(checkstr) recharge_url = conf.recharge_url
recharge_data = conf.recharge_data req_post =,data=recharge_data)#post Method use data Parameter transfer print " Manual payment interface "
,req_post.json()['msg'] def withdraw(uid,username,count_cash,count_balance):
# Financial withdrawal interface cash_idx=get_cash(uid) check_str = conf.check_str checksum =
md5(checkstr) withdraw_url = conf.withdraw_url withdraw_data =
conf.withdraw_data req_post =,data=withdraw_data)
print " Financial withdrawal interface ",req_post.json()['msg'] def md5(str):# The encrypted string is md5 m=hashlib.md5()
m.update(str) psw=m.hexdigest()return psw def getBalance(uid):# Personal balance query interface
get_Balance_url = conf.getBalance_url get_Balance_data = {"uid":uid} req_post =,data=get_Balance_data) cash = myreq_post.json()[
'data']['cash'] balance= myreq_post.json()['data']['balance'] usable =
myreq_post.json()['data']['usable'] print " Withdrawable cash=",cash," balance balance=",balance,
" Available usable=",usable if __name__ == '__main__': # Give the phone number 18688888888,uid by 933634
User recharge 1000 element getBalance(933634)# Query users first uid The balance of recharge(933634,18688888888,100000)
# Manual balance replenishment ,uid, cell-phone number , Recharge amount : Company : branch getBalance(933634) # Check the balance again
results of enforcement :

©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library )html Writing about cherry trees , Writing about cherry trees java Four functional interfaces ( a key , simple ) Browser kernel ( understand )06【 Interpretation according to the frame 】 Data range filtering -- awesome HashMap Explain in detail os Simple use of module computer network --- Basic concepts of computer network ( agreement , system ) Some East 14 Pay change 16 salary , Sincerity or routine ?