Files
Dog-1/src/main/java/co/jp/app/controller/PetController.java

28 lines
707 B
Java
Raw Normal View History

2025-05-07 12:33:46 +09:00
package co.jp.app.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
2025-05-14 14:17:03 +09:00
import org.springframework.http.ResponseEntity;
2025-05-07 12:33:46 +09:00
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
2025-05-14 14:17:03 +09:00
import org.springframework.web.bind.annotation.RestController;
2025-05-07 12:33:46 +09:00
2025-05-14 14:17:03 +09:00
import co.jp.app.entity.PetEntity;
2025-05-07 12:33:46 +09:00
import co.jp.app.service.PetService;
2025-05-14 14:17:03 +09:00
@RestController
2025-05-07 12:33:46 +09:00
public class PetController {
@Autowired
private PetService service;
2025-05-16 13:34:43 +09:00
@GetMapping("/inuhouse")
2025-05-14 14:17:03 +09:00
public ResponseEntity<?> getListByEntities(@RequestParam List<Integer> id) {
List<PetEntity> list = service.getPetByID(id);
return ResponseEntity.ok(list);
2025-05-07 12:33:46 +09:00
}
}