|
@@ -65,11 +65,11 @@ public class ProductServiceImpl implements ProductService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ApiResult getProductById(String productId) {
|
|
|
+ public ApiResult getProductById(Long productId) {
|
|
|
if(Objects.isNull(productId)){
|
|
|
return ApiResult.error(ApiCode.PARAMETER_ERROR);
|
|
|
}
|
|
|
- Product product = productRepository.findById(productId);
|
|
|
+ Product product = productRepository.find(productId);
|
|
|
if(product ==null){
|
|
|
return ApiResult.error(ApiCode.NOT_FOUND);
|
|
|
}
|