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
03d38900
Commit
03d38900
authored
Feb 05, 2024
by
liguangyu06
Browse files
优化
parent
26a8cd6d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
air_case/cmdc_order_handle/商品jde停用拦截验证_下单_e.air/商品jde停用拦截验证_下单_e.py
View file @
03d38900
...
...
@@ -16,8 +16,8 @@ module = "cmdc_order_handle"
# 第一步登录多采商城获取token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
...
...
@@ -28,7 +28,7 @@ mysql_handle = mySql()
host
,
port
,
user
,
pwd
=
mysql_handle
.
getConf
(
db
=
"cmdc_db"
)
# 进行商品jde状态调整为停用操作
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.jdeStatus = '0' WHERE t.productId =
79
91"
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.jdeStatus = '0' WHERE t.productId = 91
84
"
mysql_handle
.
executeUpdate
(
host
,
port
,
user
,
pwd
,
"cmdc-product"
,
sql
)
# 第二步进行提交订单
...
...
air_case/cmdc_order_handle/商品jde停用拦截验证_再来一单_e.air/商品jde停用拦截验证_再来一单_e.py
View file @
03d38900
...
...
@@ -16,8 +16,8 @@ module = "cmdc_order_handle"
# 第一步登录多采商城获取token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
...
...
@@ -28,7 +28,7 @@ mysql_handle = mySql()
host
,
port
,
user
,
pwd
=
mysql_handle
.
getConf
(
db
=
"cmdc_db"
)
# 查询指定需求单信息
order_num
=
"170
1843845734757
5"
order_num
=
"170
7103336880532
5"
# 第二步获取多采商城需求单列表
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url_demand_list"
)
...
...
@@ -64,5 +64,5 @@ check_dict = commonFuc().get_business_data(module, "checkDict20")
commonFuc
().
check_result
(
check_dict
,
result
)
# 把商品对应的jde状态调整为启用状态操作
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.jdeStatus = 'P' WHERE t.productId =
79
91"
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.jdeStatus = 'P' WHERE t.productId = 91
84
"
mysql_handle
.
executeUpdate
(
host
,
port
,
user
,
pwd
,
"cmdc-product"
,
sql
)
air_case/cmdc_order_handle/商品下架拦截验证_下单_a.air/商品下架拦截验证_下单_a.py
View file @
03d38900
...
...
@@ -16,8 +16,8 @@ module = "cmdc_order_handle"
# 第一步登录多采商城获取token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
...
...
@@ -28,7 +28,7 @@ mysql_handle = mySql()
host
,
port
,
user
,
pwd
=
mysql_handle
.
getConf
(
db
=
"cmdc_db"
)
# 进行商品下架操作
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.status = 102 WHERE t.productId =
79
91"
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.status = 102 WHERE t.productId = 91
84
"
mysql_handle
.
executeUpdate
(
host
,
port
,
user
,
pwd
,
"cmdc-product"
,
sql
)
# 第二步进行提交订单
...
...
air_case/cmdc_order_handle/商品下架拦截验证_再来一单_b.air/商品下架拦截验证_再来一单_b.py
View file @
03d38900
...
...
@@ -16,8 +16,8 @@ module = "cmdc_order_handle"
# 第一步登录多采商城获取token
# 获取登录所需账号密码
username
=
commonFuc
().
get_business_data
(
module
,
"username"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password"
)
username
=
commonFuc
().
get_business_data
(
module
,
"username
2
"
)
password
=
commonFuc
().
get_business_data
(
module
,
"password
2
"
)
# 获取登录后Cmdc_access_token
cmdc_access_token
=
CmdcMaiiLogin
(
username
,
password
).
get_token
()
headers
=
commonFuc
().
get_business_data
(
module
,
"json_headers1"
,
cmdc_access_token
)
...
...
@@ -28,7 +28,7 @@ mysql_handle = mySql()
host
,
port
,
user
,
pwd
=
mysql_handle
.
getConf
(
db
=
"cmdc_db"
)
# 查询指定需求单信息
order_num
=
"170
1843845734757
5"
order_num
=
"170
7103336880532
5"
# 第二步获取多采商城需求单列表
url
=
commonFuc
().
get_api_url
()
+
commonFuc
().
get_business_data
(
module
,
"url_demand_list"
)
...
...
@@ -66,5 +66,5 @@ check_dict = commonFuc().get_business_data(module, "checkDict20")
commonFuc
().
check_result
(
check_dict
,
result
)
# 进行商品上架架操作
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.status = 101 WHERE t.productId =
79
91"
sql
=
"UPDATE `cmdc-product`.ic_product t SET t.status = 101 WHERE t.productId = 91
84
"
mysql_handle
.
executeUpdate
(
host
,
port
,
user
,
pwd
,
"cmdc-product"
,
sql
)
\ No newline at end of file
data/cmdc_order_handle/data
View file @
03d38900
This diff is collapsed.
Click to expand it.
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