Browse Source

修改bug

yjp 3 tháng trước cách đây
mục cha
commit
1308f19cb1
1 tập tin đã thay đổi với 6 bổ sung3 xóa
  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 {