Commit 21bc7d7a authored by xyt's avatar xyt

问题修改

parent dd6eae73
package com.ssy.lingxi.product.api.model.request.commodity;
import com.ssy.lingxi.common.model.vo.PageVO;
import lombok.Data;
import java.util.List;
......@@ -11,7 +12,7 @@ import java.util.List;
* @date 2020/6/28
*/
@Data
public class CommonCommodityPlatformRequest {
public class CommonCommodityPlatformRequest extends PageVO {
/**
* 排除的id集合
......
......@@ -15,6 +15,7 @@ import com.ssy.lingxi.product.api.model.response.commodity.CommonCommodityPlatfo
import com.ssy.lingxi.product.service.IChannelCommodityService;
import com.ssy.lingxi.product.service.ICommodityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
......@@ -111,12 +112,11 @@ public class CommodityCommonController extends BaseController {
/**
* 查询商品列表--平台(全部商品)
* @param pageVO 分页实体
* @param commodityPlatformRequest 查询条件实体
* @return
*/
@RequestMapping(value = "/getCommodityListByPlatform", method = RequestMethod.POST)
public Wrapper<PageData<CommonCommodityPlatformResponse>> getCommodityListByPlatform(PageVO pageVO, CommonCommodityPlatformRequest commodityPlatformRequest) {
public Wrapper<PageData<CommonCommodityPlatformResponse>> getCommodityListByPlatform(@RequestBody CommonCommodityPlatformRequest commodityPlatformRequest) {
CommodityDetailRequest commodityDetailRequest = this.modelMapper.map(commodityPlatformRequest, CommodityDetailRequest.class);
//商品状态
List<Integer> statusList = new ArrayList<>();
......@@ -129,6 +129,10 @@ public class CommodityCommonController extends BaseController {
shopIdList.add(shopId);
commodityDetailRequest.setShopIdList(shopIdList);
}
//分页参数
PageVO pageVO = new PageVO();
pageVO.setCurrent(commodityPlatformRequest.getCurrent());
pageVO.setPageSize(commodityPlatformRequest.getPageSize());
return Wrapper.success(commodityService.getCommodityListByPlatform(pageVO, commodityDetailRequest));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment