Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
test
autotest-airtest-web-cmdc
Commits
84116ed7
Commit
84116ed7
authored
Feb 06, 2024
by
liguangyu06
Browse files
优化
parent
e138b8a6
Changes
1
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_trade/获取缺货商品列表.air/获取缺货商品列表.py
View file @
84116ed7
...
...
@@ -15,8 +15,8 @@ import json
module
=
"cmdc_trade"
# 第一步获取登录多采商城所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
3
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
3
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
...
...
@@ -47,7 +47,7 @@ mysql_handle = mySql()
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
]
# 获取预期结果
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment