package yb_index_tab import ( "errors" "hongze/hongze_yb/global" "hongze/hongze_yb/utils" ) // GetListByCondition 条件获取列表 func GetListByCondition(where map[string]interface{}) (list []*YbIndexTab, err error) { cond, vals, e := utils.WhereBuild(where) if e != nil { err = errors.New("系统异常,生成查询语句失败") return } err = global.DEFAULT_MYSQL.Model(YbIndexTab{}). Where(cond, vals...). Order("sort ASC"). Scan(&list).Error return }