Commit 87a1db7f by hanghang.wang

围餐

parent 08b2af8f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.1.33-RELEASE</version> <version>2.1.33_whh-RELEASE</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
<version>3.2.6.RELEASE</version> <version>3.3.12-SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -31,6 +31,10 @@ public class BaseCreateOrderRequest extends BaseConfig { ...@@ -31,6 +31,10 @@ public class BaseCreateOrderRequest extends BaseConfig {
*/ */
private String shopName; private String shopName;
/** /**
* 门店英文名称
*/
private String shopNameEn;
/**
* 用户ID * 用户ID
*/ */
private String userId; private String userId;
...@@ -213,6 +217,9 @@ public class BaseCreateOrderRequest extends BaseConfig { ...@@ -213,6 +217,9 @@ public class BaseCreateOrderRequest extends BaseConfig {
private SendPoint point; private SendPoint point;
//门店英文名称
private String storeNameEn;
} }
@Data @Data
......
package com.freemud.sdk.api.assortment.order.request.order;
import lombok.Data;
/**
* @author wanghanghang
* @title: CreateOrderProductExpandRequest
* @projectName order-group
* @description: 订单商品信息字段拓展表
* @date 2021/3/3上午10:43
*/
@Data
public class CreateOrderProductExpandRequest {
/**订单主键id**/
private Long orderId;
/**订单item主键id**/
private Long orderItemId;
/**商品英文名**/
private String productForeignName;
/**
* 商品规格英文名称
*/
private String specificationForeignName;
}
...@@ -28,6 +28,11 @@ public class CreateOrderProductRequest extends BaseConfig { ...@@ -28,6 +28,11 @@ public class CreateOrderProductRequest extends BaseConfig {
* 商品名称 * 商品名称
*/ */
private String productName; private String productName;
/**商品英文名**/
private String productForeignName;
/** /**
* 商品数量 * 商品数量
*/ */
...@@ -40,6 +45,11 @@ public class CreateOrderProductRequest extends BaseConfig { ...@@ -40,6 +45,11 @@ public class CreateOrderProductRequest extends BaseConfig {
* 商品规格名称 * 商品规格名称
*/ */
private String specificationName; private String specificationName;
/**
* 商品规格英文名称
*/
private String specificationForeignName;
/** /**
* 第三方商品编号,商品服务唯一 * 第三方商品编号,商品服务唯一
*/ */
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>assortment-shoppingcart-sdk</artifactId> <artifactId>assortment-shoppingcart-sdk</artifactId>
<version>1.2.3.RELEASE</version> <version>1.2.3_whh.RELEASE</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<artifactId>productcenter-sdk</artifactId> <artifactId>productcenter-sdk</artifactId>
<version>3.7.6-SNAPSHOT</version> <version>4.0.2.SNAPSHOT</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -40,6 +40,7 @@ import java.util.stream.Collectors; ...@@ -40,6 +40,7 @@ import java.util.stream.Collectors;
public class ShoppingCartAdapter { public class ShoppingCartAdapter {
private static final String ATTRIBUTEID = "attributeId"; private static final String ATTRIBUTEID = "attributeId";
private static final String ATTRIBUTENAME = "attributeName"; private static final String ATTRIBUTENAME = "attributeName";
private static final String ATTRIBUTEFOREIGNNAME = "attributeForeignName";
public GetProductInfoRequest convertGetProductInfoRequest(String partnerId, String storeId, List<String> goodsIds, String trackingNo) { public GetProductInfoRequest convertGetProductInfoRequest(String partnerId, String storeId, List<String> goodsIds, String trackingNo) {
GetProductInfoRequest request = new GetProductInfoRequest(); GetProductInfoRequest request = new GetProductInfoRequest();
...@@ -280,8 +281,12 @@ public class ShoppingCartAdapter { ...@@ -280,8 +281,12 @@ public class ShoppingCartAdapter {
if(!"早餐啡常搭".equals(cartGoods.getName()) && !"早餐啡常搭".equals(cartGoods.getSkuName()) && !"早餐啡常搭".equals(cartGoods.getSpuName()) if(!"早餐啡常搭".equals(cartGoods.getName()) && !"早餐啡常搭".equals(cartGoods.getSkuName()) && !"早餐啡常搭".equals(cartGoods.getSpuName())
&& !"啡常搭".equals(cartGoods.getName()) && !"啡常搭".equals(cartGoods.getSkuName()) && !"啡常搭".equals(cartGoods.getSpuName())) { && !"啡常搭".equals(cartGoods.getName()) && !"啡常搭".equals(cartGoods.getSkuName()) && !"啡常搭".equals(cartGoods.getSpuName())) {
cartGoods.setName(spuProduct.getName()); cartGoods.setName(spuProduct.getName());
cartGoods.setForeignName(spuProduct.getForeignName());
cartGoods.setSpuName(spuProduct.getName()); cartGoods.setSpuName(spuProduct.getName());
cartGoods.setSpuForeignName(spuProduct.getForeignName());
cartGoods.setSkuName(isSkuProduct ? skuProduct.getProductName() : spuProduct.getName()); cartGoods.setSkuName(isSkuProduct ? skuProduct.getProductName() : spuProduct.getName());
cartGoods.setSkuForeignName(isSkuProduct ? skuProduct.getForeignProductName() : spuProduct.getForeignName());
} }
cartGoods.setSpecProductId(attributes.get(ATTRIBUTEID)); cartGoods.setSpecProductId(attributes.get(ATTRIBUTEID));
cartGoods.setPic(spuProduct.getPicture()); cartGoods.setPic(spuProduct.getPicture());
...@@ -292,17 +297,29 @@ public class ShoppingCartAdapter { ...@@ -292,17 +297,29 @@ public class ShoppingCartAdapter {
cartGoods.setMemberDiscount(spuProduct.getMemberDiscountResult()); cartGoods.setMemberDiscount(spuProduct.getMemberDiscountResult());
cartGoods.setClassificationId(spuProduct.getCategory()); cartGoods.setClassificationId(spuProduct.getCategory());
cartGoods.setClassificationName(spuProduct.getCategoryName()); cartGoods.setClassificationName(spuProduct.getCategoryName());
cartGoods.setClassificationForeignName(spuProduct.getCategoryName());
cartGoods.setTax(spuProduct.getTax()); cartGoods.setTax(spuProduct.getTax());
cartGoods.setTaxId(spuProduct.getTaxId()); cartGoods.setTaxId(spuProduct.getTaxId());
String skuSpecName = ""; String skuSpecName = "";
String skuForeignSpecName = "";
if (isSkuProduct && CollectionUtils.isNotEmpty(skuProduct.getSkuSpecValues())) { if (isSkuProduct && CollectionUtils.isNotEmpty(skuProduct.getSkuSpecValues())) {
List<String> skuSpecValus = skuProduct.getSkuSpecValues().stream().map(p -> p.getSpecValue()).collect(Collectors.toList()); List<String> skuSpecValus = skuProduct.getSkuSpecValues().stream().map(p -> p.getSpecValue()).collect(Collectors.toList());
skuSpecName = StringUtils.join(skuSpecValus, "/"); skuSpecName = StringUtils.join(skuSpecValus, "/");
} }
if (isSkuProduct && CollectionUtils.isNotEmpty(skuProduct.getSkuSpecValues())) {
List<String> skuSpecValus = skuProduct.getSkuSpecValues().stream().map(p -> p.getForeignSpecValue()).collect(Collectors.toList());
skuForeignSpecName = StringUtils.join(skuSpecValus, "/");
}
String attributeName = attributes.get(ATTRIBUTENAME) == null ? "" : attributes.get(ATTRIBUTENAME); String attributeName = attributes.get(ATTRIBUTENAME) == null ? "" : attributes.get(ATTRIBUTENAME);
String attributeForeignName = attributes.get(ATTRIBUTEFOREIGNNAME) == null ? "" : attributes.get(ATTRIBUTEFOREIGNNAME);
//购物车小标题 //购物车小标题
cartGoods.setSubName(StringUtils.isNotEmpty(skuSpecName) && StringUtils.isNotEmpty(attributeName) ? cartGoods.setSubName(StringUtils.isNotEmpty(skuSpecName) && StringUtils.isNotEmpty(attributeName) ?
skuSpecName + "/" + attributeName : skuSpecName + attributeName); skuSpecName + "/" + attributeName : skuSpecName + attributeName);
//购物车英文小标题
cartGoods.setSubForeignName(StringUtils.isNotEmpty(skuForeignSpecName) && StringUtils.isNotEmpty(attributeForeignName) ?
skuForeignSpecName + "/" + attributeForeignName : skuForeignSpecName + attributeForeignName);
if (isSetMealProduct) { if (isSetMealProduct) {
if (CollectionUtils.isNotEmpty(cartGoods.getProductComboList())) { if (CollectionUtils.isNotEmpty(cartGoods.getProductComboList())) {
...@@ -382,6 +399,7 @@ public class ShoppingCartAdapter { ...@@ -382,6 +399,7 @@ public class ShoppingCartAdapter {
if (detail == null) continue; if (detail == null) continue;
CartGoods.MaterialGoods material = new CartGoods.MaterialGoods(); CartGoods.MaterialGoods material = new CartGoods.MaterialGoods();
material.setSpuName(detail.getProductName()); material.setSpuName(detail.getProductName());
material.setSpuForeignName(detail.getForeignProductName());
material.setSpuId(detail.getProductId()); material.setSpuId(detail.getProductId());
//行单价 \ 行总价 //行单价 \ 行总价
material.setFinalPrice(detail.getProductFinalPrice().longValue()); material.setFinalPrice(detail.getProductFinalPrice().longValue());
...@@ -478,9 +496,13 @@ public class ShoppingCartAdapter { ...@@ -478,9 +496,13 @@ public class ShoppingCartAdapter {
// 设置商品详情 // 设置商品详情
Map<String, String> attributes = getAttributesNew(comboxGoods.getExtra()); Map<String, String> attributes = getAttributesNew(comboxGoods.getExtra());
comboxGoods.setName(isComboxGoods ? productComboType.getProductName() : groupDetailType.getProductName()); comboxGoods.setName(isComboxGoods ? productComboType.getProductName() : groupDetailType.getProductName());
comboxGoods.setForeignName(isComboxGoods ? productComboType.getForeignProductName() : groupDetailType.getForeignProductName());
comboxGoods.setSpuName(comboxGoods.getName()); comboxGoods.setSpuName(comboxGoods.getName());
comboxGoods.setSpuForeignName(comboxGoods.getForeignName());
comboxGoods.setSpecProductId(attributes.get(ATTRIBUTEID)); comboxGoods.setSpecProductId(attributes.get(ATTRIBUTEID));
comboxGoods.setSubName(attributes.get(ATTRIBUTENAME)); comboxGoods.setSubName(attributes.get(ATTRIBUTENAME));
comboxGoods.setSubForeignName(attributes.get(ATTRIBUTEFOREIGNNAME));
comboxGoods.setPic(isComboxGoods ? productComboType.getPicture() : groupDetailType.getPicture()); comboxGoods.setPic(isComboxGoods ? productComboType.getPicture() : groupDetailType.getPicture());
comboxGoods.setOriginalPrice(isComboxGoods ? productComboType.getFinalPrice().longValue() : groupDetailType.getProductFinalPrice().longValue()); comboxGoods.setOriginalPrice(isComboxGoods ? productComboType.getFinalPrice().longValue() : groupDetailType.getProductFinalPrice().longValue());
comboxGoods.setOriginalAmount(comboxGoods.getOriginalPrice() * comboxGoods.getQty()); comboxGoods.setOriginalAmount(comboxGoods.getOriginalPrice() * comboxGoods.getQty());
......
...@@ -73,11 +73,6 @@ public class CartGoods { ...@@ -73,11 +73,6 @@ public class CartGoods {
* 单位 * 单位
*/ */
private String unit; private String unit;
/**
* 商品券code
*/
private String couponCode;
/** /**
* 是否是月享卡商品 * 是否是月享卡商品
*/ */
...@@ -91,6 +86,10 @@ public class CartGoods { ...@@ -91,6 +86,10 @@ public class CartGoods {
*/ */
private int isSunnyCoupon; private int isSunnyCoupon;
/** /**
* 商品券code
*/
private String couponCode;
/**
* 商品券门槛金额 * 商品券门槛金额
*/ */
private Long couponThresholdAmount; private Long couponThresholdAmount;
...@@ -102,6 +101,12 @@ public class CartGoods { ...@@ -102,6 +101,12 @@ public class CartGoods {
* 商品券名称 * 商品券名称
*/ */
private String couponName; private String couponName;
/**
* 购物车商品券商品价格
*/
private Long couponProductPrice;
private String spuId; private String spuId;
private String skuId; private String skuId;
/** /**
...@@ -146,9 +151,18 @@ public class CartGoods { ...@@ -146,9 +151,18 @@ public class CartGoods {
private String name; private String name;
/** /**
* 购物车一行商品英文名称
*/
private String foreignName;
/**
* 商品的spuName * 商品的spuName
*/ */
private String spuName; private String spuName;
/**
* 商品的spuForeignName
*/
private String spuForeignName;
/** /**
* 商品的skuName * 商品的skuName
...@@ -156,10 +170,19 @@ public class CartGoods { ...@@ -156,10 +170,19 @@ public class CartGoods {
private String skuName; private String skuName;
/** /**
* skuForeignName
*/
private String skuForeignName;
/**
* 购物车一行商品的副名称 * 购物车一行商品的副名称
*/ */
private String subName; private String subName;
/** /**
* 购物车一行商品的英文副名称
*/
private String subForeignName;
/**
* 商品图片URL * 商品图片URL
*/ */
private String pic; private String pic;
...@@ -198,6 +221,7 @@ public class CartGoods { ...@@ -198,6 +221,7 @@ public class CartGoods {
* 统计分类名称 * 统计分类名称
*/ */
private String classificationName; private String classificationName;
private String classificationForeignName;
/** /**
* 是否限制库存 * 是否限制库存
* 用于创建订单时,是否扣减库存 * 用于创建订单时,是否扣减库存
...@@ -252,6 +276,8 @@ public class CartGoods { ...@@ -252,6 +276,8 @@ public class CartGoods {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
} }
@Data @Data
...@@ -265,6 +291,8 @@ public class CartGoods { ...@@ -265,6 +291,8 @@ public class CartGoods {
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 麦咖啡特定属性入机code * 麦咖啡特定属性入机code
*/ */
...@@ -297,6 +325,7 @@ public class CartGoods { ...@@ -297,6 +325,7 @@ public class CartGoods {
private String spuId; private String spuId;
private String skuId; private String skuId;
private String skuName; private String skuName;
private String skuForeignName;
/** /**
* 所有属性attributeId的拼接 * 所有属性attributeId的拼接
*/ */
...@@ -337,15 +366,17 @@ public class CartGoods { ...@@ -337,15 +366,17 @@ public class CartGoods {
* 购物车一行商品的名称 * 购物车一行商品的名称
*/ */
private String name; private String name;
private String foreignName;
/** /**
* 商品的spuName * 商品的spuName
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 购物车一行商品的副名称 * 购物车一行商品的副名称
*/ */
private String subName; private String subName;
private String subForeignName;
/** /**
* 商品图片URL * 商品图片URL
*/ */
...@@ -432,6 +463,7 @@ public class CartGoods { ...@@ -432,6 +463,7 @@ public class CartGoods {
* 加料名称 * 加料名称
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 购物车一行商品的现单价 * 购物车一行商品的现单价
*/ */
...@@ -451,5 +483,10 @@ public class CartGoods { ...@@ -451,5 +483,10 @@ public class CartGoods {
* 麦咖啡入机键位 * 麦咖啡入机键位
*/ */
private String customerCode; private String customerCode;
/**
* 数量
*/
private Integer qty;
} }
} }
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.1.32-RELEASE</version> <version>2.1.33_whh-RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
<!-- 商户门店sdk --> <!-- 商户门店sdk -->
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>3.2.6.RELEASE</version> <version>3.3.12-SNAPSHOT</version>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -648,6 +648,7 @@ public class OrderAdapter { ...@@ -648,6 +648,7 @@ public class OrderAdapter {
createOrderDto.setShopId(createOrderVo.getShopId()); createOrderDto.setShopId(createOrderVo.getShopId());
createOrderDto.setThirdShopId(createOrderVo.getThirdShopId()); createOrderDto.setThirdShopId(createOrderVo.getThirdShopId());
createOrderDto.setShopName(createOrderVo.getStoreName()); createOrderDto.setShopName(createOrderVo.getStoreName());
createOrderDto.setShopNameEn(createOrderVo.getStoreNameEn());
createOrderDto.setUserId(createOrderVo.getUserId()); createOrderDto.setUserId(createOrderVo.getUserId());
createOrderDto.setUserName(createOrderVo.getUserName()); createOrderDto.setUserName(createOrderVo.getUserName());
createOrderDto.setPhone(createOrderVo.getMobile()); createOrderDto.setPhone(createOrderVo.getMobile());
...@@ -2396,8 +2397,6 @@ public class OrderAdapter { ...@@ -2396,8 +2397,6 @@ public class OrderAdapter {
}); });
createOrderProductDemoDto.setMaterialProduct(materialProducts); createOrderProductDemoDto.setMaterialProduct(materialProducts);
} }
createOrderProductDemoDto.setProductType(cartGoodsDetailDto.getProductType()); createOrderProductDemoDto.setProductType(cartGoodsDetailDto.getProductType());
return createOrderProductDemoDto; return createOrderProductDemoDto;
} }
...@@ -2478,8 +2477,11 @@ public class OrderAdapter { ...@@ -2478,8 +2477,11 @@ public class OrderAdapter {
CreateOrderProductRequest createOrderProductDemoDto = new CreateOrderProductRequest(); CreateOrderProductRequest createOrderProductDemoDto = new CreateOrderProductRequest();
createOrderProductDemoDto.setProductId(StringUtils.isNotBlank(cartGoodsDetailDto.getSpuId()) ? cartGoodsDetailDto.getSpuId() : cartGoodsDetailDto.getSkuId()); createOrderProductDemoDto.setProductId(StringUtils.isNotBlank(cartGoodsDetailDto.getSpuId()) ? cartGoodsDetailDto.getSpuId() : cartGoodsDetailDto.getSkuId());
createOrderProductDemoDto.setProductName(cartGoodsDetailDto.getSpuName()); createOrderProductDemoDto.setProductName(cartGoodsDetailDto.getSpuName());
createOrderProductDemoDto.setProductForeignName(cartGoodsDetailDto.getSpuForeignName());
createOrderProductDemoDto.setSpecification(cartGoodsDetailDto.getSkuId()); createOrderProductDemoDto.setSpecification(cartGoodsDetailDto.getSkuId());
createOrderProductDemoDto.setSpecificationName(cartGoodsDetailDto.getSkuName()); createOrderProductDemoDto.setSpecificationName(cartGoodsDetailDto.getSkuName());
createOrderProductDemoDto.setSpecificationForeignName(cartGoodsDetailDto.getSkuForeignName());
createOrderProductDemoDto.setPrice(cartGoodsDetailDto.getOriginalPrice()); createOrderProductDemoDto.setPrice(cartGoodsDetailDto.getOriginalPrice());
createOrderProductDemoDto.setSalePrice(cartGoodsDetailDto.getOriginalPrice()); createOrderProductDemoDto.setSalePrice(cartGoodsDetailDto.getOriginalPrice());
createOrderProductDemoDto.setTotalDiscountAmount(cartGoodsDetailDto.getTotalDiscountAmount() == null ? 0 : cartGoodsDetailDto.getTotalDiscountAmount().longValue()); createOrderProductDemoDto.setTotalDiscountAmount(cartGoodsDetailDto.getTotalDiscountAmount() == null ? 0 : cartGoodsDetailDto.getTotalDiscountAmount().longValue());
......
...@@ -14,6 +14,8 @@ public class OrderProductAddInfo { ...@@ -14,6 +14,8 @@ public class OrderProductAddInfo {
* 属性名称 多糖/冷/常温 * 属性名称 多糖/冷/常温
*/ */
private String attributeNames; private String attributeNames;
private String attributeForeignName;
/** /**
* 活动商品集合 * 活动商品集合
*/ */
......
...@@ -40,6 +40,8 @@ public class ProductListDto { ...@@ -40,6 +40,8 @@ public class ProductListDto {
*/ */
private Long finalPrice; private Long finalPrice;
private String name; private String name;
private String foreignName;
/** /**
* 原始价格 单位分 * 原始价格 单位分
*/ */
...@@ -94,6 +96,7 @@ public class ProductListDto { ...@@ -94,6 +96,7 @@ public class ProductListDto {
private Long finalPrice; private Long finalPrice;
private Long originalPrice; private Long originalPrice;
private String productName; private String productName;
private String productForeignName;
private Integer productType; private Integer productType;
private Integer sequence; private Integer sequence;
private String skuCode; private String skuCode;
...@@ -109,6 +112,7 @@ public class ProductListDto { ...@@ -109,6 +112,7 @@ public class ProductListDto {
private Integer sequence; private Integer sequence;
private String specId; private String specId;
private String specName; private String specName;
private String specForeignName;
private String specValue; private String specValue;
private String specValueId; private String specValueId;
} }
...@@ -121,6 +125,8 @@ public class ProductListDto { ...@@ -121,6 +125,8 @@ public class ProductListDto {
private Integer sequence; private Integer sequence;
private String specId; private String specId;
private String specName; private String specName;
private String specForeignName;
private List<SpecificationGroupBean.SpecValueVo> specValueVos; private List<SpecificationGroupBean.SpecValueVo> specValueVos;
@NoArgsConstructor @NoArgsConstructor
...@@ -138,6 +144,8 @@ public class ProductListDto { ...@@ -138,6 +144,8 @@ public class ProductListDto {
public static class ProductLabelNameListBean { public static class ProductLabelNameListBean {
private String id; private String id;
private String name; private String name;
private String foreignName;
private String partnerId; private String partnerId;
List<?> productList; List<?> productList;
private String storeId; private String storeId;
...@@ -157,6 +165,8 @@ public class ProductListDto { ...@@ -157,6 +165,8 @@ public class ProductListDto {
* 属性名称 * 属性名称
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 属性类型 * 属性类型
*/ */
......
...@@ -14,6 +14,7 @@ public class StoreDeliveryInfoDto { ...@@ -14,6 +14,7 @@ public class StoreDeliveryInfoDto {
private String storeId; private String storeId;
private String storeName; private String storeName;
private String storeNameEn;
/** /**
* 门店是否可配送 * 门店是否可配送
*/ */
......
...@@ -30,6 +30,8 @@ public class AttributeValue { ...@@ -30,6 +30,8 @@ public class AttributeValue {
private String attributeId; private String attributeId;
private String attributeValue; private String attributeValue;
private String attributeForeignValue;
/** /**
* 属性ID * 属性ID
*/ */
......
...@@ -23,6 +23,7 @@ public class GroupDetail { ...@@ -23,6 +23,7 @@ public class GroupDetail {
private Long productFinalPrice; private Long productFinalPrice;
private String productId; private String productId;
private String productName; private String productName;
private String productForeignName;
private Long productPrice; private Long productPrice;
private Integer sequence; private Integer sequence;
private Integer status; private Integer status;
......
...@@ -29,6 +29,8 @@ public class ProductAttributeGroup { ...@@ -29,6 +29,8 @@ public class ProductAttributeGroup {
* 属性名称 * 属性名称
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 属性类型 * 属性类型
*/ */
......
...@@ -19,6 +19,7 @@ public class ActivityDiscountsDto { ...@@ -19,6 +19,7 @@ public class ActivityDiscountsDto {
private String activityCode; private String activityCode;
private String activityName; private String activityName;
private String activityForeignName;
private Integer discountAmount; private Integer discountAmount;
private Integer activityType; private Integer activityType;
private Integer actualActivityGoodsNumber; private Integer actualActivityGoodsNumber;
......
...@@ -121,10 +121,12 @@ public class ShoppingCartGoodsDto { ...@@ -121,10 +121,12 @@ public class ShoppingCartGoodsDto {
* 商品的名称 * 商品的名称
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 如果是单品 skuName=spuName * 如果是单品 skuName=spuName
*/ */
private String skuName; private String skuName;
private String skuForeignName;
/** /**
* 商品行原始价格 * 商品行原始价格
*/ */
...@@ -163,6 +165,7 @@ public class ShoppingCartGoodsDto { ...@@ -163,6 +165,7 @@ public class ShoppingCartGoodsDto {
* 1.6.0 版本增加 分类名 * 1.6.0 版本增加 分类名
*/ */
private String categoryName; private String categoryName;
private String categoryForeignName;
/** /**
* 套餐--父级商品Id * 套餐--父级商品Id
...@@ -191,6 +194,7 @@ public class ShoppingCartGoodsDto { ...@@ -191,6 +194,7 @@ public class ShoppingCartGoodsDto {
private String classificationId; private String classificationId;
private String classificationName; private String classificationName;
private String classificationForeignName;
/** /**
* 是否限制库存 * 是否限制库存
* 用于创建订单时,是否扣减库存 * 用于创建订单时,是否扣减库存
...@@ -292,6 +296,7 @@ public class ShoppingCartGoodsDto { ...@@ -292,6 +296,7 @@ public class ShoppingCartGoodsDto {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 入机code * 入机code
*/ */
...@@ -304,10 +309,12 @@ public class ShoppingCartGoodsDto { ...@@ -304,10 +309,12 @@ public class ShoppingCartGoodsDto {
*/ */
public String getAttributeNames() { public String getAttributeNames() {
String extras = ""; String extras = "";
String foreignExtras = "";
if (CollectionUtils.isNotEmpty(this.extraList)) { if (CollectionUtils.isNotEmpty(this.extraList)) {
extras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeName).collect(Collectors.joining("/")); extras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeName).collect(Collectors.joining("/"));
foreignExtras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeForeignName).collect(Collectors.joining("/"));
} }
return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).build()); return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).attributeForeignName(foreignExtras).build());
} }
} }
......
...@@ -66,6 +66,8 @@ public class CreateOrderVo { ...@@ -66,6 +66,8 @@ public class CreateOrderVo {
private String storeName; private String storeName;
private String storeNameEn;
//入参不需要传 //入参不需要传
private String storeAddress; private String storeAddress;
...@@ -319,6 +321,8 @@ public class CreateOrderVo { ...@@ -319,6 +321,8 @@ public class CreateOrderVo {
@NotNull(message = "商品名称不能为空") @NotNull(message = "商品名称不能为空")
private String skuName; private String skuName;
private String skuForeignName;
@NotNull(message = "商品数量不能为空") @NotNull(message = "商品数量不能为空")
private Integer qty; private Integer qty;
...@@ -350,6 +354,9 @@ public class CreateOrderVo { ...@@ -350,6 +354,9 @@ public class CreateOrderVo {
* 属性名称 * 属性名称
*/ */
private String attributeValue; private String attributeValue;
private String attributeForeignValue;
} }
} }
...@@ -390,6 +397,9 @@ public class CreateOrderVo { ...@@ -390,6 +397,9 @@ public class CreateOrderVo {
*/ */
private String goodsName; private String goodsName;
private String goodsForeignName;
/** /**
* 赠送商品数量 * 赠送商品数量
*/ */
......
...@@ -43,6 +43,7 @@ import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformIapp ...@@ -43,6 +43,7 @@ import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformIapp
import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager; import com.freemud.api.assortment.datamanager.manager.AssortmentOpenPlatformPartnerStoreDeliveryConfigManager;
import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager; import com.freemud.api.assortment.datamanager.manager.customer.AssortmentCustomerInfoManager;
import com.freemud.application.sdk.api.base.BaseResponse; import com.freemud.application.sdk.api.base.BaseResponse;
import com.freemud.application.sdk.api.log.ApiLog;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest; import com.freemud.application.sdk.api.membercenter.request.QueryReceiveAddressRequest;
import com.freemud.application.sdk.api.membercenter.request.StatisticalPropertyRequest; import com.freemud.application.sdk.api.membercenter.request.StatisticalPropertyRequest;
...@@ -624,6 +625,8 @@ public class CheckOrder { ...@@ -624,6 +625,8 @@ public class CheckOrder {
if (this.isCollageOrder(createOrderVo)) { if (this.isCollageOrder(createOrderVo)) {
apportionResponse = shoppingCartClient.getCollageShoppingCartGoodsApportion(requestDto); apportionResponse = shoppingCartClient.getCollageShoppingCartGoodsApportion(requestDto);
} else { } else {
log.info(JSONObject.toJSON(requestDto));
apportionResponse = shoppingCartClient.getShoppingCartGoodsApportionNew(requestDto); apportionResponse = shoppingCartClient.getShoppingCartGoodsApportionNew(requestDto);
} }
...@@ -724,6 +727,7 @@ public class CheckOrder { ...@@ -724,6 +727,7 @@ public class CheckOrder {
storeDeliveryInfoDto.setPartnerId(storeResponseDto.getPartnerId()); storeDeliveryInfoDto.setPartnerId(storeResponseDto.getPartnerId());
storeDeliveryInfoDto.setStoreId(storeResponseDto.getStoreCode()); storeDeliveryInfoDto.setStoreId(storeResponseDto.getStoreCode());
storeDeliveryInfoDto.setStoreName(storeResponseDto.getStoreName()); storeDeliveryInfoDto.setStoreName(storeResponseDto.getStoreName());
storeDeliveryInfoDto.setStoreNameEn(storeResponseDto.getStoreNameEn());
// 查询外卖配送信息 // 查询外卖配送信息
AssortmentOpenPlatformPartnerStoreDeliveryConfig deliveryConfig = deliveryConfigManager.findByPartnerIdAndStoreCode(storeResponseDto.getPartnerId(), AssortmentOpenPlatformPartnerStoreDeliveryConfig deliveryConfig = deliveryConfigManager.findByPartnerIdAndStoreCode(storeResponseDto.getPartnerId(),
storeResponseDto.getStoreCode()); storeResponseDto.getStoreCode());
......
...@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.PostMapping; ...@@ -23,7 +23,7 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@FeignClient(name = "SHOPPING-CART-APPLICATION-SERVICE",url = "${saas.newshoppingcartclient.feign.url}") @FeignClient(name = "SHOPPING-CART-APPLICATION-SERVICE",url = "localhost:9211")
//@FeignClient(name = "123",url = "http://localhost:9211") //@FeignClient(name = "123",url = "http://localhost:9211")
@RequestMapping(value = "/shoppingCart",produces = {"application/json;charset=UTF-8"}) @RequestMapping(value = "/shoppingCart",produces = {"application/json;charset=UTF-8"})
public interface ShoppingCartClient { public interface ShoppingCartClient {
......
...@@ -24,4 +24,7 @@ management.endpoint.shutdown.enabled=true ...@@ -24,4 +24,7 @@ management.endpoint.shutdown.enabled=true
management.security.enabled=false management.security.enabled=false
management.health.rabbit.enabled=false management.health.rabbit.enabled=false
mcCafe.partnerId=1206 mcCafe.partnerId=1206
\ No newline at end of file
eureka.client.enabled=false
\ No newline at end of file
...@@ -39,6 +39,8 @@ public class CreateOrderRequest extends BaseRequest { ...@@ -39,6 +39,8 @@ public class CreateOrderRequest extends BaseRequest {
//门店名 //门店名
private String storeName; private String storeName;
//门店名
private String storeNameEn;
//门店全局唯一编号 //门店全局唯一编号
private String storeUnifyId; private String storeUnifyId;
...@@ -193,6 +195,7 @@ public class CreateOrderRequest extends BaseRequest { ...@@ -193,6 +195,7 @@ public class CreateOrderRequest extends BaseRequest {
//订单商品信息 //订单商品信息
List<OrderItemCreateReq> orderItemList; List<OrderItemCreateReq> orderItemList;
//订单费用信息 //订单费用信息
List<OrderCostCreateReq> orderCostDetailList; List<OrderCostCreateReq> orderCostDetailList;
......
...@@ -45,6 +45,9 @@ public class OrderItemCreateReq { ...@@ -45,6 +45,9 @@ public class OrderItemCreateReq {
//商品名称 //商品名称
private String productName; private String productName;
/**商品英文名**/
private String productForeignName;
//商品序号 //商品序号
private Integer productSeq; private Integer productSeq;
...@@ -54,6 +57,8 @@ public class OrderItemCreateReq { ...@@ -54,6 +57,8 @@ public class OrderItemCreateReq {
//商品规格名称 //商品规格名称
private String productSpecName; private String productSpecName;
private String productForeignSpecName;
//商品UPC码 //商品UPC码
private String productUpc; private String productUpc;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<artifactId>productcenter-sdk</artifactId> <artifactId>productcenter-sdk</artifactId>
<version>3.7.6-SNAPSHOT</version> <version>4.0.2.SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-shoppingcart-sdk</artifactId> <artifactId>assortment-shoppingcart-sdk</artifactId>
<version>1.2.3.RELEASE</version> <version>1.2.3_whh.RELEASE</version>
</dependency> </dependency>
<!-- 再来一单查询订单信息 --> <!-- 再来一单查询订单信息 -->
<dependency> <dependency>
......
...@@ -99,8 +99,10 @@ public class ShoppingCartConvertAdapter { ...@@ -99,8 +99,10 @@ public class ShoppingCartConvertAdapter {
cartGoodsDetailDto.setTax(cartGoods.getTax()); cartGoodsDetailDto.setTax(cartGoods.getTax());
cartGoodsDetailDto.setSpuId(cartGoods.getSpuId()); cartGoodsDetailDto.setSpuId(cartGoods.getSpuId());
cartGoodsDetailDto.setSpuName(cartGoods.getSpuName()); cartGoodsDetailDto.setSpuName(cartGoods.getSpuName());
cartGoodsDetailDto.setSpuForeignName(cartGoods.getSpuForeignName());
cartGoodsDetailDto.setSkuId(StringUtils.isEmpty(cartGoods.getSkuId()) ? cartGoods.getSpuId() : cartGoods.getSkuId()); cartGoodsDetailDto.setSkuId(StringUtils.isEmpty(cartGoods.getSkuId()) ? cartGoods.getSpuId() : cartGoods.getSkuId());
cartGoodsDetailDto.setSkuName(StringUtils.isEmpty(cartGoods.getSkuName()) ? cartGoods.getSpuName() : cartGoods.getSkuName()); cartGoodsDetailDto.setSkuName(StringUtils.isEmpty(cartGoods.getSkuName()) ? cartGoods.getSpuName() : cartGoods.getSkuName());
cartGoodsDetailDto.setSkuForeignName(StringUtils.isEmpty(cartGoods.getSkuForeignName()) ? cartGoods.getSpuForeignName() : cartGoods.getSkuForeignName());
cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice()); cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice());
// cartGoodsDetailDto.setTotalDiscountAmount(0); // cartGoodsDetailDto.setTotalDiscountAmount(0);
cartGoodsDetailDto.setUserId(cartGoods.getUserId()); cartGoodsDetailDto.setUserId(cartGoods.getUserId());
...@@ -140,6 +142,7 @@ public class ShoppingCartConvertAdapter { ...@@ -140,6 +142,7 @@ public class ShoppingCartConvertAdapter {
ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods goods = new ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods(); ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods goods = new ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods();
goods.setSpuId(materialGoods.getSpuId()); goods.setSpuId(materialGoods.getSpuId());
goods.setSpuName(materialGoods.getSpuName()); goods.setSpuName(materialGoods.getSpuName());
goods.setSpuForeignName(materialGoods.getSpuForeignName());
goods.setOriginalPrice(materialGoods.getOriginalPrice()); goods.setOriginalPrice(materialGoods.getOriginalPrice());
goods.setSalePrice(materialGoods.getFinalPrice()); goods.setSalePrice(materialGoods.getFinalPrice());
goods.setCustomerCode(materialGoods.getCustomerCode()); goods.setCustomerCode(materialGoods.getCustomerCode());
......
...@@ -10,7 +10,9 @@ public class CheckSpqInfoResponseDto { ...@@ -10,7 +10,9 @@ public class CheckSpqInfoResponseDto {
private String spuId; private String spuId;
private String skuId; private String skuId;
private String spuName; private String spuName;
private String spuForeignName;
private String skuName; private String skuName;
private String skuForeignName;
/** /**
* 活动名称 * 活动名称
*/ */
...@@ -32,6 +34,7 @@ public class CheckSpqInfoResponseDto { ...@@ -32,6 +34,7 @@ public class CheckSpqInfoResponseDto {
private String picture; private String picture;
private String defaultSpecId; private String defaultSpecId;
private String defaultSpecName; private String defaultSpecName;
private String defaultForeignSpecName;
/** /**
* 券商品类型 : 0 -> 商品券,4,换购券 * 券商品类型 : 0 -> 商品券,4,换购券
*/ */
......
...@@ -133,6 +133,7 @@ public class GetMenuResponseDto { ...@@ -133,6 +133,7 @@ public class GetMenuResponseDto {
*/ */
private Integer isSkuProduct; private Integer isSkuProduct;
private String name; private String name;
private String foreignName;
/** /**
* 原始价格 单位分 * 原始价格 单位分
*/ */
...@@ -143,6 +144,7 @@ public class GetMenuResponseDto { ...@@ -143,6 +144,7 @@ public class GetMenuResponseDto {
private Long packPrice; private Long packPrice;
private String picture; private String picture;
private Double weight;
private String pid; private String pid;
private Integer pknumber; private Integer pknumber;
private String productionLocation; private String productionLocation;
...@@ -187,6 +189,7 @@ public class GetMenuResponseDto { ...@@ -187,6 +189,7 @@ public class GetMenuResponseDto {
private Long finalPrice; private Long finalPrice;
private Long originalPrice; private Long originalPrice;
private String productName; private String productName;
private String foreignProductName;
private Integer productType; private Integer productType;
private Integer sequence; private Integer sequence;
private String skuCode; private String skuCode;
...@@ -207,7 +210,9 @@ public class GetMenuResponseDto { ...@@ -207,7 +210,9 @@ public class GetMenuResponseDto {
private Integer sequence; private Integer sequence;
private String specId; private String specId;
private String specName; private String specName;
private String foreignSpecName;
private String specValue; private String specValue;
private String foreignSpecValue;
private String specValueId; private String specValueId;
} }
} }
...@@ -219,6 +224,7 @@ public class GetMenuResponseDto { ...@@ -219,6 +224,7 @@ public class GetMenuResponseDto {
private Integer sequence; private Integer sequence;
private String specId; private String specId;
private String specName; private String specName;
private String foreignSpecName;
private List<SpecValueVo> specValueVos; private List<SpecValueVo> specValueVos;
@NoArgsConstructor @NoArgsConstructor
...@@ -227,6 +233,7 @@ public class GetMenuResponseDto { ...@@ -227,6 +233,7 @@ public class GetMenuResponseDto {
private Integer sequence; private Integer sequence;
private String specId; private String specId;
private String specValue; private String specValue;
private String foreignSpecValue;
private String specValueId; private String specValueId;
} }
} }
...@@ -236,6 +243,7 @@ public class GetMenuResponseDto { ...@@ -236,6 +243,7 @@ public class GetMenuResponseDto {
public static class ProductLabelNameListBean { public static class ProductLabelNameListBean {
private String id; private String id;
private String name; private String name;
private String foreignName;
private String partnerId; private String partnerId;
List<?> productList; List<?> productList;
private String storeId; private String storeId;
...@@ -255,6 +263,10 @@ public class GetMenuResponseDto { ...@@ -255,6 +263,10 @@ public class GetMenuResponseDto {
* 属性名称 * 属性名称
*/ */
private String attributeName; private String attributeName;
private String foreignAttributeName;
/** /**
* 属性类型 * 属性类型
*/ */
...@@ -280,6 +292,8 @@ public class GetMenuResponseDto { ...@@ -280,6 +292,8 @@ public class GetMenuResponseDto {
private String attributeId; private String attributeId;
private String attributeValue; private String attributeValue;
private String foreignAttributeValue;
/** /**
* 属性ID * 属性ID
*/ */
......
...@@ -11,6 +11,8 @@ public class OrderProductAddInfo { ...@@ -11,6 +11,8 @@ public class OrderProductAddInfo {
* 属性名称 多糖/冷/常温 * 属性名称 多糖/冷/常温
*/ */
private String attributeNames; private String attributeNames;
private String attributeForeignNames;
/** /**
* 活动商品集合 * 活动商品集合
*/ */
......
...@@ -158,10 +158,13 @@ public class ShoppingCartGoodsDto { ...@@ -158,10 +158,13 @@ public class ShoppingCartGoodsDto {
* 商品的名称 * 商品的名称
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 如果是单品 skuName=spuName * 如果是单品 skuName=spuName
*/ */
private String skuName; private String skuName;
private String skuForeignName;
/** /**
* 商品行原始价格(单价) * 商品行原始价格(单价)
*/ */
...@@ -291,6 +294,7 @@ public class ShoppingCartGoodsDto { ...@@ -291,6 +294,7 @@ public class ShoppingCartGoodsDto {
*/ */
private String classificationName; private String classificationName;
/** /**
* 税率代码 * 税率代码
*/ */
...@@ -331,6 +335,7 @@ public class ShoppingCartGoodsDto { ...@@ -331,6 +335,7 @@ public class ShoppingCartGoodsDto {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
} }
@Data @Data
...@@ -340,6 +345,7 @@ public class ShoppingCartGoodsDto { ...@@ -340,6 +345,7 @@ public class ShoppingCartGoodsDto {
*/ */
private String spuId; private String spuId;
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 商品行记录:当前元售价 * 商品行记录:当前元售价
*/ */
...@@ -371,10 +377,13 @@ public class ShoppingCartGoodsDto { ...@@ -371,10 +377,13 @@ public class ShoppingCartGoodsDto {
*/ */
public String getAttributeNames() { public String getAttributeNames() {
String extras = ""; String extras = "";
String foreignExtras = "";
if (CollectionUtils.isNotEmpty(this.extraList)) { if (CollectionUtils.isNotEmpty(this.extraList)) {
extras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeName).collect(Collectors.joining("/")); extras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeName).collect(Collectors.joining("/"));
foreignExtras = extraList.stream().map(CartGoodsDetailDto.CartGoodsExtra::getAttributeForeignName).collect(Collectors.joining("/"));
} }
return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).build()); return JSON.toJSONString(OrderProductAddInfo.builder().attributeNames(extras).attributeForeignNames(foreignExtras).build());
} }
} }
......
...@@ -140,19 +140,37 @@ public class CartGoods { ...@@ -140,19 +140,37 @@ public class CartGoods {
private String name; private String name;
/** /**
* 购物车一行商品英文名称
*/
private String foreignName;
/**
* 商品的spuName * 商品的spuName
*/ */
private String spuName; private String spuName;
/**
* 商品的spuForeignName
*/
private String spuForeignName;
/** /**
* 商品的skuName * 商品的skuName
*/ */
private String skuName; private String skuName;
/**
* skuForeignName
*/
private String skuForeignName;
/** /**
* 购物车一行商品的副名称 * 购物车一行商品的副名称
*/ */
private String subName; private String subName;
/**
* 购物车一行商品的英文副名称
*/
private String subForeignName;
/** /**
* 商品图片URL * 商品图片URL
*/ */
...@@ -274,6 +292,7 @@ public class CartGoods { ...@@ -274,6 +292,7 @@ public class CartGoods {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
} }
@Data @Data
...@@ -286,6 +305,8 @@ public class CartGoods { ...@@ -286,6 +305,8 @@ public class CartGoods {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 麦咖啡特定属性入机code * 麦咖啡特定属性入机code
...@@ -302,6 +323,7 @@ public class CartGoods { ...@@ -302,6 +323,7 @@ public class CartGoods {
private String spuId; private String spuId;
private String skuId; private String skuId;
private String skuName; private String skuName;
private String skuForeignName;
/** /**
* 所有属性attributeId的拼接 * 所有属性attributeId的拼接
*/ */
...@@ -338,14 +360,18 @@ public class CartGoods { ...@@ -338,14 +360,18 @@ public class CartGoods {
*/ */
private String name; private String name;
private String foreignName;
/** /**
* 商品的spuName * 商品的spuName
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 购物车一行商品的副名称 * 购物车一行商品的副名称
*/ */
private String subName; private String subName;
private String subForeignName;
/** /**
* 商品图片URL * 商品图片URL
*/ */
...@@ -555,6 +581,8 @@ public class CartGoods { ...@@ -555,6 +581,8 @@ public class CartGoods {
* 加料名称 * 加料名称
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 购物车一行商品的原单价 * 购物车一行商品的原单价
*/ */
......
...@@ -2,30 +2,39 @@ package cn.freemud.service.impl; ...@@ -2,30 +2,39 @@ package cn.freemud.service.impl;
import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Level;
import cn.freemud.base.entity.BaseResponse; import cn.freemud.base.entity.BaseResponse;
import cn.freemud.constant.ResponseCodeConstant;
import cn.freemud.entities.dto.GetProductInfoDto;
import cn.freemud.entities.dto.ProductInfosDto;
import cn.freemud.entities.vo.CartGoods; import cn.freemud.entities.vo.CartGoods;
import cn.freemud.entities.vo.ShoppingCartGoodsBaseResponseVo; import cn.freemud.entities.vo.ShoppingCartGoodsBaseResponseVo;
import cn.freemud.enums.ResponseResult; import cn.freemud.enums.ResponseResult;
import cn.freemud.interceptor.ServiceException; import cn.freemud.interceptor.ServiceException;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.utils.LogUtil; import cn.freemud.utils.LogUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare; import com.freemud.application.sdk.api.base.SDKCommonBaseContextWare;
import com.freemud.application.sdk.api.log.ApiLog;
import com.freemud.application.sdk.api.log.ErrorLog; import com.freemud.application.sdk.api.log.ErrorLog;
import com.freemud.application.sdk.api.log.LogThreadLocal; import com.freemud.application.sdk.api.log.LogThreadLocal;
import com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO; import com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO;
import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum; import com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum;
import com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest; import com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest;
import com.freemud.sdk.api.assortment.shoppingcart.request.GetProductInfoRequest; import com.freemud.sdk.api.assortment.shoppingcart.request.GetProductInfoRequest;
import com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService; import com.freemud.sdk.api.assortment.shoppingcart.service.ShoppingCartBaseService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import cn.freemud.entities.dto.GetMenuResponseDto.DataBean.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean;
import javax.naming.Name; import javax.naming.Name;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* All rights Reserved, Designed By www.freemud.cn * All rights Reserved, Designed By www.freemud.cn
...@@ -42,6 +51,9 @@ import java.util.List; ...@@ -42,6 +51,9 @@ import java.util.List;
@Service @Service
public class AssortmentSdkService { public class AssortmentSdkService {
@Autowired
StoreItemClient storeItemClient;
/** /**
* 调用聚合sdk获取单个商品行信息 * 调用聚合sdk获取单个商品行信息
* *
...@@ -244,6 +256,38 @@ public class AssortmentSdkService { ...@@ -244,6 +256,38 @@ public class AssortmentSdkService {
return baseResponse.getResult(); return baseResponse.getResult();
} }
/**
* 调用获取商品详情
*
* @param partnerId
* @param storeId
* @param goodsIds
* @return
*/
public List<ProductBean> getProductsInfo(String partnerId, String storeId, List<String> goodsIds, String menuType, ShoppingCartBaseService shoppingCartService) {
//移除空的goodsId及spq的商品券
goodsIds = goodsIds.parallelStream().filter(StringUtils::isNotEmpty).filter(goodsId -> !goodsId.startsWith(CommonsConstant.COUPON_PREFIX)).collect(Collectors.toList());
GetProductInfoDto getProductInfoDto = new GetProductInfoDto();
getProductInfoDto.setPartnerId(partnerId);
getProductInfoDto.setShopId(storeId);
getProductInfoDto.setProductInfoType(2);
getProductInfoDto.setProductIds(goodsIds);
getProductInfoDto.setChannel(BusinessTypeEnum.getByType(menuType).getCode());
ProductInfosDto productInfosDto = storeItemClient.listProductInfos(getProductInfoDto);
if (!ResponseCodeConstant.RESPONSE_SUCCESS.equals(productInfosDto.getErrcode()) || CollectionUtils.isEmpty(productInfosDto.getData().getProducts())) {
ApiLog.info("查询商品信息失败,getProductInfoDto,baseResponse",getProductInfoDto,productInfosDto);
return null;
}
return productInfosDto.getData().getProducts();
}
/** /**
* 组装CartParamDto信息 * 组装CartParamDto信息
* *
......
...@@ -95,6 +95,7 @@ import java.util.*; ...@@ -95,6 +95,7 @@ import java.util.*;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cn.freemud.entities.dto.GetMenuResponseDto.DataBean.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean;
import static cn.freemud.constant.ApplicationConstant.*; import static cn.freemud.constant.ApplicationConstant.*;
import static cn.freemud.constant.ShoppingCartConstant.SHOPPING_CART_EMPTY_GOODS_LIST; import static cn.freemud.constant.ShoppingCartConstant.SHOPPING_CART_EMPTY_GOODS_LIST;
import static cn.freemud.constant.ShoppingCartConstant.SHOPPING_CART_INVALIAD_GOODS; import static cn.freemud.constant.ShoppingCartConstant.SHOPPING_CART_INVALIAD_GOODS;
...@@ -304,11 +305,19 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -304,11 +305,19 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
spuId2 = validCoupon(partnerId, storeId, spuId, productIds, BusinessTypeEnum.getByType(addShoppingCartGoodsRequestVo.getMenuType()).getCode(), couponProductDto); spuId2 = validCoupon(partnerId, storeId, spuId, productIds, BusinessTypeEnum.getByType(addShoppingCartGoodsRequestVo.getMenuType()).getCode(), couponProductDto);
} }
} }
// // 获取商品详细信息
// List<ProductBeanDTO> productBeanListSpuClass = assortmentSdkService.getProductsInfoSdk(partnerId, storeId
// , Collections.singletonList(spuId2),addShoppingCartGoodsRequestVo.getMenuType(), this.shoppingCartBaseService);
// LogUtil.info("productBeanListSpuClass", spuId2,JSON.toJSONString(productBeanListSpuClass));
// 获取商品详细信息 // 获取商品详细信息
List<ProductBeanDTO> productBeanListSpuClass = assortmentSdkService.getProductsInfoSdk(partnerId, storeId List<ProductBean> productBeanListSpuClass = assortmentSdkService.getProductsInfo(partnerId, storeId
, Collections.singletonList(spuId2),addShoppingCartGoodsRequestVo.getMenuType(), this.shoppingCartBaseService); , Collections.singletonList(spuId2),addShoppingCartGoodsRequestVo.getMenuType(), this.shoppingCartBaseService);
LogUtil.info("productBeanListSpuClass", spuId2,JSON.toJSONString(productBeanListSpuClass)); LogUtil.info("productBeanListSpuClass", spuId2,JSON.toJSONString(productBeanListSpuClass));
//缓存中获取购物车商品信息 //缓存中获取购物车商品信息
// 注意,围餐和点餐redis数据结构不一样 // 注意,围餐和点餐redis数据结构不一样
List<CartGoods> allCartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, addShoppingCartGoodsRequestVo.getSessionId(), null, shoppingCartBaseService); List<CartGoods> allCartGoodsList = assortmentSdkService.getShoppingCart(partnerId, storeId, userId, addShoppingCartGoodsRequestVo.getSessionId(), null, shoppingCartBaseService);
...@@ -1691,7 +1700,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1691,7 +1700,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
*/ */
private void addProductGoods(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo private void addProductGoods(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo
, CartGoods cartGoods, String spuId2, String userId, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, String spuId , CartGoods cartGoods, String spuId2, String userId, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, String spuId
, List<CartGoods> allCartGoodsList, List<ProductBeanDTO> productBeanListSpuClass, CouponProductDto couponProductDto) { , List<CartGoods> allCartGoodsList, List<ProductBean> productBeanListSpuClass, CouponProductDto couponProductDto) {
// 商品券商品list // 商品券商品list
List<CartGoods> tmpCartGoods = allCartGoodsList.parallelStream().filter(k -> k.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)).collect(Collectors.toList()); List<CartGoods> tmpCartGoods = allCartGoodsList.parallelStream().filter(k -> k.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)).collect(Collectors.toList());
// 当已有商品券时,不得添加(暂时的限制) // 当已有商品券时,不得添加(暂时的限制)
...@@ -1722,7 +1731,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1722,7 +1731,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
&& productBeanListSpuClass.get(0).getStockLimit() == 1) { && productBeanListSpuClass.get(0).getStockLimit() == 1) {
stockLimit = true; stockLimit = true;
} else { } else {
for (ProductBeanDTO.SkuProductBean skuProductBean : productBeanListSpuClass.get(0).getSkuList()) { for (ProductBean.SkuProductBean skuProductBean : productBeanListSpuClass.get(0).getSkuList()) {
if (spuId2.equals(skuProductBean.getSkuId()) && skuProductBean.getStockLimit() == 1) { if (spuId2.equals(skuProductBean.getSkuId()) && skuProductBean.getStockLimit() == 1) {
stockLimit = true; stockLimit = true;
break; break;
...@@ -1753,7 +1762,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1753,7 +1762,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
* @param skuId * @param skuId
*/ */
private void queryManyGoodsStocks(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo, List<Long> productIds private void queryManyGoodsStocks(AddShoppingCartGoodsRequestVo addShoppingCartGoodsRequestVo, List<Long> productIds
, List<ProductBeanDTO> productBeanListSpuClass, String skuId, Integer qty) { , List<ProductBean> productBeanListSpuClass, String skuId, Integer qty) {
GetProductStockRequestDto requestDto = new GetProductStockRequestDto(); GetProductStockRequestDto requestDto = new GetProductStockRequestDto();
requestDto.setChannel(BusinessTypeEnum.getByType(addShoppingCartGoodsRequestVo.getMenuType()).getCode()); requestDto.setChannel(BusinessTypeEnum.getByType(addShoppingCartGoodsRequestVo.getMenuType()).getCode());
requestDto.setPartnerId(addShoppingCartGoodsRequestVo.getPartnerId()); requestDto.setPartnerId(addShoppingCartGoodsRequestVo.getPartnerId());
...@@ -1764,7 +1773,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService { ...@@ -1764,7 +1773,7 @@ public class ShoppingCartNewServiceImpl implements ShoppingCartNewService {
&& productBeanListSpuClass.get(0).getStockLimit() == 1) { && productBeanListSpuClass.get(0).getStockLimit() == 1) {
availableStocks = stockClient.getAvailableStocks(requestDto); availableStocks = stockClient.getAvailableStocks(requestDto);
} else { } else {
for (ProductBeanDTO.SkuProductBean skuProductBean : productBeanListSpuClass.get(0).getSkuList()) { for (ProductBean.SkuProductBean skuProductBean : productBeanListSpuClass.get(0).getSkuList()) {
if (skuId.equals(skuProductBean.getSkuId()) && skuProductBean.getStockLimit() == 1) { if (skuId.equals(skuProductBean.getSkuId()) && skuProductBean.getStockLimit() == 1) {
availableStocks = stockClient.getAvailableStocks(requestDto); availableStocks = stockClient.getAvailableStocks(requestDto);
break; break;
......
...@@ -330,8 +330,11 @@ public class CalculationCommonService { ...@@ -330,8 +330,11 @@ public class CalculationCommonService {
cartGoodsDetailDto.setTax(cartGoods.getTax()); cartGoodsDetailDto.setTax(cartGoods.getTax());
cartGoodsDetailDto.setSpuId(cartGoods.getSpuId()); cartGoodsDetailDto.setSpuId(cartGoods.getSpuId());
cartGoodsDetailDto.setSpuName(cartGoods.getSpuName()); cartGoodsDetailDto.setSpuName(cartGoods.getSpuName());
cartGoodsDetailDto.setSpuForeignName(cartGoods.getSpuForeignName());
cartGoodsDetailDto.setSkuId(StringUtils.isEmpty(cartGoods.getSkuId()) ? cartGoods.getSpuId() : cartGoods.getSkuId()); cartGoodsDetailDto.setSkuId(StringUtils.isEmpty(cartGoods.getSkuId()) ? cartGoods.getSpuId() : cartGoods.getSkuId());
cartGoodsDetailDto.setSkuName(StringUtils.isEmpty(cartGoods.getSkuName()) ? cartGoods.getSpuName() : cartGoods.getSkuName()); cartGoodsDetailDto.setSkuName(StringUtils.isEmpty(cartGoods.getSkuName()) ? cartGoods.getSpuName() : cartGoods.getSkuName());
cartGoodsDetailDto.setSkuForeignName(StringUtils.isEmpty(cartGoods.getSkuForeignName()) ? cartGoods.getSpuForeignName() : cartGoods.getSkuForeignName());
cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice()); cartGoodsDetailDto.setOriginalPrice(cartGoods.getOriginalPrice());
cartGoodsDetailDto.setSalePrice(cartGoods.getOriginalPrice()); cartGoodsDetailDto.setSalePrice(cartGoods.getOriginalPrice());
cartGoodsDetailDto.setPicture(cartGoods.getPic()); cartGoodsDetailDto.setPicture(cartGoods.getPic());
...@@ -391,6 +394,7 @@ public class CalculationCommonService { ...@@ -391,6 +394,7 @@ public class CalculationCommonService {
ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods goods = new ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods(); ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods goods = new ShoppingCartGoodsDto.CartGoodsDetailDto.MaterialGoods();
goods.setSpuId(mg.getSpuId()); goods.setSpuId(mg.getSpuId());
goods.setSpuName(mg.getSpuName()); goods.setSpuName(mg.getSpuName());
goods.setSpuForeignName(mg.getSpuForeignName());
goods.setSalePrice(mg.getFinalPrice()); goods.setSalePrice(mg.getFinalPrice());
goods.setQty(cartGoods.getQty()); goods.setQty(cartGoods.getQty());
goods.setCustomerCode(cartGoods.getCustomerCode()); goods.setCustomerCode(cartGoods.getCustomerCode());
...@@ -469,8 +473,11 @@ public class CalculationCommonService { ...@@ -469,8 +473,11 @@ public class CalculationCommonService {
ShoppingCartGoodsDto.CartGoodsDetailDto com = new ShoppingCartGoodsDto.CartGoodsDetailDto(); ShoppingCartGoodsDto.CartGoodsDetailDto com = new ShoppingCartGoodsDto.CartGoodsDetailDto();
com.setSpuId(comb.getGoodsId()); com.setSpuId(comb.getGoodsId());
com.setSpuName(comb.getSpuName()); com.setSpuName(comb.getSpuName());
com.setSpuForeignName(comb.getSpuForeignName());
com.setSkuId(comb.getGoodsId()); com.setSkuId(comb.getGoodsId());
com.setSkuName(StringUtils.isEmpty(comb.getSkuName()) ? com.getSpuName() : com.getSkuName()); com.setSkuName(StringUtils.isEmpty(comb.getSkuName()) ? com.getSpuName() : com.getSkuName());
com.setSkuForeignName(StringUtils.isEmpty(comb.getSkuForeignName()) ? com.getSpuForeignName() : com.getSkuForeignName());
com.setPicture(comb.getPic()); com.setPicture(comb.getPic());
com.setProductType(comb.isWeightType() ? ProductType.WEIGHT_PRODUCT.getCode() : ProductType.SETMEAL.getCode()); com.setProductType(comb.isWeightType() ? ProductType.WEIGHT_PRODUCT.getCode() : ProductType.SETMEAL.getCode());
com.setParentProductId(cartGoods.getGoodsId()); com.setParentProductId(cartGoods.getGoodsId());
......
...@@ -141,8 +141,10 @@ public class CouponSharingService { ...@@ -141,8 +141,10 @@ public class CouponSharingService {
cartGoods.setQty(1); cartGoods.setQty(1);
cartGoods.setCouponCode(checkSpqInfoResponseDto.getCouponCode()); cartGoods.setCouponCode(checkSpqInfoResponseDto.getCouponCode());
cartGoods.setSpuName(checkSpqInfoResponseDto.getSpuName()); cartGoods.setSpuName(checkSpqInfoResponseDto.getSpuName());
cartGoods.setSpuForeignName(checkSpqInfoResponseDto.getSpuForeignName());
cartGoods.setSpecProductId(checkSpqInfoResponseDto.getDefaultSpecId()); cartGoods.setSpecProductId(checkSpqInfoResponseDto.getDefaultSpecId());
cartGoods.setSubName(checkSpqInfoResponseDto.getDefaultSpecName()); cartGoods.setSubName(checkSpqInfoResponseDto.getDefaultSpecName());
cartGoods.setSubForeignName(checkSpqInfoResponseDto.getDefaultForeignSpecName());
cartGoods.setExtra(checkSpqInfoResponseDto.getExtras()); cartGoods.setExtra(checkSpqInfoResponseDto.getExtras());
if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) { if (GoodsTypeEnum.HG_COUPON_GOODS.getGoodsType().equals(cartGoods.getGoodsType())) {
CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods discountGoods = discountResult.getGoods() CalculationSharingDiscountResponseDto.CalculationDiscountResult.Goods discountGoods = discountResult.getGoods()
......
...@@ -21,4 +21,6 @@ management.endpoints.web.exposure.include=prometheus,info,health,shutdown ...@@ -21,4 +21,6 @@ management.endpoints.web.exposure.include=prometheus,info,health,shutdown
management.metrics.tags.application=${spring.application.name} management.metrics.tags.application=${spring.application.name}
management.endpoint.shutdown.enabled=true management.endpoint.shutdown.enabled=true
management.security.enabled=false management.security.enabled=false
management.health.rabbit.enabled=false management.health.rabbit.enabled=false
\ No newline at end of file
eureka.client.enabled=false
\ No newline at end of file
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