generated from pkg/go-template
20 lines
384 B
Go
20 lines
384 B
Go
package util
|
|
|
|
import "strings"
|
|
|
|
type QueryMap map[string]string
|
|
|
|
// GetQueryMap 根据查询条件进行sql处理
|
|
func GetQueryMap(s string) QueryMap {
|
|
m := make(map[string]string)
|
|
if s != "" {
|
|
s = string([]byte(s)[1 : len([]byte(s))-1])
|
|
for _, v := range strings.Split(s, ",") {
|
|
split := strings.Split(v, "=")
|
|
m[split[0]] = split[1]
|
|
}
|
|
}
|
|
m["is_del"] = "0"
|
|
return m
|
|
}
|