Commit 9f762ba0 authored by liguangyu06's avatar liguangyu06
Browse files

优化

parent 0df7e738
...@@ -52,6 +52,7 @@ api_time = float(result.elapsed.total_seconds()) ...@@ -52,6 +52,7 @@ api_time = float(result.elapsed.total_seconds())
# 获取用户JDE地址信息 # 获取用户JDE地址信息
result = json.loads(result.content) result = json.loads(result.content)
# print(result)
result = {"total": len(result["data"])} result = {"total": len(result["data"])}
# 将接口响应时间添加至result # 将接口响应时间添加至result
...@@ -63,10 +64,10 @@ mysql_handle = mySql() ...@@ -63,10 +64,10 @@ mysql_handle = mySql()
host, port, user, pwd = mysql_handle.getConf(db="cmdc_db") host, port, user, pwd = mysql_handle.getConf(db="cmdc_db")
# 查询数据库中用户JDE地址数量 # 查询数据库中用户JDE地址数量
sql = "SELECT count(t.addressId) FROM `cmdc-user`.cmdc_user_address t " \ sql = "SELECT count(1) FROM `cmdc-user`.cmdc_user_address t " \
"WHERE userId = {} AND isJde = 0 AND companyId = 7 AND deleteSign = 0 AND isDefault = 0".format(customerId) "WHERE userId = {} AND isJde = 0 AND companyId = 7 AND deleteSign = 0 ".format(customerId)
total = mysql_handle.selectSql(host, port, user, pwd, "cmdc-cms", sql)[0][0] total = mysql_handle.selectSql(host, port, user, pwd, "cmdc-cms", sql)[0][0]
# print(sql)
# 获取预期结果 # 获取预期结果
check_dict = commonFuc().get_business_data(module, "checkDict102", total) check_dict = commonFuc().get_business_data(module, "checkDict102", total)
# print(check_dict) # print(check_dict)
......
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