Browse Source

support UserTag UserRecommend module

guozhaoshun 6 years ago
parent
commit
179ebf9818

+ 4 - 0
rankin-cms-web/src/main/java/cn/rankin/cmsweb/service/product/ProductService.java

@@ -7,6 +7,7 @@ import cn.rankin.data.api.product.dto.PackageDTO;
 import cn.rankin.data.api.product.dto.SupportDTO;
 import cn.rankin.data.api.product.dto.TrainingDTO;
 import cn.rankin.data.api.product.vo.*;
+import cn.rankin.data.api.user.entity.UserRecommend;
 import org.springframework.cloud.netflix.feign.FeignClient;
 import org.springframework.web.bind.annotation.*;
 
@@ -51,4 +52,7 @@ public interface ProductService {
 
     @RequestMapping(value = "/product/ids", method = RequestMethod.GET)
     APIResult<List<ProductVo>> findProductByIds(@RequestParam("id") List<String> ids);
+
+    @RequestMapping(value = "/product/ids/info", method = RequestMethod.PUT)
+    List<UserRecommend> setProductInfo(List<UserRecommend> userRecommendList);
 }

+ 7 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/controller/app/ItemController.java

@@ -32,4 +32,11 @@ public class ItemController {
         Integer pageSize = itemSearchDTO.getPageSize();
         return itemService.findPageByTagIdAndPids(merchantId, tagId, productIdList, pageNo, pageSize);
     }
+
+    @RequestMapping(value = "/pids", method = RequestMethod.POST)
+    public List<ItemVo> findItemByPids(@RequestBody List<String> productIdList, @RequestParam("merchantId") String merchantId) {
+        List<ItemVo> itemVoList = itemService.findByIds(merchantId,productIdList);
+        return itemVoList;
+    }
+
 }