mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2026-01-06 07:25:48 +08:00
修改用户所属集群的时候同时修改其下的所有服务所属集群
This commit is contained in:
@@ -148,6 +148,7 @@ func (this *NodeDAO) IncreaseAllNodesLatestVersionMatch(clusterId int64) error {
|
||||
Attr("clusterId", clusterId).
|
||||
Set("latestVersion", dbs.SQL("latestVersion+1")).
|
||||
Update()
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
@@ -1055,6 +1055,15 @@ func (this *ServerDAO) CheckUserServer(serverId int64, userId int64) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// 设置一个用户下的所有服务的所属集群
|
||||
func (this *ServerDAO) UpdateUserServersClusterId(userId int64, clusterId int64) error {
|
||||
_, err := this.Query().
|
||||
Attr("userId", userId).
|
||||
Set("clusterId", clusterId).
|
||||
Update()
|
||||
return err
|
||||
}
|
||||
|
||||
// 生成DNS Name
|
||||
func (this *ServerDAO) genDNSName() (string, error) {
|
||||
for {
|
||||
|
||||
Reference in New Issue
Block a user