You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
462 B
28 lines
462 B
package Kafka2ESDAO
|
|
|
|
import (
|
|
"dsDataex/Utils/DbUtil"
|
|
)
|
|
|
|
//数据库
|
|
var db = DbUtil.Engine
|
|
|
|
func GetTopics() (bool, []string){
|
|
|
|
sql := "SELECT datasource_code from t_dataex_datasource where delete_flag = -1 and enable_flag = 1 and datastore_type = 3"
|
|
|
|
result,err:=db.QueryString(sql)
|
|
|
|
if err==nil{
|
|
var lst []string
|
|
|
|
for no:=0;no< len(result);no++{
|
|
|
|
lst=append(lst,result[no]["datasource_code"])
|
|
}
|
|
|
|
return true,lst
|
|
}else {
|
|
return false,nil
|
|
}
|
|
} |