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.

21 lines
528 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package GPSqlDAO
import (
"dsDataex/Utils/CacheUtil"
"html"
)
func GetQuerybyCode(queryCode string) (bool, string, map[string]interface{}, error) {
sql := "SELECT id from t_report_sqlquery where delete_flag = -1 and enable_flag = 1 and query_code = '" + html.EscapeString(queryCode) + "'"
//通过SQL获取带缓存的数据
list, count, _ := CacheUtil.Page(sql, 10, 0)
if count == 1 {
return true, "数据获取成功", list[0], nil
} else {
return false, "数据获取失败queryID不存在", nil, nil
}
}