|
|
@@ -18,7 +18,7 @@ const SMS = require('../../users/models/sms');
|
|
|
const sms = new SMS();
|
|
|
|
|
|
async function getLibs(query) {
|
|
|
- return await priceInfoLibModel.find(query).sort({ period: 1 }).lean();
|
|
|
+ return await priceInfoLibModel.find(query).sort({ period: -1 }).lean();
|
|
|
}
|
|
|
|
|
|
// 获取费用定额的信息价库
|
|
|
@@ -28,7 +28,7 @@ async function getAllLibs() {
|
|
|
const rst = [];
|
|
|
Object.keys(groupData).forEach(key => {
|
|
|
const items = groupData[key];
|
|
|
- items.sort((a, b) => a.period.localeCompare(b.period));
|
|
|
+ items.sort((a, b) => b.period.localeCompare(a.period));
|
|
|
rst.push(...items);
|
|
|
});
|
|
|
return rst;
|