修复短信发送bug

This commit is contained in:
hoteas
2021-10-27 00:27:24 +08:00
parent 6c999990e3
commit fdab298f52
4 changed files with 26 additions and 22 deletions
+4 -5
View File
@@ -652,8 +652,10 @@ func (that *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) {
where := ""
res := make([]interface{}, 0)
length := len(k)
if length > 0 && strings.Contains(k, "[") && k[length-1] == ']' {
if k == "[#]" {
k = strings.Replace(k, "[#]", "", -1)
where += " " + ObjToStr(v) + " "
} else if length > 0 && strings.Contains(k, "[") && k[length-1] == ']' {
def := false
switch Substr(k, length-3, 3) {
@@ -791,9 +793,6 @@ func (that *HoTimeDB) varCond(k string, v interface{}) (string, []interface{}) {
}
}
} else if k == "[#]" {
k = strings.Replace(k, "[#]", "", -1)
where += " " + ObjToStr(v) + " "
} else {
//fmt.Println(reflect.ValueOf(v).Type().String())
if !strings.Contains(k, ".") {