|
@@ -3,8 +3,9 @@ package data_manage
|
|
import (
|
|
import (
|
|
"eta_gn/eta_api/global"
|
|
"eta_gn/eta_api/global"
|
|
"eta_gn/eta_api/utils"
|
|
"eta_gn/eta_api/utils"
|
|
- "github.com/rdlucklib/rdluck_tools/paging"
|
|
|
|
"time"
|
|
"time"
|
|
|
|
+
|
|
|
|
+ "github.com/rdlucklib/rdluck_tools/paging"
|
|
)
|
|
)
|
|
|
|
|
|
type EdbInfoRelation struct {
|
|
type EdbInfoRelation struct {
|
|
@@ -42,7 +43,7 @@ func GetEdbInfoRelationByRelationIds(ids []int) (items []*EdbInfoRelation, err e
|
|
// GetEdbInfoRelationByReferObjectId 查询直接引用的指标ID
|
|
// GetEdbInfoRelationByReferObjectId 查询直接引用的指标ID
|
|
func GetEdbInfoRelationByReferObjectId(referObjectId int, referObjectType int) (items []*EdbInfoRelation, err error) {
|
|
func GetEdbInfoRelationByReferObjectId(referObjectId int, referObjectType int) (items []*EdbInfoRelation, err error) {
|
|
o := global.DmSQL["data"]
|
|
o := global.DmSQL["data"]
|
|
- msql := ` SELECT * FROM edb_info_relation WHERE refer_object_id =? and relation_type=0 AND refer_object_type=? GROUP BY edb_info_id `
|
|
|
|
|
|
+ msql := ` SELECT * FROM edb_info_relation WHERE refer_object_id =? and relation_type=0 AND refer_object_type=? GROUP BY edb_info_id,edb_info_relation_id, source, edb_name, edb_code, refer_object_id, refer_object_type, refer_object_sub_type,create_time,modify_time,relation_time,relation_type, root_edb_info_id, child_edb_info_id,relation_code,parent_relation_id `
|
|
err = o.Raw(msql, referObjectId, referObjectType).Find(&items).Error
|
|
err = o.Raw(msql, referObjectId, referObjectType).Find(&items).Error
|
|
|
|
|
|
return
|
|
return
|