|
@@ -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;
|