Преглед изворни кода

feat: 信息价用objectId排序(插入顺序)

vian пре 3 недеља
родитељ
комит
a663e4beb6
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      modules/price_info_lib/facade/index.js

+ 1 - 1
modules/price_info_lib/facade/index.js

@@ -385,7 +385,7 @@ async function getClassData(libID, areaID) {
 }
 
 async function getPriceData(classIDList) {
-    return await priceInfoItemModel.find({ classID: { $in: classIDList } }, '-_id').lean();
+    return await priceInfoItemModel.find({ classID: { $in: classIDList } }).sort({ _id: 1 }).lean();
 }
 
 const UpdateType = {