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

Commit e4fab6bd authored by GaoHu's avatar GaoHu

修改:演出预告列表

parent a28b26ed
...@@ -368,7 +368,6 @@ public class DataUtils { ...@@ -368,7 +368,6 @@ public class DataUtils {
String redisKeyIds = KylinRedisConst.PERFORMANCES_LIST_NOTICE_IDS; String redisKeyIds = KylinRedisConst.PERFORMANCES_LIST_NOTICE_IDS;
Object obj = redisUtil.get(redisKeyIds); Object obj = redisUtil.get(redisKeyIds);
if (obj != null) { if (obj != null) {
//获取ids //获取ids
HashMap<String, Object> map = (HashMap<String, Object>) obj; HashMap<String, Object> map = (HashMap<String, Object>) obj;
List<Integer> toDayIds = (List<Integer>) map.get("toDayIds"); List<Integer> toDayIds = (List<Integer>) map.get("toDayIds");
...@@ -384,49 +383,39 @@ public class DataUtils { ...@@ -384,49 +383,39 @@ public class DataUtils {
List<GoblinGoodsSkuInfoVo> threeNftList = new ArrayList<>(); List<GoblinGoodsSkuInfoVo> threeNftList = new ArrayList<>();
List<GoblinMixDetailsVo> toDayCombinationList = new ArrayList<>(); List<GoblinMixDetailsVo> toDayCombinationList = new ArrayList<>();
List<GoblinMixDetailsVo> threeDayCombinationList = new ArrayList<>(); List<GoblinMixDetailsVo> threeDayCombinationList = new ArrayList<>();
// 固定条件 // 固定条件
if (toDayIds != null && toDayIds.size() > 0) { toDayList = getKylinPerformanceVos(toDayIds, toDayList);
Query query = new Query();
query.fields().exclude("details");
query.fields().exclude("noticeImage");
query.fields().exclude("ticketTimeList");
query.fields().exclude("describeElectronic");
query.addCriteria(Criteria.where("mid").in(toDayIds));
toDayList = mongoTemplate.find(query, KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
}
// 固定条件 // 固定条件
if (threeDayIds != null && threeDayIds.size() > 0) { threeDaysList = getKylinPerformanceVos(threeDayIds, threeDaysList);
Query queryT = new Query();
queryT.fields().exclude("details");
queryT.fields().exclude("noticeImage");
queryT.fields().exclude("ticketTimeList");
queryT.fields().exclude("describeElectronic");
queryT.addCriteria(Criteria.where("mid").in(threeDayIds));
threeDaysList = mongoTemplate.find(queryT, KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
}
//数字藏品 //数字藏品
//当天 //当天
if (toDayNftIds != null && toDayNftIds.size() > 0) { toDaysNftList = getGoblinGoodsSkuInfoVos(toDayNftIds, toDaysNftList);
Query queryToDayNft = new Query();
queryToDayNft.fields().exclude("extagVoList");
queryToDayNft.addCriteria(Criteria.where("skuId").in(toDayNftIds));
toDaysNftList = mongoTemplate.find(queryToDayNft, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
}
//三天的 //三天的
if (threeNftIds != null && threeNftIds.size() > 0) { threeNftList = getGoblinGoodsSkuInfoVos(threeNftIds, threeNftList);
Query queryThreeNft = new Query();
queryThreeNft.fields().exclude("extagVoList");
queryThreeNft.addCriteria(Criteria.where("skuId").in(threeNftIds));
threeNftList = mongoTemplate.find(queryThreeNft, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
}
//组合购 //组合购
//当天 //当天
toDayCombinationList = getGoblinMixDetailsVos(toDayCombinationIds, toDayCombinationList);
//三天
threeDayCombinationList = getGoblinMixDetailsVos(threeDayCombinationIds, threeDayCombinationList);
HashMap<String, Object> info = CollectionUtil.mapStringObject();
info.put("toDayList", toDayList);
info.put("threeDaysList", threeDaysList);
info.put("toDaysNftList", toDaysNftList);
info.put("threeNftList", threeNftList);
info.put("toDayCombinationList", toDayCombinationList);
info.put("threeDayCombinationList", threeDayCombinationList);
return info;
}
return (HashMap<String, Object>) obj;
}
private List<GoblinMixDetailsVo> getGoblinMixDetailsVos(List<String> toDayCombinationIds, List<GoblinMixDetailsVo> toDayCombinationList) {
if (toDayCombinationIds != null && toDayCombinationIds.size() > 0) { if (toDayCombinationIds != null && toDayCombinationIds.size() > 0) {
Query queryToDayCombination = new Query(); Query queryToDayCombination = new Query();
Sort sortToDayCombination = Sort.by(Sort.Direction.ASC, "saleStartTime"); Sort sortToDayCombination = Sort.by(Sort.Direction.ASC, "saleStartTime");
...@@ -446,39 +435,30 @@ public class DataUtils { ...@@ -446,39 +435,30 @@ public class DataUtils {
}); });
}); });
} }
return toDayCombinationList;
}
//三天 private List<GoblinGoodsSkuInfoVo> getGoblinGoodsSkuInfoVos(List<String> toDayNftIds, List<GoblinGoodsSkuInfoVo> toDaysNftList) {
if (threeDayCombinationIds != null && threeDayCombinationIds.size() > 0) { if (toDayNftIds != null && toDayNftIds.size() > 0) {
Query queryThreeDayCombination = new Query(); Query queryToDayNft = new Query();
Sort sortThreeDayCombination = Sort.by(Sort.Direction.ASC, "saleStartTime"); queryToDayNft.fields().exclude("extagVoList");
queryThreeDayCombination.with(sortThreeDayCombination); queryToDayNft.addCriteria(Criteria.where("skuId").in(toDayNftIds));
queryThreeDayCombination.fields().exclude("details"); toDaysNftList = mongoTemplate.find(queryToDayNft, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
queryThreeDayCombination.addCriteria(Criteria.where("mixId").in(threeDayCombinationIds));
threeDayCombinationList = mongoTemplate.find(queryThreeDayCombination, GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
threeDayCombinationList.forEach(goblinMixDetailsVo -> {
List<GoblinMixDetailsItemVo> item = goblinMixDetailsVo.getItem();
item.forEach(goblinMixDetailsItemVo ->{
Query query = new Query();
query.addCriteria(Criteria.where("skuId").is(goblinMixDetailsItemVo.getSkuId()));
GoblinGoodsSkuInfoVo one = mongoTemplate.findOne(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
if (one!=null){
goblinMixDetailsItemVo.setSkuName(one.getName());
} }
}); return toDaysNftList;
});
} }
private List<KylinPerformanceVo> getKylinPerformanceVos(List<Integer> toDayIds, List<KylinPerformanceVo> toDayList) {
HashMap<String, Object> info = CollectionUtil.mapStringObject(); if (toDayIds != null && toDayIds.size() > 0) {
info.put("toDayList", toDayList); Query query = new Query();
info.put("threeDaysList", threeDaysList); query.fields().exclude("details");
info.put("toDaysNftList", toDaysNftList); query.fields().exclude("noticeImage");
info.put("threeNftList", threeNftList); query.fields().exclude("ticketTimeList");
info.put("toDayCombinationList", toDayCombinationList); query.fields().exclude("describeElectronic");
info.put("threeDayCombinationList", threeDayCombinationList); query.addCriteria(Criteria.where("mid").in(toDayIds));
return info; toDayList = mongoTemplate.find(query, KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
} }
return (HashMap<String, Object>) obj; return toDayList;
} }
//执行脚本 //执行脚本
......
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