|
@@ -81,7 +81,8 @@ class GoodsService extends CrudService {
|
|
|
if (parseInt(limit)) pipline.push({ $limit: parseInt(limit) });
|
|
|
pipline.push({ $sort: { createdAt: -1 } });
|
|
|
const list = await this.goodsModel.aggregate(pipline);
|
|
|
- return list;
|
|
|
+ const total = await this.goodsModel.count();
|
|
|
+ return { list, total };
|
|
|
}
|
|
|
|
|
|
async indexActTagsGoods() {
|