|
@@ -28,14 +28,14 @@ var dataBase *gorm.DB
|
28
|
28
|
|
29
|
29
|
var (
|
30
|
30
|
dbName = "local"
|
31
|
|
- user = beego.AppConfig.DefaultString(dbName+"::user", "KingMed")
|
32
|
|
- password = beego.AppConfig.DefaultString(dbName+"::password", "KingMed")
|
33
|
|
- host = beego.AppConfig.DefaultString(dbName+"::host", "192.168.10.80")
|
|
31
|
+ user = beego.AppConfig.DefaultString(dbName+"::user", "sa")
|
|
32
|
+ password = beego.AppConfig.DefaultString(dbName+"::password", "hy123456")
|
|
33
|
+ host = beego.AppConfig.DefaultString(dbName+"::host", "192.168.10.10")
|
34
|
34
|
port = beego.AppConfig.DefaultInt(dbName+"::port", 1633)
|
35
|
|
- dbname = beego.AppConfig.DefaultString(dbName+"::dbname", "KMDB")
|
|
35
|
+ dbname = beego.AppConfig.DefaultString(dbName+"::dbname", "hyDB")
|
36
|
36
|
)
|
37
|
37
|
|
38
|
|
-func ConnectSHMSDB() {
|
|
38
|
+func ConnectMSDB() {
|
39
|
39
|
connectionString := fmt.Sprintf("server=%s;user id=%s;password=%s;port=%d;database=%s",
|
40
|
40
|
host, user, password, port, dbname)
|
41
|
41
|
fmt.Println(connectionString)
|