0

从下面的 json 我想根据用户请求参数检索国家、类别等的数据。我该怎么做?下面我用于 mongo 存储库的代码片段

@Query(value = "{ 'offeringInfo.offeringId' : ?0}", fields = "{'fields':1}")
Offering findOfferingByFields(String offeringId, String fields);

{ 
  "_id" : "PMRS774616-PICSD215", 
  "offeringInfo" : { 
    "service" : "HBOGO", 
    "mindOfferingId" : "PMRS774616", 
    "offeringType" : "FEATURE", 
    "offeringId" : "PMRS774616-PICSD215" 
  }, 
  "categories" : [ "Late Night Movies" ], 
  "country" : { 
    "name" : "US", 
    "isoCode" : "840", 
    "startDate" : "2015-09-09T06:00:00.000-04:00", 
    "endDate" : "2016-12-31T00:00:00.000-05:00" 
  }, 
  "photos" : [ ]
}
4

0 回答 0