mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-15 15:16:34 +08:00
修改用户所属集群的时候同时修改其下的所有服务所属集群
This commit is contained in:
@@ -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