Browse Source

change ItemController package

guozhaoshun 6 years ago
parent
commit
68e668299a

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

@@ -1,4 +1,4 @@
-package cn.rankin.productservice.controller.app;
+package cn.rankin.productservice.controller;
 
 import cn.rankin.common.utils.api.model.APIResult;
 import cn.rankin.common.utils.api.page.Page;
@@ -11,19 +11,19 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 @RestController
-@RequestMapping(value = "/app/item")
+@RequestMapping(value = "")
 public class ItemController {
 
     @Autowired
     private ItemService itemService;
 
-    @RequestMapping(value = "/ids", method = RequestMethod.POST)
+    @RequestMapping(value = "/app/item/ids", method = RequestMethod.POST)
     public APIResult<List<ItemVo>> findByIds(@RequestBody List<String> productIdList, @RequestParam("merchantId") String merchantId) {
         List<ItemVo> itemVoList = itemService.findByIds(merchantId, productIdList);
         return APIResult.ok(itemVoList);
     }
 
-    @RequestMapping(value = "/ids/page", method = RequestMethod.POST)
+    @RequestMapping(value = "/app/item/ids/page", method = RequestMethod.POST)
     public APIResult<Page<ItemVo>> findPage(@RequestBody ItemSearchDTO itemSearchDTO) {
         String merchantId = itemSearchDTO.getMerchantId();
         String tagId = itemSearchDTO.getTagId();
@@ -33,7 +33,7 @@ public class ItemController {
         return itemService.findPageByTagIdAndPids(merchantId, tagId, productIdList, pageNo, pageSize);
     }
 
-    @RequestMapping(value = "/pids", method = RequestMethod.POST)
+    @RequestMapping(value = "/item/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;

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

@@ -11,8 +11,8 @@ import org.springframework.web.bind.annotation.*;
 import java.util.List;
 
 @RestController
-@RequestMapping(value = "/app/item")
-public class ItemController {
+@RequestMapping(value = "/v0/app/item")
+public class ItemControllerV0 {
 
     @Autowired
     private ItemService itemService;