Selaa lähdekoodia

fix saveRemoteResource

guozhaoshun 6 vuotta sitten
vanhempi
commit
fef1be4ad4

+ 6 - 1
rankin-product-service/src/main/java/cn/rankin/productservice/controller/PosterController.java

@@ -7,6 +7,7 @@ import cn.rankin.common.utils.enums.BaseOrderEnum;
 import cn.rankin.data.api.product.dto.PosterDTO;
 import cn.rankin.data.api.product.entity.*;
 import cn.rankin.productservice.code.ProductServiceAPICode;
+import cn.rankin.productservice.repository.ProductRepository;
 import cn.rankin.productservice.service.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang.StringUtils;
@@ -29,6 +30,9 @@ public class PosterController {
     @Autowired
     private ProductService productService;
 
+    @Autowired
+    private ProductRepository productRepository;
+
     @RequestMapping(value = "/list", method = RequestMethod.GET)
     public APIResult<Page<Poster>> search(@Valid @RequestBody PosterDTO searchDTO) {
         Poster poster = new Poster();
@@ -68,7 +72,8 @@ public class PosterController {
         }
 
 
-        Product product = productService.getProduct(result.getPid());
+//        Product product = productService.find(result.getPid());
+        Product product = productRepository.findByPid(result.getPid());
         result.setProduct(product);