28 lines
707 B
Java
28 lines
707 B
Java
package co.jp.app.controller;
|
|
|
|
import java.util.List;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import co.jp.app.entity.PetEntity;
|
|
import co.jp.app.service.PetService;
|
|
|
|
@RestController
|
|
|
|
public class PetController {
|
|
|
|
@Autowired
|
|
private PetService service;
|
|
|
|
@GetMapping("/inuhouse")
|
|
public ResponseEntity<?> getListByEntities(@RequestParam List<Integer> id) {
|
|
|
|
List<PetEntity> list = service.getPetByID(id);
|
|
return ResponseEntity.ok(list);
|
|
}
|
|
}
|