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