Commit 84116ed7 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent e138b8a6
...@@ -15,8 +15,8 @@ import json ...@@ -15,8 +15,8 @@ import json
module = "cmdc_trade" module = "cmdc_trade"
# 第一步获取登录多采商城所需账号密码 # 第一步获取登录多采商城所需账号密码
username = commonFuc().get_business_data(module, "username") username = commonFuc().get_business_data(module, "username3")
password = commonFuc().get_business_data(module, "password") password = commonFuc().get_business_data(module, "password3")
# 获取登录后Cmdc_access_token # 获取登录后Cmdc_access_token
cmdc_access_token = CmdcMaiiLogin(username, password).get_token() cmdc_access_token = CmdcMaiiLogin(username, password).get_token()
headers = commonFuc().get_business_data(module, "json_headers1", cmdc_access_token) headers = commonFuc().get_business_data(module, "json_headers1", cmdc_access_token)
...@@ -47,7 +47,7 @@ mysql_handle = mySql() ...@@ -47,7 +47,7 @@ mysql_handle = mySql()
host, port, user, pwd = mysql_handle.getConf(db="cmdc_db") host, port, user, pwd = mysql_handle.getConf(db="cmdc_db")
# 查询数据库中缺货商品数量 # 查询数据库中缺货商品数量
sql = "SELECT count(t.id) FROM `cmdc-user`.cmdc_stock_out t WHERE userId = 69" sql = "SELECT count(t.id) FROM `cmdc-user`.cmdc_stock_out t WHERE userId = 124100"
total = mysql_handle.selectSql(host, port, user, pwd, "cmdc-user", sql)[0][0] total = mysql_handle.selectSql(host, port, user, pwd, "cmdc-user", sql)[0][0]
# 获取预期结果 # 获取预期结果
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment