소스 검색

修改bug

yjp 1 개월 전
부모
커밋
ff2f54562f
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      framework/core/infrastructure/database/clause/condition.go
  2. 1 1
      framework/core/infrastructure/database/sql/conditions.go

+ 1 - 1
framework/core/infrastructure/database/clause/condition.go

@@ -17,7 +17,7 @@ func NewConditions() *Conditions {
 
 func (conditions *Conditions) AddCondition(query string, args ...any) *Conditions {
 	conditions.queries = append(conditions.queries, query)
-	conditions.args = append(conditions.args, args)
+	conditions.args = append(conditions.args, args...)
 	return conditions
 }
 

+ 1 - 1
framework/core/infrastructure/database/sql/conditions.go

@@ -25,7 +25,7 @@ func NewConditions() *Conditions {
 // - 数据库条件
 func (conditions *Conditions) AddCondition(query string, args ...any) *Conditions {
 	conditions.queries = append(conditions.queries, query)
-	conditions.args = append(conditions.args, args)
+	conditions.args = append(conditions.args, args...)
 	return conditions
 }