[用户平台][缓存]实现刷新和预热

This commit is contained in:
GoEdgeLab
2020-12-23 21:24:48 +08:00
parent abc523fa1a
commit 559e6cc7f9
7 changed files with 56 additions and 5 deletions

View File

@@ -1064,6 +1064,17 @@ func (this *ServerDAO) UpdateUserServersClusterId(userId int64, clusterId int64)
return err
}
// 查找用户的所有的服务
func (this *ServerDAO) FindAllEnabledServersWithUserId(userId int64) (result []*Server, err error) {
_, err = this.Query().
State(ServerStateEnabled).
Attr("userId", userId).
DescPk().
Slice(&result).
FindAll()
return
}
// 生成DNS Name
func (this *ServerDAO) genDNSName() (string, error) {
for {