kobe6258 7 сар өмнө
parent
commit
9c0c4e18c7

+ 2 - 2
common/component/es/es.go

@@ -279,7 +279,7 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
 					"must": []map[string]interface{}{
 						{
 							"range": map[string]interface{}{
-								"mediaId": map[string]interface{}{
+								req.RangeColumn: map[string]interface{}{
 									"gte": req.Min,
 									"lte": req.Max,
 								},
@@ -287,7 +287,7 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
 						},
 						{
 							"term": map[string]interface{}{
-								"mediaType": "video",
+								req.Condition: req.ConditionValue,
 							},
 						},
 					},