|
|
@@ -15,7 +15,7 @@ type UserAppDomainDb struct { |
|
|
|
Db *xorm.Engine |
|
|
|
} |
|
|
|
|
|
|
|
func (u UserAppDomainDb) GetMediumAppDomainByHost(host string) (m *model.UserAppDomain, err error) { |
|
|
|
func (u UserAppDomainDb) GetAppDomainByHost(host string) (m *model.UserAppDomain, err error) { |
|
|
|
m = new(model.UserAppDomain) |
|
|
|
has, err := u.Db.Where("domain =?", host).Get(m) |
|
|
|
if err != nil { |
|
|
@@ -27,6 +27,18 @@ func (u UserAppDomainDb) GetMediumAppDomainByHost(host string) (m *model.UserApp |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (u UserAppDomainDb) GetAppDomainByType(masterId, kind string) (m *model.UserAppDomain, err error) { |
|
|
|
m = new(model.UserAppDomain) |
|
|
|
has, err := u.Db.Where("type =?", kind).And("uuid =?", masterId).Get(m) |
|
|
|
if err != nil { |
|
|
|
return nil, zhios_order_relate_logx.Error(err) |
|
|
|
} |
|
|
|
if has == false { |
|
|
|
return nil, nil |
|
|
|
} |
|
|
|
return m, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (u UserAppDomainDb) GetUserAppDomain(masterId int) (m *model.UserAppDomain, err error) { |
|
|
|
m = new(model.UserAppDomain) |
|
|
|
has, err := u.Db.Where("uuid =?", masterId).Get(m) |
|
|
|