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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
29
entity/src/main/java/com/sv/dto/app/VenueItem.java
Normal file
29
entity/src/main/java/com/sv/dto/app/VenueItem.java
Normal file
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user