mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-25 08:20:26 +08:00
修改SQL对比算法
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user