[
{
"_id": "6738846ca674f4d0a393d125",
"add_date": 1731757163864,
"category_id": 2,
"department": "665b321cee97ef58965c557e",
"goods_id": "672f015f189f8669f3a99123",
"goods_name": "而在吗测试",
"last_modify_date": 1731757163864,
"market_price": 0,
"model": "cbe8423dbc2f8d419b1cd90e",
"model_in": "2222222222222222222222222222",
"model_out": "333333333333333333333333333",
"orderStatus": 1
}
]
db.collection('opendb-mall-sku').where(${new RegExp('2', 'i')}.test(model)
).get()
1 个回复
DCloud_uniCloud_VK
你再试下,是否只有刚好24位的不能模糊查询
已知24位会转ObjectId,此时不是字符串,故不能模糊查询