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

Commit de8636d3 authored by jiangxiulong's avatar jiangxiulong

增加演出巡演数据

parent 6b1c570c
...@@ -160,6 +160,20 @@ public class KylinPerformancesController { ...@@ -160,6 +160,20 @@ public class KylinPerformancesController {
} }
} }
@GetMapping("roadList/{roadShowId}")
@ApiOperation("演出巡演数据")
@ApiImplicitParams({
@ApiImplicitParam(type = "path", dataType = "String", name = "roadShowId", value = "巡演id", required = true),
})
public ResponseDto<List<KylinPerformanceVo>> roadList(@PathVariable("roadShowId") String roadShowId) {
List<KylinPerformanceVo> result = kylinPerformancesService.roadList(roadShowId);
if (result != null) {
return ResponseDto.success(result);
} else {
return ResponseDto.failure("获取演出详情失败");
}
}
@GetMapping("partner/{performancesId}") @GetMapping("partner/{performancesId}")
@ApiOperation("场次票种") @ApiOperation("场次票种")
@ApiImplicitParams({ @ApiImplicitParams({
......
...@@ -162,6 +162,11 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM ...@@ -162,6 +162,11 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
return performancesInfo; return performancesInfo;
} }
public List<KylinPerformanceVo> roadList(String roadShowId) {
List<KylinPerformanceVo> performancesList = dataUtils.getRoadList(roadShowId);
return performancesList;
}
public HashMap<String, Object> ticketTimesPartner(String performancesId, Integer isAgent) { public HashMap<String, Object> ticketTimesPartner(String performancesId, Integer isAgent) {
KylinPerformanceVo vo = dataUtils.getPerformanceVo(performancesId); KylinPerformanceVo vo = dataUtils.getPerformanceVo(performancesId);
......
...@@ -149,13 +149,7 @@ public class DataUtils { ...@@ -149,13 +149,7 @@ public class DataUtils {
if (redisUtil.hasKey(KylinRedisConst.PERFORMANCES + performanceId)) { if (redisUtil.hasKey(KylinRedisConst.PERFORMANCES + performanceId)) {
} else { } else {
KylinPerformanceVo performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)), KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName()); KylinPerformanceVo performanceData = mongoTemplate.findOne(Query.query(Criteria.where("performancesId").is(performanceId)), KylinPerformanceVo.class, KylinPerformanceVo.class.getSimpleName());
List<KylinPerformanceVo> roadList = new ArrayList();
if (null != performanceData.getRoadShowId() && Integer.parseInt(performanceData.getRoadShowId()) > 0) {
roadList = dataUtils.getRoadList(performanceData.getRoadShowId());
}
redisUtil.set(KylinRedisConst.PERFORMANCES + performanceId, performanceData); redisUtil.set(KylinRedisConst.PERFORMANCES + performanceId, performanceData);
performanceData.setRoadList(roadList); // 不一起存到演出详情
} }
return (KylinPerformanceVo) redisUtil.get(KylinRedisConst.PERFORMANCES + performanceId); return (KylinPerformanceVo) redisUtil.get(KylinRedisConst.PERFORMANCES + performanceId);
} }
......
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