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

Commit 673dcef3 authored by 胡佳晨's avatar 胡佳晨

演出列表修改

parent cbda0e9d
...@@ -279,7 +279,8 @@ public class MongoMerchantUtils { ...@@ -279,7 +279,8 @@ public class MongoMerchantUtils {
performanceIdList = permissionVoList.stream().map(MerchantAuthorizationPerformanceVo::getPerformanceId).collect(Collectors.toList()); performanceIdList = permissionVoList.stream().map(MerchantAuthorizationPerformanceVo::getPerformanceId).collect(Collectors.toList());
} }
//查询演出 //查询演出
Criteria criteria = performanceIdList == null ? Criteria.where("performancesId").ne(null) : Criteria.where("performancesId").in(performanceIdList); Criteria criteriaPerformanceId = performanceIdList == null ? Criteria.where("performancesId").ne(null) : Criteria.where("performancesId").in(performanceIdList);
Criteria criteria = Criteria.where("performancesId").ne(null);
if (performancePartnerListParam.getTitle() != null && !performancePartnerListParam.getTitle().isEmpty()) { if (performancePartnerListParam.getTitle() != null && !performancePartnerListParam.getTitle().isEmpty()) {
criteria = criteria.and("title").regex(".*" + performancePartnerListParam.getTitle() + ".*"); criteria = criteria.and("title").regex(".*" + performancePartnerListParam.getTitle() + ".*");
} }
...@@ -291,13 +292,12 @@ public class MongoMerchantUtils { ...@@ -291,13 +292,12 @@ public class MongoMerchantUtils {
criteria = criteria.and("appStatus").is(performancePartnerListParam.getStatus()); criteria = criteria.and("appStatus").is(performancePartnerListParam.getStatus());
} }
if (performancePartnerListParam.getTimeStart() != null && !performancePartnerListParam.getTimeStart().isEmpty()) { if (performancePartnerListParam.getTimeStart() != null && !performancePartnerListParam.getTimeStart().isEmpty()) {
criteria = criteria.and("timeStart").gte(performancePartnerListParam.getTimeStart()).and("timeStart").lte(performancePartnerListParam.getTimeEnd()); criteria = criteria.and("timeStart").gte(performancePartnerListParam.getTimeStart()).lte(performancePartnerListParam.getTimeEnd());
} }
} }
} }
List<KylinPerformanceVo> performanceVos = mongoTemplate.find( List<KylinPerformanceVo> performanceVos = mongoTemplate.find(
Query.query(new Criteria().orOperator(criteria, Criteria.where("merchantId").is(performancePartnerListParam.getMerchantId()))).with(Sort.by(orderBy, performancePartnerListParam.getOrderItem())), Query.query(new Criteria().andOperator(criteria).orOperator(criteriaPerformanceId, Criteria.where("merchantId").is(performancePartnerListParam.getMerchantId()))).with(Sort.by(orderBy, performancePartnerListParam.getOrderItem())),
// Query.query(criteria.orOperator(Criteria.where("merchantId").is(performancePartnerListParam.getMerchantId()))).with(Sort.by(orderBy, performancePartnerListParam.getOrderItem())),
KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName()); KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
//查询销量 //查询销量
Aggregation aggregation = Aggregation.newAggregation( Aggregation aggregation = Aggregation.newAggregation(
......
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