收藏
回答

_.or([data1,data2]) 咋用呢?

   db.collection('userpiecerate_work').where(_.or([{

        usercompany:app.globalData.Amyinformation[0].admincompany,

        order:true,

        tasktype:'produce',

        outsource:false,

        workshop:_.in(asd)

     },

    {

        usercompany:app.globalData.Amyinformation[0].admincompany,

        order:true,

        tasktype:'produce',

        outsource:true,

        organization:_.in(app.globalData.admin_outsource_organizationarr)

    }

    ])).count().then(res => {

})


本来以为是俩个对象满足其中一个即可被获取, 但是控制台打应出来的 有些懵逼了 打印如下:直接把俩个对象分解成许多个并列对象了

db.collection('userpiecerate_work').where(_.or([

  {

    usercompany: 'HJ'

  },

  {

    order: true

  },

  {

    tasktype: 'produce'

  },

  {

    outsource: false

  },

  {

    workshop: _.in([

      'aa',

      'bb',

      '一楼'

    ])

  },

  {

    usercompany: 'HJ'

  },

  {

    order: true

  },

  {

    tasktype: 'produce'

  },

  {

    outsource: true

  },

  {

    organization: _.in([

      'www',

      'kkk'

    ])

  }

]))

.count()

回答关注问题邀请回答
收藏
登录 后发表内容