From c90404effb37c859ff605a2e4a909ce4e3b2cfd1 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Wed, 21 Aug 2024 16:03:46 +0800 Subject: [PATCH] update --- src/super/dao/agent_app_domain_dao.go | 9 ---- src/super/dao/medium_app_domain_dao.go | 9 ---- .../implement/agent_app_domain_implement.go | 48 ------------------- .../implement/medium_app_domain_implement.go | 48 ------------------- src/super/model/agent_app_domain.go | 9 ---- src/super/model/user_wx_applet_list.go | 1 + 6 files changed, 1 insertion(+), 123 deletions(-) delete mode 100644 src/super/dao/agent_app_domain_dao.go delete mode 100644 src/super/dao/medium_app_domain_dao.go delete mode 100644 src/super/implement/agent_app_domain_implement.go delete mode 100644 src/super/implement/medium_app_domain_implement.go delete mode 100644 src/super/model/agent_app_domain.go diff --git a/src/super/dao/agent_app_domain_dao.go b/src/super/dao/agent_app_domain_dao.go deleted file mode 100644 index 06835ff..0000000 --- a/src/super/dao/agent_app_domain_dao.go +++ /dev/null @@ -1,9 +0,0 @@ -package dao - -import "code.fnuoos.com/zhimeng/model.git/src/super/model" - -type AgentAppDomainDao interface { - GetAgentAppDomain(agentId int) (m *model.AgentAppDomain, err error) - GetAgentAppDomainByHost(host string) (m *model.AgentAppDomain, err error) - AgentAppDomainInsert(m *model.AgentAppDomain) (int64, error) -} diff --git a/src/super/dao/medium_app_domain_dao.go b/src/super/dao/medium_app_domain_dao.go deleted file mode 100644 index e3c1a71..0000000 --- a/src/super/dao/medium_app_domain_dao.go +++ /dev/null @@ -1,9 +0,0 @@ -package dao - -import "code.fnuoos.com/zhimeng/model.git/src/super/model" - -type MediumAppDomainDao interface { - GetMediumAppDomain(mediumId int) (m *model.MediumAppDomain, err error) - GetMediumAppDomainByHost(host string) (m *model.MediumAppDomain, err error) - MediumAppDomainInsert(m *model.MediumAppDomain) (int64, error) -} diff --git a/src/super/implement/agent_app_domain_implement.go b/src/super/implement/agent_app_domain_implement.go deleted file mode 100644 index e34008d..0000000 --- a/src/super/implement/agent_app_domain_implement.go +++ /dev/null @@ -1,48 +0,0 @@ -package implement - -import ( - "code.fnuoos.com/zhimeng/model.git/src/super/dao" - "code.fnuoos.com/zhimeng/model.git/src/super/model" - zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx" - "xorm.io/xorm" -) - -func NewAgentAppDomainDb(engine *xorm.Engine) dao.AgentAppDomainDao { - return &AgentAppDomainDb{Db: engine} -} - -type AgentAppDomainDb struct { - Db *xorm.Engine -} - -func (a AgentAppDomainDb) GetAgentAppDomainByHost(host string) (m *model.AgentAppDomain, err error) { - m = new(model.AgentAppDomain) - has, err := a.Db.Where("domain =?", host).Get(m) - if err != nil { - return nil, zhios_order_relate_logx.Error(err) - } - if has == false { - return nil, nil - } - return m, nil -} - -func (a AgentAppDomainDb) GetAgentAppDomain(agent int) (m *model.AgentAppDomain, err error) { - m = new(model.AgentAppDomain) - has, err := a.Db.Where("agent_id =?", agent).Get(m) - if err != nil { - return nil, zhios_order_relate_logx.Error(err) - } - if has == false { - return nil, nil - } - return m, nil -} - -func (a AgentAppDomainDb) AgentAppDomainInsert(m *model.AgentAppDomain) (int64, error) { - insertAffected, err := a.Db.InsertOne(m) - if err != nil { - return 0, err - } - return insertAffected, nil -} diff --git a/src/super/implement/medium_app_domain_implement.go b/src/super/implement/medium_app_domain_implement.go deleted file mode 100644 index 189fb15..0000000 --- a/src/super/implement/medium_app_domain_implement.go +++ /dev/null @@ -1,48 +0,0 @@ -package implement - -import ( - "code.fnuoos.com/zhimeng/model.git/src/super/dao" - "code.fnuoos.com/zhimeng/model.git/src/super/model" - zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx" - "xorm.io/xorm" -) - -func NewMediumAppDomainDb(engine *xorm.Engine) dao.MediumAppDomainDao { - return &MediumAppDomainDb{Db: engine} -} - -type MediumAppDomainDb struct { - Db *xorm.Engine -} - -func (m2 MediumAppDomainDb) GetMediumAppDomainByHost(host string) (m *model.MediumAppDomain, err error) { - m = new(model.MediumAppDomain) - has, err := m2.Db.Where("domain =?", host).Get(m) - if err != nil { - return nil, zhios_order_relate_logx.Error(err) - } - if has == false { - return nil, nil - } - return m, nil -} - -func (m2 MediumAppDomainDb) GetMediumAppDomain(mediumId int) (m *model.MediumAppDomain, err error) { - m = new(model.MediumAppDomain) - has, err := m2.Db.Where("medium_id =?", mediumId).Get(m) - if err != nil { - return nil, zhios_order_relate_logx.Error(err) - } - if has == false { - return nil, nil - } - return m, nil -} - -func (m2 MediumAppDomainDb) MediumAppDomainInsert(m *model.MediumAppDomain) (int64, error) { - insertAffected, err := m2.Db.InsertOne(m) - if err != nil { - return 0, err - } - return insertAffected, nil -} diff --git a/src/super/model/agent_app_domain.go b/src/super/model/agent_app_domain.go deleted file mode 100644 index baaa5df..0000000 --- a/src/super/model/agent_app_domain.go +++ /dev/null @@ -1,9 +0,0 @@ -package model - -type AgentAppDomain struct { - Domain string `json:"domain" xorm:"not null pk comment('绑定域名') VARCHAR(100)"` - AgentId int `json:"agent_id" xorm:"not null comment('代理id') index unique(IDX_UUID_TYPE) INT(10)"` - Uuid int `json:"uuid" xorm:"not null comment('对应APP ID编号') index unique(IDX_UUID_TYPE) INT(10)"` - Type string `json:"type" xorm:"not null comment('api接口域名,wap.h5域名,admin管理后台') unique(IDX_UUID_TYPE) ENUM('admin','api','wap')"` - IsSsl int `json:"is_ssl" xorm:"not null default 0 comment('是否开启ssl:0否;1是') TINYINT(255)"` -} diff --git a/src/super/model/user_wx_applet_list.go b/src/super/model/user_wx_applet_list.go index a88da82..ce2b0de 100644 --- a/src/super/model/user_wx_applet_list.go +++ b/src/super/model/user_wx_applet_list.go @@ -5,6 +5,7 @@ type UserWxAppletList struct { Name string `json:"name" xorm:"not null default '' comment('小程序名称') VARCHAR(255)"` Logo string `json:"logo" xorm:"not null default '' comment('小程序logo') VARCHAR(255)"` Appid string `json:"appid" xorm:"not null default '' comment('授权小程序appid') VARCHAR(255)"` + OriginalId string `json:"original_id" xorm:"not null default '' comment('授权小程序原始id') VARCHAR(255)"` AuthorizerRefreshToken string `json:"authorizer_refresh_token" xorm:"not null default '' comment('授权更新token') VARCHAR(255)"` IsAuth int `json:"is_auth" xorm:"not null default 0 comment('是否已授权 1已授权 0未授权') TINYINT(1)"` Uuid string `json:"uuid" xorm:"not null default '' comment('站长id') unique VARCHAR(255)"`