Browse Source

更新

master
huangjiajun 1 month ago
parent
commit
67f1ca108f
2 changed files with 13 additions and 2 deletions
  1. +2
    -1
      src/super/dao/user_app_domain_dao.go
  2. +11
    -1
      src/super/implement/user_app_domain_implement.go

+ 2
- 1
src/super/dao/user_app_domain_dao.go View File

@@ -1,9 +1,10 @@
package dao
package dao


import "code.fnuoos.com/zhimeng/model.git/src/super/model" import "code.fnuoos.com/zhimeng/model.git/src/super/model"


type UserAppDomainDao interface { type UserAppDomainDao interface {
GetUserAppDomain(masterId int) (m *model.UserAppDomain, err error) GetUserAppDomain(masterId int) (m *model.UserAppDomain, err error)
GetUserAppDomainByPlatform(masterId int, platform string) (m *model.UserAppDomain, err error)
GetAppDomainByHost(host string) (m *model.UserAppDomain, err error) GetAppDomainByHost(host string) (m *model.UserAppDomain, err error)
GetAppDomainByType(kind, masterId string) (m *model.UserAppDomain, err error) GetAppDomainByType(kind, masterId string) (m *model.UserAppDomain, err error)
UserAppDomainInsert(m *model.UserAppDomain) (int64, error) UserAppDomainInsert(m *model.UserAppDomain) (int64, error)


+ 11
- 1
src/super/implement/user_app_domain_implement.go View File

@@ -50,7 +50,17 @@ func (u UserAppDomainDb) GetUserAppDomain(masterId int) (m *model.UserAppDomain,
} }
return m, nil return m, nil
} }

func (u UserAppDomainDb) GetUserAppDomainByPlatform(masterId int, platform string) (m *model.UserAppDomain, err error) {
m = new(model.UserAppDomain)
has, err := u.Db.Where("uuid =? and type=? and is_ssl=1", masterId, platform, 1).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) UserAppDomainInsert(m *model.UserAppDomain) (int64, error) { func (u UserAppDomainDb) UserAppDomainInsert(m *model.UserAppDomain) (int64, error) {
insertAffected, err := u.Db.InsertOne(m) insertAffected, err := u.Db.InsertOne(m)
if err != nil { if err != nil {


Loading…
Cancel
Save