V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jwh199588
V2EX  ›  程序员

有大神知道 mongo 在不固定条件的情况下怎么切换吗

  •  
  •   jwh199588 · 2019-08-16 13:23:18 +08:00 · 984 次点击
    这是一个创建于 1705 天前的主题,其中的信息可能已经有所发展或是发生改变。

    { "_id" : "organization_all", "organizationGroupCaption" : "所有机构", "organizationGroupType" : "5cefb90f5b079a4e6c08c7b7", "filterRule" : [ { "_id" : "areaCode", "mappedId" : "44", "level" : 0, "expression" : "START" } ], "organizationNum" : "46575", "status" : "1", "addRules" : [ { "taskId" : "5d4bdcee8d00793dc4c41711", "respondentIds" : [ "002977050", "003634356", "000713607" ] } ], "removeRules" : [ { "taskId" : "5d4bdcee8d00793dc4c41711", "respondentIds" : [ "000713607", "000727773" ] }, { "taskId" : "5d4bdcee8d00793dc4c4171a", "respondentIds" : [ "006939537", "006939545" ] } ], "_class" : "com.gwssi.stats.organization.entity.OrganizationGroup" } 以上是数据格式 我想将 filterRule 中的数据以 Criteria criteria = Criteria.where("organizationGroupId").is(organizationGroupId); 的格式输出,但是 filterRule.expression 中的条件是不固定的,有没有什么好的办法解决呢

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1133 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 22:57 · PVG 06:57 · LAX 15:57 · JFK 18:57
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.