xuzhiheng 2 yıl önce
ebeveyn
işleme
00dd775386
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      src/util/utiltag.go

+ 6 - 2
src/util/utiltag.go

@@ -527,7 +527,8 @@ func Utiltags(tag map[string]interface{}) string {
 			bidamountSql.Bool.Should = append(bidamountSql.Bool.Should, sql.BidamountMust{BidamountObj: &sql.BidamountObj{Bidamount: limit}})
 		}
 		if tab.SbidamountFieldExist == 1 {
-			fqBoolObject.MustNot = append(fqBoolObject.MustNot, sql.ExistfieldsObjectMust{
+			SbidamountFieldExistBool := sql.NewEsObject{}
+			SbidamountFieldExistBool.Bool.MustNot = append(SbidamountFieldExistBool.Bool.MustNot, sql.ExistfieldsObjectMust{
 				ExistfieldsObject: &sql.ExistfieldsObject{Filter: struct {
 					Exists struct {
 						Field string `json:"field,omitempty"`
@@ -539,6 +540,7 @@ func Utiltags(tag map[string]interface{}) string {
 				},
 				},
 			})
+			bidamountSql.Bool.Should = append(bidamountSql.Bool.Should, SbidamountFieldExistBool)
 		}
 	}
 
@@ -563,7 +565,8 @@ func Utiltags(tag map[string]interface{}) string {
 			budgetSql.Bool.Should = append(budgetSql.Bool.Should, sql.BudgetMust{BudgetObj: &sql.BudgetObj{Budget: limit}})
 		}
 		if tab.SbudgetFieldExist == 1 {
-			fqBoolObject.MustNot = append(fqBoolObject.MustNot, sql.ExistfieldsObjectMust{
+			SbudgetFieldExistBool := sql.NewEsObject{}
+			SbudgetFieldExistBool.Bool.MustNot = append(SbudgetFieldExistBool.Bool.MustNot, sql.ExistfieldsObjectMust{
 				ExistfieldsObject: &sql.ExistfieldsObject{Filter: struct {
 					Exists struct {
 						Field string `json:"field,omitempty"`
@@ -575,6 +578,7 @@ func Utiltags(tag map[string]interface{}) string {
 				},
 				},
 			})
+			budgetSql.Bool.Should = append(budgetSql.Bool.Should, SbudgetFieldExistBool)
 		}
 	}