草庐IT

FlashTRFPromotionDate

全部标签

javascript - MongoDB 检查 $switch 语句中的空字段

我正在尝试检查我的$switch语句中的空/缺失字段,但它不起作用。这是我的代码$switch:{branches:[{case:{$and:[{$gte:["$SmartPriority",6]},{$ne:["$FlashTRFPromotionDate",null]},{$ne:["$FlashTRFPromotionDate",""]},{$ne:["$FlashTRFPromotionDate",false]}]},then:"Greaterthan"}],default:"EMPTY"}即使$ne为“null”或“false”,它也不会显示EMPTY(默认值)。我的表情应该