api-查询所有场馆信息
This commit is contained in:
@@ -1,18 +1,26 @@
|
||||
package com.sv.netty.controller;
|
||||
|
||||
import com.sv.dto.app.VenueItem;
|
||||
import com.sv.dto.app.VenueLessonStatus;
|
||||
import com.sv.entity.Venue;
|
||||
import com.sv.service.api.VenueLessonService;
|
||||
import com.sv.service.oms.VenueService;
|
||||
import com.ydd.framework.core.common.dto.ResponseDTO;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
public class AppVenueLessonController {
|
||||
|
||||
@Resource
|
||||
private VenueService venueService;
|
||||
@Resource
|
||||
private VenueLessonService venueLessonService;
|
||||
|
||||
@@ -82,4 +90,20 @@ public class AppVenueLessonController {
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 分页查询场馆
|
||||
*/
|
||||
@RequestMapping(value = "/getVenueList", method = {RequestMethod.GET,RequestMethod.POST})
|
||||
public List<VenueItem> getVenueList() {
|
||||
List<VenueItem> venueItems = new ArrayList<>();
|
||||
List<Venue> alls = venueService.findAlls();
|
||||
if (alls!=null){
|
||||
for (Venue venue : alls){
|
||||
venueItems.add(new VenueItem(venue.getId(),venue.getName()));
|
||||
}
|
||||
}
|
||||
return venueItems;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user