Commit 71aad640 by ping.wu

StoreItemClient与ProductClient合并

parent d2e9408b
......@@ -5,8 +5,8 @@ import cn.freemud.demo.entities.bo.product.GetProductStock;
import cn.freemud.demo.entities.bo.product.GetRequiredProductListBO;
import cn.freemud.entities.dto.GetProductStockRequestDto;
import cn.freemud.entities.dto.RequiredProductRequest;
import cn.freemud.entities.dto.product.ValidateShopProductRequest;
import cn.freemud.utils.BeanUtil;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
import ma.glasnost.orika.MapperFacade;
import org.springframework.stereotype.Component;
......
package cn.freemud.demo.adapter.manager;
import cn.freemud.demo.entities.bo.product.ProductStockBO;
import cn.freemud.demo.entities.bo.goods.ValiadShopProductBO;
import cn.freemud.demo.entities.bo.goods.ProductBO;
import cn.freemud.demo.entities.bo.goods.ValiadShopProductBO;
import cn.freemud.demo.entities.bo.product.ProductStockBO;
import cn.freemud.entities.dto.GetMenuResponseDto;
import cn.freemud.entities.dto.GetProductStockResponseDto;
import cn.freemud.entities.dto.product.ValiadShopProductResponse;
import cn.freemud.utils.BeanUtil;
import com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO;
import com.freemud.application.sdk.api.productcenter.response.valid.ValiadShopProductResponse;
import ma.glasnost.orika.MapperFacade;
import org.springframework.stereotype.Component;
......
package cn.freemud.demo.manager.product;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.demo.entities.bo.goods.ValidateShopProductRequestBO;
import cn.freemud.demo.adapter.manager.ProductBO2DTOAdapter;
import cn.freemud.demo.adapter.manager.ProductDTO2BOAdapter;
import cn.freemud.demo.entities.bo.goods.GetProductBO;
import cn.freemud.demo.entities.bo.goods.GetProductBySkuIdResponseBO;
import cn.freemud.demo.entities.bo.goods.ProductBO;
import cn.freemud.demo.entities.bo.goods.ValiadShopProductBO;
import cn.freemud.demo.entities.bo.goods.*;
import cn.freemud.demo.entities.bo.product.GetProductBySkuIdBO;
import cn.freemud.demo.entities.bo.product.GetProductStock;
import cn.freemud.demo.entities.bo.product.GetRequiredProductListBO;
import cn.freemud.demo.entities.bo.product.ProductStockBO;
import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.product.ValiadShopProductResponse;
import cn.freemud.entities.dto.product.ValidateShopProductRequest;
import cn.freemud.enums.ResponseResult;
import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.ItemService;
import cn.freemud.service.impl.AssortmentSdkService;
import cn.freemud.service.thirdparty.ProductClient;
import cn.freemud.service.thirdparty.StockClient;
import cn.freemud.service.thirdparty.StoreItemClient;
import com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO;
import com.freemud.application.sdk.api.productcenter.response.valid.ValiadShopProductResponse;
import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
@Service("KgdProductService")
public class KgdProductServiceImpl implements ProductService {
......@@ -54,8 +50,8 @@ public class KgdProductServiceImpl implements ProductService {
@Autowired
private StockClient stockClient;
@Autowired
private StoreItemClient storeItemClient;
// @Autowired
// private StoreItemClient storeItemClient;
@Autowired
......@@ -112,7 +108,7 @@ public class KgdProductServiceImpl implements ProductService {
ValidateShopProductRequest validateShopProductRequest = productBO2DTOAdapter.convert2ValidateShopProductRequest(validateShopProductRequestBO);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(validateShopProductRequest);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = productClient.validateShopProduct(validateShopProductRequest);
if (null == valiadProductResponse || !Objects.equals(com.freemud.application.sdk.api.productcenter.constant.ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null) {
return null;
......
......@@ -30,5 +30,7 @@ public class ValidateShopProductType {
private List<Integer> validateStatuses;
private Integer validatePrice = 1;
private Integer validateAttribute = 1;
// 兼容0正常原价和1商品券买套餐,区别:商品券买套餐的套餐商品只包含固定搭配。不包含可选商品,为1时去除可选商品的校验
private Integer isCouponMarkUpSetMeal;
}
......@@ -9,7 +9,7 @@ import cn.freemud.entities.vo.CartGoods;
import cn.freemud.entities.vo.ShoppingCartGoodsBaseResponseVo;
import cn.freemud.enums.ResponseResult;
import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.service.thirdparty.ProductClient;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.log.LogThreadLocal;
......@@ -49,7 +49,7 @@ import java.util.stream.Collectors;
public class AssortmentSdkService {
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
@Value("${mccafe.partner.id}")
private String mcCafePartnerId;
......
......@@ -21,6 +21,9 @@ import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.demo.manager.coupon.Finals;
import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.coupon.CouponAvailableRespDto;
import cn.freemud.entities.dto.product.ValiadShopProductResponse;
import cn.freemud.entities.dto.product.ValidateShopProductRequest;
import cn.freemud.entities.dto.product.ValidateShopProductType;
import cn.freemud.entities.vo.*;
import cn.freemud.entities.vo.coupon.CouponAvailableReqVo;
import cn.freemud.entities.vo.coupon.CouponStateVo;
......@@ -36,13 +39,8 @@ import cn.freemud.service.thirdparty.*;
import cn.freemud.utils.BarcodeUtil;
import cn.freemud.utils.PropertyConvertUtil;
import cn.freemud.utils.RedisUtil;
import com.alibaba.fastjson.JSON;
import com.freemud.application.sdk.api.log.ErrorLog;
import com.freemud.application.sdk.api.productcenter.constant.ResponseConstant;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType;
import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO;
import com.freemud.application.sdk.api.productcenter.response.valid.ValiadShopProductResponse;
import com.freemud.application.sdk.api.util.SignUtil;
import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum;
import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl;
......@@ -108,7 +106,7 @@ public class CouponServiceImpl implements CouponService {
// @Autowired
// private CardBinMCCafeClient cardBinMCCafeClient;
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
@Autowired
private StoreItemAdapter storeItemAdapter;
@Autowired
......@@ -790,7 +788,7 @@ public class CouponServiceImpl implements CouponService {
}
// 校验商品可用时间
ValidateShopProductRequest request = getValidateShopProductRequest(productsVo, requestDto);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
if (null == valiadProductResponse || !Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null || CollectionUtils.isEmpty(valiadProductResponse.getData().getSuccessList())) {
return null;
......@@ -968,7 +966,7 @@ public class CouponServiceImpl implements CouponService {
}
// 校验商品可用时间
ValidateShopProductRequest request = getValidateShopProductRequest(productsVo, requestDto);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
if (null == valiadProductResponse || !Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null || CollectionUtils.isEmpty(valiadProductResponse.getData().getSuccessList())) {
return null;
......@@ -1029,7 +1027,7 @@ public class CouponServiceImpl implements CouponService {
// 校验商品可用时间
ValidateShopProductRequest request = getValidateShopProductRequest(productsVo, requestDto);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
if (null == valiadProductResponse || !Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null || CollectionUtils.isEmpty(valiadProductResponse.getData().getSuccessList())) {
return null;
......@@ -1079,7 +1077,7 @@ public class CouponServiceImpl implements CouponService {
// 校验商品可用时间
ValidateShopProductRequest request = getValidateShopProductRequest(productsVo, requestDto);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
if (null == valiadProductResponse || !Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null || CollectionUtils.isEmpty(valiadProductResponse.getData().getSuccessList())) {
return null;
......@@ -1406,7 +1404,7 @@ public class CouponServiceImpl implements CouponService {
}
// 校验商品可用时间
ValidateShopProductRequest request = getValidateShopProductRequest(productsVo, requestDto);
ProductResponseDTO<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
ProductBaseResponse<ValiadShopProductResponse> valiadProductResponse = storeItemClient.validateShopProduct(request);
if (null == valiadProductResponse || !Objects.equals(ResponseConstant.SUCCESS_RESPONSE_CODE, valiadProductResponse.getErrcode())
|| valiadProductResponse.getData() == null || CollectionUtils.isEmpty(valiadProductResponse.getData().getSuccessList())) {
return null;
......
......@@ -26,8 +26,8 @@ import cn.freemud.enums.ResponseResult;
import cn.freemud.enums.YesOrNoEnum;
import cn.freemud.redis.RedisCache;
import cn.freemud.service.ItemService;
import cn.freemud.service.thirdparty.ProductClient;
import cn.freemud.service.thirdparty.StockClient;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.utils.ResponseUtil;
import cn.freemud.utils.Sha1Util;
import com.google.common.collect.Lists;
......@@ -48,7 +48,7 @@ public class ItemServiceImpl implements ItemService {
private final Integer RESPONSE_SUCCESS_CODE = 100;
private static Gson gson = new Gson();
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
@Autowired
private StoreItemAdapter storeItemAdapter;
@Autowired
......
......@@ -107,7 +107,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
@Autowired
private ActivityAdapter activityAdapter;
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
@Autowired
private ActivityClient activityClient;
@Autowired
......
......@@ -3,8 +3,7 @@ package cn.freemud.service.thirdparty;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.ProductBaseResponse;
import cn.freemud.entities.dto.RequiredProductRequest;
import cn.freemud.entities.dto.*;
import cn.freemud.entities.dto.product.ValiadShopProductResponse;
import cn.freemud.entities.dto.product.ValidateShopProductRequest;
import org.springframework.cloud.openfeign.FeignClient;
......@@ -40,4 +39,48 @@ public interface ProductClient {
@IgnoreFeignLogAnnotation(logMessage = "validateShopProductAboutReason",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName = ResponseCodeKeyConstant.ERR_MSG)
ProductBaseResponse<ValiadShopProductResponse> validateShopProductAboutReason(@RequestBody ValidateShopProductRequest request);
/**
* 获取门店特定时间段菜单分类
*/
@PostMapping(value = "/Menu/GetMenu")
@IgnoreFeignLogAnnotation(logMessage = "getMenuCategory",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
GetMenuResponseDto getMenuCategory(@RequestBody GetMenuCategoryInfoDto getMenuCategoryInfoDto);
/**
* 根据spu或单品ID查询菜单
* 根据商品id查询门店特定时间段菜单
*/
@PostMapping(value = "/Menu/GetMenuByIds")
@IgnoreFeignLogAnnotation(logMessage = "getMenuCategoryByIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetMenuByIdsResponseDto getMenuCategoryByIds(@RequestBody GetMenuCategoryByIdsDto getMenuCategoryByIdsDto);
/**
* 获取商品的详细信息
*/
@PostMapping("/Shop/ListProductInfoByIdList")
@IgnoreFeignLogAnnotation(logMessage = "listProductInfos",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto);
/**
* 根据skuid查询spu信息
* @return
*/
@PostMapping("/Product/GetSpectionProductBySkuId")
@IgnoreFeignLogAnnotation(logMessage = "getSpuIdsBySkuIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductListDto getSpuIdsBySkuIds(@RequestBody GetSpuIdsBySkuIdsDto requestDto);
/**
* 校验商品可用性
*/
@PostMapping("Shop/ValidateShopProduct")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductBaseResponse<ValiadShopProductResponse> validateShopProduct(@RequestBody ValidateShopProductRequest request);
/**
* 校验商品在当前门店是否可售
*/
@PostMapping("/Shop/validateShopContainProduct")
@IgnoreFeignLogAnnotation(logMessage = "validateShopContainProduct",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ValidateProductInfosDto validateShopContainProduct(@RequestBody GetValidateProductInfoDto getProductInfoDto);
}
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @Title: StoreItemClient
* @Package cn.freemud.service.thirdparty
* @Description:
* @author: liming.guo
* @date: 2018/5/16 9:39
* @version V1.0
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
package cn.freemud.service.thirdparty;
import cn.freemud.annotations.IgnoreFeignLogAnnotation;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.constant.ResponseCodeKeyConstant;
import cn.freemud.entities.dto.*;
import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO;
import com.freemud.application.sdk.api.productcenter.response.valid.ValiadShopProductResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(value = "PRODUCTSERVICE",url="${saas.storeitemclient.feign.url}")
@RequestMapping(produces = {"application/json;charset=UTF-8"})
public interface StoreItemClient {
// TODO: 21-3-31 和 PRODUCTSERVICE 待合并
/**
* 获取门店特定时间段菜单分类
*/
@PostMapping(value = "/Menu/GetMenu")
@IgnoreFeignLogAnnotation(logMessage = "getMenuCategory",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
GetMenuResponseDto getMenuCategory(@RequestBody GetMenuCategoryInfoDto getMenuCategoryInfoDto);
/**
* 根据spu或单品ID查询菜单
* 根据商品id查询门店特定时间段菜单
*/
@PostMapping(value = "/Menu/GetMenuByIds")
@IgnoreFeignLogAnnotation(logMessage = "getMenuCategoryByIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
GetMenuByIdsResponseDto getMenuCategoryByIds(@RequestBody GetMenuCategoryByIdsDto getMenuCategoryByIdsDto);
/**
* 获取商品的详细信息
*/
@PostMapping("/Shop/ListProductInfoByIdList")
@IgnoreFeignLogAnnotation(logMessage = "listProductInfos",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto);
/**
* 根据skuid查询spu信息
* @return
*/
@PostMapping("/Product/GetSpectionProductBySkuId")
@IgnoreFeignLogAnnotation(logMessage = "getSpuIdsBySkuIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductListDto getSpuIdsBySkuIds(@RequestBody GetSpuIdsBySkuIdsDto requestDto);
/**
* 校验商品可用性
*/
@PostMapping("Shop/ValidateShopProduct")
@IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ProductResponseDTO<ValiadShopProductResponse> validateShopProduct(@RequestBody ValidateShopProductRequest request);
/**
* 校验商品在当前门店是否可售
*/
@PostMapping("/Shop/validateShopContainProduct")
@IgnoreFeignLogAnnotation(logMessage = "validateShopContainProduct",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
ValidateProductInfosDto validateShopContainProduct(@RequestBody GetValidateProductInfoDto getProductInfoDto);
}
///**
// * All rights Reserved, Designed By www.freemud.cn
// *
// * @Title: StoreItemClient
// * @Package cn.freemud.service.thirdparty
// * @Description:
// * @author: liming.guo
// * @date: 2018/5/16 9:39
// * @version V1.0
// * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
// * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
// */
//package cn.freemud.service.thirdparty;
//
//import cn.freemud.annotations.IgnoreFeignLogAnnotation;
//import cn.freemud.constant.ResponseCodeConstant;
//import cn.freemud.constant.ResponseCodeKeyConstant;
//import cn.freemud.entities.dto.*;
//import com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest;
//import com.freemud.application.sdk.api.productcenter.response.ProductResponseDTO;
//import com.freemud.application.sdk.api.productcenter.response.valid.ValiadShopProductResponse;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//
//@FeignClient(value = "PRODUCTSERVICE",url="${saas.storeitemclient.feign.url}")
//@RequestMapping(produces = {"application/json;charset=UTF-8"})
//public interface StoreItemClient {
//
//
// // TODO: 21-3-31 和 PRODUCTSERVICE 待合并
//
// /**
// * 获取门店特定时间段菜单分类
// */
// @PostMapping(value = "/Menu/GetMenu")
// @IgnoreFeignLogAnnotation(logMessage = "getMenuCategory",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.STATUS_CODE,messageFieldName=ResponseCodeKeyConstant.MSG)
// GetMenuResponseDto getMenuCategory(@RequestBody GetMenuCategoryInfoDto getMenuCategoryInfoDto);
//
// /**
// * 根据spu或单品ID查询菜单
// * 根据商品id查询门店特定时间段菜单
// */
// @PostMapping(value = "/Menu/GetMenuByIds")
// @IgnoreFeignLogAnnotation(logMessage = "getMenuCategoryByIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
// GetMenuByIdsResponseDto getMenuCategoryByIds(@RequestBody GetMenuCategoryByIdsDto getMenuCategoryByIdsDto);
//
// /**
// * 获取商品的详细信息
// */
// @PostMapping("/Shop/ListProductInfoByIdList")
// @IgnoreFeignLogAnnotation(logMessage = "listProductInfos",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
// ProductInfosDto listProductInfos(@RequestBody GetProductInfoDto getProductInfoDto);
//
// /**
// * 根据skuid查询spu信息
// * @return
// */
// @PostMapping("/Product/GetSpectionProductBySkuId")
// @IgnoreFeignLogAnnotation(logMessage = "getSpuIdsBySkuIds",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
// ProductListDto getSpuIdsBySkuIds(@RequestBody GetSpuIdsBySkuIdsDto requestDto);
//
// /**
// * 校验商品可用性
// */
// @PostMapping("Shop/ValidateShopProduct")
// @IgnoreFeignLogAnnotation(excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
// ProductResponseDTO<ValiadShopProductResponse> validateShopProduct(@RequestBody ValidateShopProductRequest request);
//
// /**
// * 校验商品在当前门店是否可售
// */
// @PostMapping("/Shop/validateShopContainProduct")
// @IgnoreFeignLogAnnotation(logMessage = "validateShopContainProduct",excludeStatusCodes = {ResponseCodeConstant.RESPONSE_SUCCESS_STR},statusCodeFieldName= ResponseCodeKeyConstant.ERR_CODE,messageFieldName=ResponseCodeKeyConstant.MEG)
// ValidateProductInfosDto validateShopContainProduct(@RequestBody GetValidateProductInfoDto getProductInfoDto);
//}
package cn.freemud.client;
import cn.freemud.entities.dto.*;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.entities.dto.GetMenuCategoryInfoDto;
import cn.freemud.entities.dto.GetMenuResponseDto;
import cn.freemud.entities.dto.GetProductInfoDto;
import cn.freemud.entities.dto.ProductInfosDto;
import cn.freemud.service.thirdparty.ProductClient;
import com.google.common.collect.Lists;
import com.google.gson.Gson;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -34,7 +36,7 @@ import java.util.List;
@EnableAutoConfiguration
public class StoreItemClientTest {
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
/**
* 获取门店特定时间段菜单分类
......
......@@ -15,7 +15,7 @@ package cn.freemud.service;
import cn.freemud.entities.dto.GetProductInfoDto;
import cn.freemud.entities.dto.ProductInfosDto;
import cn.freemud.entities.vo.GetProductsVo;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.service.thirdparty.ProductClient;
import com.google.common.collect.Lists;
import org.junit.Test;
import org.junit.runner.RunWith;
......@@ -26,7 +26,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.test.context.junit4.SpringRunner;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
......@@ -41,7 +40,7 @@ public class StoreItemServiceTest {
@Autowired
private ItemService itemService;
@Autowired
private StoreItemClient storeItemClient;
private ProductClient storeItemClient;
@Test
......
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