use of io.github.tesla.ops.filter.dto.FilterRouteDto in project tesla by linking12.
the class FilterRouteController method list.
@Log("查询路由")
@RequiresPermissions("filter:route:route")
@GetMapping("/list")
@ResponseBody
public PageDO<RouteVo> list(@RequestParam Map<String, Object> params) {
Query query = new Query(params);
PageDO<FilterRouteDto> pageDto = routeService.queryList(query);
PageDO<RouteVo> pageVo = new PageDO<>();
pageVo.setTotal(pageDto.getTotal());
List<FilterRouteDto> zuulDtos = pageDto.getRows();
List<RouteVo> vos = Lists.newArrayListWithCapacity(zuulDtos.size());
for (FilterRouteDto zuulDto : zuulDtos) {
vos.add(RouteVo.buildRouteVo(zuulDto));
}
pageVo.setRows(vos);
return pageVo;
}
use of io.github.tesla.ops.filter.dto.FilterRouteDto in project tesla by linking12.
the class FilterRouteController method edit.
@RequiresPermissions("filter:route:edit")
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, Model model) {
FilterRouteDto zuulDto = routeService.get(id);
RouteVo zuulVo = RouteVo.buildRouteVo(zuulDto);
model.addAttribute("route", zuulVo);
return prefix + "/edit";
}
use of io.github.tesla.ops.filter.dto.FilterRouteDto in project tesla by linking12.
the class RouteVo method buildRouteDto.
public FilterRouteDto buildRouteDto() {
FilterRouteDto routeDto = new FilterRouteDto();
routeDto.setRouteId(this.routeId);
routeDto.setFromPath(this.fromPath);
routeDto.setServiceId(this.serviceId);
routeDto.setRpc(this.rpc);
routeDto.setToHostport(this.toHostport);
routeDto.setToPath(this.toPath);
routeDto.setServiceName(this.serviceName);
routeDto.setMethodName(this.methodName);
routeDto.setServiceGroup(this.serviceGroup);
routeDto.setServiceVersion(this.serviceVersion);
routeDto.setInputParam(this.inputParam);
return routeDto;
}
Aggregations