瀏覽代碼

修改bug

yjp 3 月之前
父節點
當前提交
1308f19cb1
共有 1 個文件被更改,包括 6 次插入3 次删除
  1. 6 3
      convenient/entity_crud/service.go

+ 6 - 3
convenient/entity_crud/service.go

@@ -335,9 +335,12 @@ func Query[O any](tableName string, orderBy string, stringFieldQueryCondition st
 							return errResponse, errors.New("字符串字段值类型错误")
 						}
 
-						queryCondition, ok := customStringFieldQueryCondition[field.FieldName]
-						if !ok {
-							queryCondition = stringFieldQueryCondition
+						queryCondition := stringFieldQueryCondition
+						if customStringFieldQueryCondition != nil {
+							custom, ok := customStringFieldQueryCondition[field.FieldName]
+							if ok {
+								queryCondition = custom
+							}
 						}
 
 						switch queryCondition {