|
@@ -14,6 +14,7 @@ import ieven.server.webapp.service.alipay.AlipayService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.bson.Document;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.data.domain.Sort;
|
|
|
import org.springframework.data.mongodb.core.MongoTemplate;
|
|
|
import org.springframework.data.mongodb.core.query.Criteria;
|
|
|
import org.springframework.data.mongodb.core.query.Query;
|
|
@@ -68,9 +69,17 @@ public class AlipayController {
|
|
|
return Mapped.ERROR("未查询到明细");
|
|
|
} else {
|
|
|
Future<Long> totalFuture = this.dataService.countTotalByQuery(new Query(criteria));
|
|
|
- List<DataMap> dataMaps =
|
|
|
- this.mongoTemplate.find(
|
|
|
- (new Query(criteria)).skip(skip).limit(pageSize), DataMap.class);
|
|
|
+ List<DataMap> dataMaps = new ArrayList<>();
|
|
|
+ if (filename.contains("对手透视")) {
|
|
|
+ dataMaps =
|
|
|
+ this.mongoTemplate.find(
|
|
|
+ (new Query(criteria).with(Sort.by(Sort.Direction.DESC, "共同主端数"))).skip(skip).limit(pageSize), DataMap.class);
|
|
|
+ } else {
|
|
|
+ dataMaps =
|
|
|
+ this.mongoTemplate.find(
|
|
|
+ (new Query(criteria)).skip(skip).limit(pageSize), DataMap.class);
|
|
|
+ }
|
|
|
+
|
|
|
Long total;
|
|
|
|
|
|
try {
|
|
@@ -105,7 +114,7 @@ public class AlipayController {
|
|
|
return Mapped.ERROR("未发现明细!");
|
|
|
} else {
|
|
|
String fromFileId = oldFile.getFromFileId();
|
|
|
- Fields fields = this.mongoTemplate.findOne( new Query(Criteria.where("fileId").is(fromFileId)), Fields.class);
|
|
|
+ Fields fields = this.mongoTemplate.findOne(new Query(Criteria.where("fileId").is(fromFileId)), Fields.class);
|
|
|
Mapped mapped = Mapped.OK();
|
|
|
mapped.put("result", fields);
|
|
|
return mapped;
|