修改SQL对比算法

This commit is contained in:
刘祥超
2020-11-16 23:30:47 +08:00
parent 1c703dd013
commit e76ba5cc6b
21 changed files with 588 additions and 1512 deletions

View File

@@ -862,7 +862,7 @@ func (this *ServerDAO) createEvent() error {
return SharedSysEventDAO.CreateEvent(NewServerChangeEvent())
}
// 查询当前服务的ClusterId
// 查询当前服务的集群ID
func (this *ServerDAO) FindServerClusterId(serverId int64) (int64, error) {
return this.Query().
Pk(serverId).
@@ -870,6 +870,14 @@ func (this *ServerDAO) FindServerClusterId(serverId int64) (int64, error) {
FindInt64Col(0)
}
// 查询服务的DNS名称
func (this *ServerDAO) FindServerDNSName(serverId int64) (string, error) {
return this.Query().
Pk(serverId).
Result("dnsName").
FindStringCol("")
}
// 生成DNS Name
func (this *ServerDAO) genDNSName() (string, error) {
for {