Skip to content

Commit

Permalink
修复bug
Browse files Browse the repository at this point in the history
  • Loading branch information
songang committed May 3, 2022
1 parent 79d6f5c commit b90bfba
Show file tree
Hide file tree
Showing 12 changed files with 54 additions and 54 deletions.
1 change: 1 addition & 0 deletions app/exec/backend/conf/db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Db_Mysql_Slave1 = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_SetMaxOpen = 10
Db_Mysql_SetMaxIdle = 10


[test]

# 数据库类型可选项 1.mysql 2.mongo
Expand Down
4 changes: 2 additions & 2 deletions app/exec/jump/appInit/appInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"durl/app/share/dao/cache"
"durl/app/share/dao/db"
"durl/app/share/log"

"github.com/beego/beego/v2/core/config"
)

Expand Down Expand Up @@ -42,10 +41,11 @@ func initConf() (AppConf *Conf) {
runmode, _ := config.String("runmode")

// 获取消息通信方式
AppConf.MsgType, _ = config.String("MsgType")
AppConf.MsgType, _ = config.String(runmode + "::MsgType")

// db
AppConf.Db.Type, _ = config.String(runmode + "::Db_Type")

// mysql
AppConf.Db.Xorm.Mysql.Master, _ = config.String(runmode + "::Db_Mysql_Master")
AppConf.Db.Xorm.Mysql.Slave1, _ = config.String(runmode + "::Db_Mysql_Slave1")
Expand Down
4 changes: 2 additions & 2 deletions app/exec/jump/conf/db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# 数据库类型可选项 1.mysql
Db_Type = mysql

Db_Mysql_Master = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Master = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_SetMaxOpen = 10
Db_Mysql_SetMaxIdle = 10

Expand Down
3 changes: 3 additions & 0 deletions app/exec/jump/controllers/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type MSGConf struct {
// 注意事项:
// 作者: # ang.song # 2021/12/07 5:44 下午 #
func (c MSGConf) InitMsg() {
fmt.Println("c.Type: ", c.Type)
switch c.Type {
case "mysql":
InitMysqlMsg()
Expand Down Expand Up @@ -61,6 +62,7 @@ func InitMysqlMsg() {
if count > 0 {
queueId = list[count-1].Id
for _, val := range list {
fmt.Println("val: ", val)
// 有状态更新时,通知所有观察者
for _, oper := range PurchaseOperFuncArr {
res, err := oper(val.QueueType, val.Data)
Expand Down Expand Up @@ -133,6 +135,7 @@ func shortNumDel(queueType int, data string) (res bool, err error) {
// 注意事项:
// 作者: # ang.song # 2021/12/07 5:44 下午 #
func blacklistAdd(queueType int, data string) (res bool, err error) {
fmt.Println("blacklistAdd: ", blacklistAdd)
if queueType == queueTypeBlacklistAdd {
cache.BlacklistConnLock.Lock()
err = cache.Blacklist.Add(data)
Expand Down
4 changes: 2 additions & 2 deletions app/exec/openapi/conf/db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
# 数据库类型可选项 1.mysql
Db_Type = mysql

Db_Mysql_Master = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Master = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_SetMaxOpen = 10
Db_Mysql_SetMaxIdle = 10

Expand Down
1 change: 0 additions & 1 deletion app/exec/portal/appInit/appInit.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"durl/app/exec/portal/routers"
"durl/app/share/dao/db"
"durl/app/share/log"

"github.com/beego/beego/v2/core/config"
)

Expand Down
2 changes: 1 addition & 1 deletion app/exec/portal/conf/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ runmode = "${RUN_MODE||dev}"
copyrequestbody = true

# jump服务域名 供前台返回
jumpUrl = "durl.fun"
jumpUrl = "0.0.0.0:8082"

# 数据库相关配置
include "db.conf"
Expand Down
6 changes: 3 additions & 3 deletions app/exec/portal/conf/db.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

[dev]

# 数据库类型可选项 1.mysql 2.mongo
# 数据库类型可选项 1.mysql
Db_Type = mysql

Db_Mysql_Master = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:Rootroot123!@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Master = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_Slave1 = root:root@tcp(127.0.0.1:3306)/durl?charset=utf8mb4
Db_Mysql_SetMaxOpen = 10
Db_Mysql_SetMaxIdle = 10

Expand Down
Loading

0 comments on commit b90bfba

Please sign in to comment.