记得上下班打卡 | git大法好,push需谨慎

Commit 9b24e704 authored by 胡佳晨's avatar 胡佳晨

资金排序

parent 16e02e47
...@@ -899,7 +899,8 @@ public class GoblinMongoUtils { ...@@ -899,7 +899,8 @@ public class GoblinMongoUtils {
Aggregation.project("spuId", "skuPriceActual"), Aggregation.project("spuId", "skuPriceActual"),
Aggregation.group("spuId") Aggregation.group("spuId")
.first("spuId").as("spuId") .first("spuId").as("spuId")
.sum("skuPriceActual").as("skuPriceActual") .sum("skuPriceActual").as("skuPriceActual"),
Aggregation.sort(Sort.by(Sort.Order.desc("spuId")))
); );
AggregationResults<GoblinOrderLogVo> outputType = mongoTemplate.aggregate(aggregation, GoblinOrderLogVo.class.getSimpleName(), GoblinOrderLogVo.class); AggregationResults<GoblinOrderLogVo> outputType = mongoTemplate.aggregate(aggregation, GoblinOrderLogVo.class.getSimpleName(), GoblinOrderLogVo.class);
List<GoblinOrderLogVo> dataList = new ArrayList(outputType.getMappedResults()); List<GoblinOrderLogVo> dataList = new ArrayList(outputType.getMappedResults());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment