|
@@ -12,6 +12,7 @@ import ( |
|
|
"errors" |
|
|
"errors" |
|
|
"fmt" |
|
|
"fmt" |
|
|
"github.com/streadway/amqp" |
|
|
"github.com/streadway/amqp" |
|
|
|
|
|
"strings" |
|
|
"time" |
|
|
"time" |
|
|
"xorm.io/xorm" |
|
|
"xorm.io/xorm" |
|
|
) |
|
|
) |
|
@@ -150,7 +151,11 @@ func GetWebSiteDomainMasterId(host string) string { |
|
|
obj := new(model.UserAppDomain) |
|
|
obj := new(model.UserAppDomain) |
|
|
has, err := db.Db.Where("domain=?", host).Get(obj) |
|
|
has, err := db.Db.Where("domain=?", host).Get(obj) |
|
|
if err != nil || !has { |
|
|
if err != nil || !has { |
|
|
return "" |
|
|
|
|
|
|
|
|
hostList := strings.Split(host, ":") |
|
|
|
|
|
has, err = db.Db.Where("domain=?", hostList[0]).Get(obj) |
|
|
|
|
|
if err != nil || !has { |
|
|
|
|
|
return "" |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
return utils.AnyToString(obj.Uuid) |
|
|
return utils.AnyToString(obj.Uuid) |
|
|
} |
|
|
} |