|
@@ -124,14 +124,14 @@ class AdminService extends CrudService {
|
|
|
} else timeRange = this.getDefaultRange(type);
|
|
|
// 先用商店过滤下
|
|
|
if (ObjectId.isValid(shop)) {
|
|
|
- pipline.push({ $match: { shop } });
|
|
|
+ pipline.push({ $match: { 'goods.shop': shop } });
|
|
|
}
|
|
|
if (status) {
|
|
|
pipline.push({ $match: { status } });
|
|
|
}
|
|
|
// 时间格式化: create_date:日期,用来分组统计; create_time: 时间,用来过滤数据
|
|
|
pipline.push({
|
|
|
- $project: {
|
|
|
+ $addFields: {
|
|
|
create_date: { $dateToString: { date: '$meta.createdAt', ...this.pipDateFormatDateObject() } },
|
|
|
create_time: { $dateToString: { date: '$meta.createdAt', ...this.pipDateFormatTimeObject() } },
|
|
|
},
|