Collector

This commit is contained in:
insanity 2016-11-16 17:26:33 +09:00
parent 6c8ea6bcdf
commit 70abe8569c
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ public class CollectorController {
private CollectorRepository repository; private CollectorRepository repository;
@RequestMapping(value = "/collector/{productId}", method = RequestMethod.GET) @RequestMapping(value = "/collector/{productId}", method = RequestMethod.GET)
public Collector get(@PathVariable(value = "productId") long productId) { public Collector get(@PathVariable(value = "productId") String productId) {
return repository.findByPID(productId); return repository.findByPID(productId);
} }

View File

@ -12,5 +12,5 @@ import org.springframework.data.rest.core.annotation.RepositoryRestResource;
public interface CollectorRepository extends JpaRepository<Collector, Long> { public interface CollectorRepository extends JpaRepository<Collector, Long> {
@Query("SELECT c FROM Collector c where c.productId = :productId") @Query("SELECT c FROM Collector c where c.productId = :productId")
Collector findByPID(@Param("productId") Long productId); Collector findByPID(@Param("productId") String productId);
} }