feat: 添加JoyHub运费模板和Banner管理接口用例
This commit is contained in:
@@ -17,3 +17,21 @@ ZZYY = https://smart-management-api-pre.best-envision.com/admin-api
|
||||
ASTWB_owner = 18202810506
|
||||
谯新久 = 18202810506
|
||||
ASTWB_to_dd = 2079cb3e311ab6a37138a6d4671181661d211c12a1532c2012ae7e6b397996c3
|
||||
|
||||
[Mysql]
|
||||
db_joyhub_svr = 124.220.32.45
|
||||
db_joyhub_user = joyhub
|
||||
db_joyhub_password = e364be29-6089-4610-97d5-0037a28d0703
|
||||
db_joyhub_dbname = joyhub_website_st
|
||||
|
||||
[PostgreSQL]
|
||||
db_joyhub_host = 124.220.32.45
|
||||
db_joyhub_port = 18666
|
||||
db_joyhub_dbname = joyhub_website_st
|
||||
db_joyhub_user = joyhub
|
||||
db_joyhub_password = e364be29-6089-4610-97d5-0037a28d0703
|
||||
db_min_cached = 2
|
||||
db_max_cached = 10
|
||||
db_max_shared = 10
|
||||
db_max_connections = 20
|
||||
db_max_usage = 0
|
||||
@@ -5,6 +5,16 @@ db_test_port = 8566
|
||||
db_test_dbname = smart_management_st
|
||||
db_test_user = sm_test_user
|
||||
db_test_password = Test@736141
|
||||
db_joyhub_host = 124.220.32.45
|
||||
db_joyhub_port = 18666
|
||||
db_joyhub_name = joyhub_website_st
|
||||
db_joyhub_user = joyhub
|
||||
db_joyhub_password = e364be29-6089-4610-97d5-0037a28d0703
|
||||
db_joyhub_min_cached = 2
|
||||
db_joyhub_max_cached = 10
|
||||
db_joyhub_max_shared = 10
|
||||
db_joyhub_max_connecyions = 20
|
||||
db_joyhub_max_usage = 0
|
||||
db_charset = utf8
|
||||
db_min_cached = 10
|
||||
db_max_cached = 20
|
||||
|
||||
@@ -5,12 +5,20 @@ Author: qiaoxinjiu
|
||||
Create Data: 2020/11/10 10:26
|
||||
"""
|
||||
import pymysql
|
||||
import os
|
||||
|
||||
DB_TEST_HOST = "mysql.qa.huohua.cn"
|
||||
DB_TEST_PORT = 3306
|
||||
DB_TEST_DBNAME = "crmthirdparty"
|
||||
DB_TEST_USER = "qa-dev"
|
||||
DB_TEST_PASSWORD = "jaeg3SCQt0"
|
||||
DB_TEST_PASSWORD = os.environ.get("DB_TEST_PASSWORD", "jaeg3SCQt0")
|
||||
|
||||
# JoyHub 数据库配置
|
||||
DB_JOYHUB_HOST = os.environ.get("DB_JOYHUB_HOST", "124.220.32.45")
|
||||
DB_JOYHUB_PORT = int(os.environ.get("DB_JOYHUB_PORT", "18666"))
|
||||
DB_JOYHUB_DBNAME = os.environ.get("DB_JOYHUB_DBNAME", "joyhub_website_st")
|
||||
DB_JOYHUB_USER = os.environ.get("DB_JOYHUB_USER", "joyhub")
|
||||
DB_JOYHUB_PASSWORD = os.environ.get("DB_JOYHUB_PASSWORD", "e364be29-6089-4610-97d5-0037a28d0703")
|
||||
# 数据库连接编码
|
||||
DB_CHARSET = "utf8"
|
||||
# mincached : 启动时开启的闲置连接数量(缺省值 0 开始时不创建连接)
|
||||
|
||||
@@ -80,9 +80,11 @@ PostgreSQL连接失败!
|
||||
# count : 为改变的数据条数
|
||||
if param:
|
||||
# PostgreSQL使用 %s 作为占位符,与MySQL相同
|
||||
count = cursor.execute(sql, param)
|
||||
cursor.execute(sql, param)
|
||||
else:
|
||||
count = cursor.execute(sql)
|
||||
cursor.execute(sql)
|
||||
# PostgreSQL中,cursor.execute()返回None,受影响行数需要通过rowcount获取
|
||||
count = cursor.rowcount
|
||||
conn.commit()
|
||||
if auto_close:
|
||||
self.close(cursor, conn)
|
||||
|
||||
Reference in New Issue
Block a user