diff --git a/api/src/main/java/com/sv/netty/controller/AppVenueLessonController.java b/api/src/main/java/com/sv/netty/controller/AppVenueLessonController.java index 0f0cdc3..568a77f 100644 --- a/api/src/main/java/com/sv/netty/controller/AppVenueLessonController.java +++ b/api/src/main/java/com/sv/netty/controller/AppVenueLessonController.java @@ -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 getVenueList() { + List venueItems = new ArrayList<>(); + List alls = venueService.findAlls(); + if (alls!=null){ + for (Venue venue : alls){ + venueItems.add(new VenueItem(venue.getId(),venue.getName())); + } + } + return venueItems; + } + } diff --git a/entity/src/main/java/com/sv/dto/app/VenueItem.java b/entity/src/main/java/com/sv/dto/app/VenueItem.java new file mode 100644 index 0000000..a27602c --- /dev/null +++ b/entity/src/main/java/com/sv/dto/app/VenueItem.java @@ -0,0 +1,29 @@ +package com.sv.dto.app; + +import java.io.Serializable; + +public class VenueItem implements Serializable { + private Integer venueId; + private String venueName; + + public VenueItem(Integer venueId, String venueName) { + this.venueId = venueId; + this.venueName = venueName; + } + + public Integer getVenueId() { + return venueId; + } + + public void setVenueId(Integer venueId) { + this.venueId = venueId; + } + + public String getVenueName() { + return venueName; + } + + public void setVenueName(String venueName) { + this.venueName = venueName; + } +}