Tp6 使用mongo 查询字段存在且不为空
$myWhere[] = ["code","=", 203];//中间必须有=
$myWhere[] = ['request_time', '>=', new \MongoDB\BSON\UTCDateTime(($start+8*3600) * 1000)];
$myWhere[] = ["goods","<>",[]];//goods字段不为空
Db::connect(Config::get('mongo'))->table('colum_name')
->where("goods","not null")//goods字段存在
->where($myWhere)->count();