diff --git a/biz/config/config.go b/biz/config/config.go index 8d10f8a..296924f 100644 --- a/biz/config/config.go +++ b/biz/config/config.go @@ -86,7 +86,8 @@ func (t Task) GetSql(params map[string]interface{}) string { m := regexp.MustCompile("({[a-zA-Z0-9]+})") if strings.Trim(t.Elt, " ") != "" { - wehre := m.ReplaceAllFunc([]byte(t.Elt), func(b []byte) []byte { + sql = sql + " where " + t.Elt + build := m.ReplaceAllFunc([]byte(sql), func(b []byte) []byte { field := string(b[1 : len(b)-1]) if val, ok := params[field]; ok { @@ -95,7 +96,7 @@ func (t Task) GetSql(params map[string]interface{}) string { return b }) - sql = sql + " where " + string(wehre) + sql = string(build) } if strings.Trim(t.Order, " ") != "" {