Commit 466e9416 by 何文超

接口增加enterpriseId

parent 8e352461
......@@ -56,7 +56,7 @@ public class GoodsBrandController {
}
}
}
return findBrandListByParams(currentPage, pageSize,goodsDomainId, search);
return findBrandListByParams(currentPage, pageSize,goodsDomainId, search, Constant.TEST_ENTERPRISE_ID);
}
......@@ -70,12 +70,12 @@ public class GoodsBrandController {
*/
@RequestMapping("/goods-brand-list-for-rights")
public RestResponse goodsBrandListForRights(int pageSize, int currentPage, String search, Long goodsDomainId) {
return findBrandListByParams(currentPage, pageSize,goodsDomainId, search);
return findBrandListByParams(currentPage, pageSize,goodsDomainId, search, Constant.TEST_ENTERPRISE_ID);
}
private RestResponse findBrandListByParams(int currentPage, int pageSize, Long goodsDomainId, String search) {
private RestResponse findBrandListByParams(int currentPage, int pageSize, Long goodsDomainId, String search, Integer enterpriseId) {
List<Long> branIdList = new ArrayList<>();
ServiceResponse<Page<BrandDTO>> serviceResponse = brandApiService.findBrandPage(currentPage, pageSize, goodsDomainId, search, branIdList, SortType.sortDescType);
ServiceResponse<Page<BrandDTO>> serviceResponse = brandApiService.findBrandPage(currentPage, pageSize, goodsDomainId, search, branIdList, SortType.sortDescType, enterpriseId);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......
package com.gic.plug.web.controller.goods;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.goods.api.dto.CategoryDTO;
import com.gic.goods.api.dto.ErrorCode;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.CategoryVO;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.goods.api.dto.CategoryDTO;
import com.gic.goods.api.dto.ErrorCode;
import com.gic.goods.api.service.CategoryApiService;
import java.util.List;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.CategoryVO;
@RestController
public class GoodsCategoryController {
......@@ -33,7 +33,7 @@ public class GoodsCategoryController {
if (goodsDomainId == null || StringUtils.isBlank(channelCode)) {
return RestResponse.failure(ErrorCode.UNKNOW_ERROR.getCode(), "参数不全");
}
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listParentAll(channelCode, goodsDomainId);
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listParentAll(channelCode, goodsDomainId, null, Constant.TEST_ENTERPRISE_ID);
List<CategoryDTO> result = serviceResponse.getResult();
if (CollectionUtils.isEmpty(result)) {
return RestResponse.success();
......@@ -52,7 +52,7 @@ public class GoodsCategoryController {
if (specParentId == null || StringUtils.isBlank(channelCode)) {
return RestResponse.failure(ErrorCode.UNKNOW_ERROR.getCode(), "参数不全");
}
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listChildAll(channelCode, specParentId);
ServiceResponse<List<CategoryDTO>> serviceResponse = categoryApiSerivce.listChildAll(channelCode, specParentId, null, Constant.TEST_ENTERPRISE_ID);
List<CategoryDTO> result = serviceResponse.getResult();
if (CollectionUtils.isEmpty(result)) {
return RestResponse.success();
......
package com.gic.plug.web.controller.goods;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.curator.shaded.com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.goods.api.dto.GoodsSkuDTO;
import com.gic.goods.api.service.GoodsApiService;
import com.gic.goods.api.util.Constant;
import com.gic.plug.web.vo.goods.GoodsVO;
import com.gic.search.business.api.constant.enums.OperateEnum;
import com.gic.search.business.api.dto.DynamicSearchDTO;
......@@ -13,16 +25,6 @@ import com.gic.search.business.api.dto.ESResponseQueryBatchDTO;
import com.gic.search.business.api.service.EsBusinessOperaApiService;
import com.gic.search.business.api.utils.QueryConditionAssemblyUtil;
import com.gic.widget.screening.api.service.EsScreeningSearchService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.curator.shaded.com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @ClassName: GoodsTagController
......@@ -82,7 +84,7 @@ public class GoodsController {
}
//2、获取商品ID信息
List<Long> goodsIds = goodsVOS.stream().mapToLong(GoodsVO::getGoodsId).boxed().collect(Collectors.toList());
ServiceResponse<List<GoodsSkuDTO>> skuResponse = goodsApiService.listSkuByGoods(goodsIds);
ServiceResponse<List<GoodsSkuDTO>> skuResponse = goodsApiService.listSku(goodsIds, channelCode, Constant.TEST_ENTERPRISE_ID);
if (!skuResponse.isSuccess()) {
return RestResponse.failure(skuResponse.getCode(), skuResponse.getMessage());
......
......@@ -12,7 +12,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.contants.SortType;
import com.gic.commons.util.PageHelperUtils;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.goods.api.dto.PropertyDTO;
import com.gic.goods.api.dto.FullPropertyDTO;
import com.gic.goods.api.dto.PropertyValueDTO;
import com.gic.goods.api.service.PropertyApiService;
import com.gic.goods.api.service.PropertyValueApiService;
......@@ -38,7 +38,7 @@ public class GoodsPropertyController {
arrayList.add(Constant.PROPERTY_TYPE_PERCENT);
arrayList.add(Constant.PROPERTY_TYPE_NUM);
arrayList.add(Constant.PROPERTY_TYPE_REAL_NUM);
ServiceResponse<Page<PropertyDTO>> serviceResponse = propertyApiService.findPropertyExceptType(currentPage, pageSize, goodsDomainId, arrayList,search);
ServiceResponse<Page<FullPropertyDTO>> serviceResponse = propertyApiService.findPropertyExceptType(currentPage, pageSize, goodsDomainId, arrayList,search, Constant.TEST_ENTERPRISE_ID);
if (!serviceResponse.isSuccess()) {
return RestResponse.failure(serviceResponse.getCode(), serviceResponse.getMessage());
}
......
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