mirror of
https://github.com/kongyuebin1/dongfeng-pay.git
synced 2024-12-25 11:32:24 +08:00
合并一些变量
This commit is contained in:
parent
ba02a72f55
commit
0bb777213b
@ -13,6 +13,3 @@ dbbase = juhe_pay
|
|||||||
|
|
||||||
[gateway]
|
[gateway]
|
||||||
host = http://localhost:12309/
|
host = http://localhost:12309/
|
||||||
#orderUrl = http://localhost:12309/gateway/supplier/order/query
|
|
||||||
#updateOrderUrl = http://localhost:12309/gateway/update/order
|
|
||||||
#payforUrl = http://localhost:12309/gateway/update/order
|
|
@ -1,18 +0,0 @@
|
|||||||
/***************************************************
|
|
||||||
** @Desc : This file for ...
|
|
||||||
** @Time : 2019/10/26 15:30
|
|
||||||
** @Author : yuebin
|
|
||||||
** @File : conf_pro
|
|
||||||
** @Last Modified by : yuebin
|
|
||||||
** @Last Modified time: 2019/10/26 15:30
|
|
||||||
** @Software: GoLand
|
|
||||||
****************************************************/
|
|
||||||
package conf
|
|
||||||
|
|
||||||
const (
|
|
||||||
DB_HOST = "localhost"
|
|
||||||
DB_PORT = "3306"
|
|
||||||
DB_USER = "root"
|
|
||||||
DB_PASSWORD = "Kyb^15273031604"
|
|
||||||
DB_BASE = "juhe_pay"
|
|
||||||
)
|
|
@ -10,7 +10,6 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"boss/conf"
|
|
||||||
"boss/models/accounts"
|
"boss/models/accounts"
|
||||||
"boss/models/agent"
|
"boss/models/agent"
|
||||||
"boss/models/merchant"
|
"boss/models/merchant"
|
||||||
@ -23,22 +22,23 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/beego/beego/v2/client/orm"
|
"github.com/beego/beego/v2/client/orm"
|
||||||
"github.com/beego/beego/v2/core/logs"
|
"github.com/beego/beego/v2/core/logs"
|
||||||
|
"github.com/beego/beego/v2/server/web"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
dbHost := conf.DB_HOST
|
dbHost, _ := web.AppConfig.String("mysql::dbhost")
|
||||||
dbUser := conf.DB_USER
|
dbUser, _ := web.AppConfig.String("mysql::dbuser")
|
||||||
dbPassword := conf.DB_PASSWORD
|
dbPassword, _ := web.AppConfig.String("mysql::dbpasswd")
|
||||||
dbBase := conf.DB_BASE
|
dbBase, _ := web.AppConfig.String("mysql::dbbase")
|
||||||
dbPort := conf.DB_PORT
|
dbPort, _ := web.AppConfig.String("mysql::dbport")
|
||||||
|
|
||||||
link := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8", dbUser, dbPassword, dbHost, dbPort, dbBase)
|
link := fmt.Sprintf("%s:%s@tcp(%s:%s)/%s?charset=utf8", dbUser, dbPassword, dbHost, dbPort, dbBase)
|
||||||
|
|
||||||
logs.Info("mysql init.....", link)
|
logs.Info("mysql init.....", link)
|
||||||
|
|
||||||
orm.RegisterDriver("mysql", orm.DRMySQL)
|
_ = orm.RegisterDriver("mysql", orm.DRMySQL)
|
||||||
orm.RegisterDataBase("default", "mysql", link)
|
_ = orm.RegisterDataBase("default", "mysql", link)
|
||||||
orm.RegisterModel(new(user.UserInfo), new(system.MenuInfo), new(system.SecondMenuInfo),
|
orm.RegisterModel(new(user.UserInfo), new(system.MenuInfo), new(system.SecondMenuInfo),
|
||||||
new(system.PowerInfo), new(system.RoleInfo), new(system.BankCardInfo), new(road.RoadInfo),
|
new(system.PowerInfo), new(system.RoleInfo), new(system.BankCardInfo), new(road.RoadInfo),
|
||||||
new(road.RoadPoolInfo), new(agent.AgentInfo), new(merchant.MerchantInfo), new(merchant.MerchantDeployInfo),
|
new(road.RoadPoolInfo), new(agent.AgentInfo), new(merchant.MerchantInfo), new(merchant.MerchantDeployInfo),
|
||||||
|
Loading…
Reference in New Issue
Block a user