package data_manage // SaveRelationEdbRefreshStatusReq // @Description: 设置被引用的指标的刷新状态 type SaveRelationEdbRefreshStatusReq struct { Source int `description:"来源"` /*ClassifyId string `description:"分类id,支持多选,用英文,隔开"` SysUserId string `description:"操作人id,支持多选,用英文,隔开"` Frequency string `description:"频度,支持多选,用英文,隔开"` Status string `description:"状态,枚举值:启用、暂停"` EdbInfoType int `description:"1计算指标,2预测指标"` Keyword string `description:"关键字"` IsSelectAll bool `description:"是否选择所有指标"`*/ EdbSelectIdList []int `description:"选择的指标id列表"` ModifyStatus string `description:"需要更改的状态,枚举值:启用、暂停"` } // 查询指标引用列表 /*func GetEdbInfoRelationList(condition string, pars []interface{}, addFieldStr, joinTableStr, orderBy string, startSize, pageSize int) (total int, items []*BaseRelationEdbInfo, err error) { o := orm.NewOrmUsingDB("data") // 数量汇总 totalSql := ` SELECT count(1) FROM edb_info e LEFT JOIN ( SELECT count(edb_info_id) as relation_num, edb_info_id, max(relation_time) as relation_time FROM edb_info_relation GROUP BY edb_info_id) r on e.edb_info_id=r.edb_info_id ` if joinTableStr != "" { totalSql += joinTableStr } totalSql += ` WHERE 1=1 ` if condition != "" { totalSql += condition } err = o.Raw(totalSql, pars).QueryRow(&total) if err != nil { return } fieldStr := ` e.edb_info_id, e.classify_id,e.edb_code,e.edb_name,e.sys_user_id,e.sys_user_real_name,e.frequency,e.no_update as is_stop, r.relation_num, r.relation_time ` + addFieldStr // 列表数据 sql := ` SELECT ` + fieldStr + ` from edb_info e LEFT JOIN ( SELECT count(edb_info_id) as relation_num, edb_info_id, max(relation_time) as relation_time FROM edb_info_relation GROUP BY edb_info_id) r on e.edb_info_id=r.edb_info_id ` if joinTableStr != "" { sql += joinTableStr } sql += ` WHERE 1=1 ` if condition != "" { sql += condition } if orderBy != "" { sql += ` ORDER BY ` + orderBy } else { sql += ` ORDER BY edb_info_id ASC ` } sql += ` LIMIT ?,? ` _, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items) return }*/