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

Commit 385f27e6 authored by jiangxiulong's avatar jiangxiulong

adam演出列表

parent e4e0ac27
package com.liquidnet.service.feign.kylin.api; package com.liquidnet.service.feign.kylin.api;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.kylin.dto.vo.PerformanceVo;
import feign.hystrix.FallbackFactory; import feign.hystrix.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient; import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@Component @Component
@FeignClient(name = "liquidnet-service-kylin", @FeignClient(name = "liquidnet-service-kylin",
contextId = "", path = "", contextId = "", path = "",
fallback = FallbackFactory.Default.class) fallback = FallbackFactory.Default.class)
public interface FeignKylinClient { public interface FeignKylinPerformanceClient {
// 演出列表 // 演出列表
@GetMapping(value = "performanceList") @GetMapping(value = "performance/list")
ResponseDto<PerformanceVo> performanceList(@RequestParam List<String> performancesIds) { ResponseDto<List<PerformanceVo>> performanceList(@RequestParam String... performancesIds);
//条件
Query query = new Query();
query.addCriteria(Criteria.where("performancesId").in(performancesIds));
List<PerformanceVo> list = mongoTemplate.find(query, PerformanceVo.class, PerformanceVo.class.getSimpleName());
return list;
}
} }
...@@ -79,6 +79,14 @@ public class KylinPerformancesController { ...@@ -79,6 +79,14 @@ public class KylinPerformancesController {
return ResponseDto.success(result); return ResponseDto.success(result);
} }
@GetMapping(value = "list")
@ApiOperation("根据多个演出id获取演出列表-Adam")
public ResponseDto<List<PerformanceVo>> performanceList(@RequestParam String... performancesIds) {
List<PerformanceVo> result = kylinPerformancesService.performanceList(performancesIds);
return ResponseDto.success(result);
}
@GetMapping("noticeList") @GetMapping("noticeList")
@ApiOperation("演出预告列表") @ApiOperation("演出预告列表")
public ResponseDto<HashMap<String, Object>> noticeList() { public ResponseDto<HashMap<String, Object>> noticeList() {
......
...@@ -279,4 +279,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM ...@@ -279,4 +279,13 @@ public class KylinPerformancesServiceImpl extends ServiceImpl<KylinPerformancesM
return ticketTimesList; return ticketTimesList;
} }
public List<PerformanceVo> performanceList(String... performancesIds) {
Query query = new Query();
query.addCriteria(Criteria.where("performancesId").in(performancesIds));
List<PerformanceVo> list = mongoTemplate.find(query, PerformanceVo.class, PerformanceVo.class.getSimpleName());
return list;
}
} }
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