Commit 299a2394 by ping.wu
parents e8a4b035 ee5be573
...@@ -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.38-RELEASE</version> <version>2.1.39-RELEASE</version>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<dependency> <dependency>
<artifactId>assortment-data-manager</artifactId> <artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId> <groupId>com.freemud.sdk.api.assortment</groupId>
<version>3.5.RELEASE</version> <version>5.4.3-RELEASE</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>ordercenter-sdk</artifactId> <artifactId>ordercenter-sdk</artifactId>
<version>1.3.40.RELEASE</version> <version>1.3.41.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</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.2.8.RELEASE</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -115,3 +115,4 @@ ...@@ -115,3 +115,4 @@
| 2.1.36-RELEASE | 新增C端小程序配送显示地图配送距离字段 | 王航航 | 2021-03-09 | | 2.1.36-RELEASE | 新增C端小程序配送显示地图配送距离字段 | 王航航 | 2021-03-09 |
| 2.1.37-RELEASE | 订单满赠优惠 | 张志恒 | 2021-03-11 | | 2.1.37-RELEASE | 订单满赠优惠 | 张志恒 | 2021-03-11 |
| 2.1.38-RELEASE | 外卖配送自动流转 | 张志恒 | 2021-03-11 | | 2.1.38-RELEASE | 外卖配送自动流转 | 张志恒 | 2021-03-11 |
| 2.1.39-RELEASE | 美业 | 刘鹏飞 | 2021-03-12 |
\ No newline at end of file
...@@ -34,11 +34,13 @@ public class OrderAssortmentDtoConvertToDMVoAdapter { ...@@ -34,11 +34,13 @@ public class OrderAssortmentDtoConvertToDMVoAdapter {
public static DMOrderItemVo convertCreateOrderProductRequest(CreateOrderProductRequest createOrderProductRequest){ public static DMOrderItemVo convertCreateOrderProductRequest(CreateOrderProductRequest createOrderProductRequest){
DMOrderItemVo dmOrderItemVo=new DMOrderItemVo(); DMOrderItemVo dmOrderItemVo=new DMOrderItemVo();
dmOrderItemVo.setAddInfo(createOrderProductRequest.getAddInfo()); dmOrderItemVo.setAddInfo(createOrderProductRequest.getAddInfo());
dmOrderItemVo.setForeignAddInfo(createOrderProductRequest.getForeignAddInfo());
dmOrderItemVo.setCategoryId(createOrderProductRequest.getCategoryId()); dmOrderItemVo.setCategoryId(createOrderProductRequest.getCategoryId());
dmOrderItemVo.setCategoryName(createOrderProductRequest.getCategoryName()); dmOrderItemVo.setCategoryName(createOrderProductRequest.getCategoryName());
dmOrderItemVo.setCustomerCode(createOrderProductRequest.getCustomerCode()); dmOrderItemVo.setCustomerCode(createOrderProductRequest.getCustomerCode());
dmOrderItemVo.setDiscountId(createOrderProductRequest.getDiscountId()); dmOrderItemVo.setDiscountId(createOrderProductRequest.getDiscountId());
dmOrderItemVo.setExtras(createOrderProductRequest.getExtras()); dmOrderItemVo.setExtras(createOrderProductRequest.getExtras());
dmOrderItemVo.setForeignExtras(createOrderProductRequest.getForeignExtras());
dmOrderItemVo.setHasStockProduct(createOrderProductRequest.getHasStockProudct()); dmOrderItemVo.setHasStockProduct(createOrderProductRequest.getHasStockProudct());
dmOrderItemVo.setWeight(createOrderProductRequest.getWeight()); dmOrderItemVo.setWeight(createOrderProductRequest.getWeight());
dmOrderItemVo.setUnit(createOrderProductRequest.getUnit()); dmOrderItemVo.setUnit(createOrderProductRequest.getUnit());
......
...@@ -925,15 +925,19 @@ public class OrderSdkAdapter { ...@@ -925,15 +925,19 @@ public class OrderSdkAdapter {
productBean.setPrice(orderItemResp.getProductPrice().longValue()); productBean.setPrice(orderItemResp.getProductPrice().longValue());
productBean.setSalePrice(orderItemResp.getSalePrice().longValue()); productBean.setSalePrice(orderItemResp.getSalePrice().longValue());
productBean.setProductName(orderItemResp.getProductName()); productBean.setProductName(orderItemResp.getProductName());
productBean.setProductForeignName(orderItemResp.getProductForeignName());
productBean.setSpecification(orderItemResp.getProductSpec()); productBean.setSpecification(orderItemResp.getProductSpec());
productBean.setSpecificationName(orderItemResp.getProductSpecName()); productBean.setSpecificationName(orderItemResp.getProductSpecName());
productBean.setSpecificationForeignName(orderItemResp.getProductForeignSpecName());
productBean.setProductSharePrice(orderItemResp.getProductSharePrice()); productBean.setProductSharePrice(orderItemResp.getProductSharePrice());
productBean.setSettlementPrice(orderItemResp.getSettlementPrice().longValue()); productBean.setSettlementPrice(orderItemResp.getSettlementPrice().longValue());
productBean.setUnit(orderItemResp.getProductUnit()); productBean.setUnit(orderItemResp.getProductUnit());
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map.put("attributeNames", orderItemResp.getProductProperty()); map.put("attributeNames", orderItemResp.getProductProperty());
map.put("attributeForeignNames", orderItemResp.getProductForeignProperty());
productBean.setAddInfo(JSONObject.toJSONString(map)); productBean.setAddInfo(JSONObject.toJSONString(map));
productBean.setProductProperty(orderItemResp.getProductProperty()); productBean.setProductProperty(orderItemResp.getProductProperty());
productBean.setProductForeignProperty(orderItemResp.getProductForeignProperty());
productBean.setExtInfo(orderItemResp.getExtInfo()); productBean.setExtInfo(orderItemResp.getExtInfo());
productBean.setNote(orderItemResp.getNote()); productBean.setNote(orderItemResp.getNote());
...@@ -1073,6 +1077,11 @@ public class OrderSdkAdapter { ...@@ -1073,6 +1077,11 @@ public class OrderSdkAdapter {
//【订单开放平台】订单详情查询接口增加配送类型字段 //【订单开放平台】订单详情查询接口增加配送类型字段
data.setExpressType(orderInfoReqs.getExpressType()); data.setExpressType(orderInfoReqs.getExpressType());
//围餐门店英文名称
if (orderInfoReqs.getOrderExtended() != null) {
data.setShopNameEn(orderInfoReqs.getOrderExtended().getStoreNameEn());
}
if (orderInfoReqs.getAfterSalesOrderList() != null && orderInfoReqs.getAfterSalesOrderList().size() >= 1) { if (orderInfoReqs.getAfterSalesOrderList() != null && orderInfoReqs.getAfterSalesOrderList().size() >= 1) {
data.setAfterSalesOrderResp(orderInfoReqs.getAfterSalesOrderList().get(0)); data.setAfterSalesOrderResp(orderInfoReqs.getAfterSalesOrderList().get(0));
} }
...@@ -2499,6 +2508,7 @@ public class OrderSdkAdapter { ...@@ -2499,6 +2508,7 @@ public class OrderSdkAdapter {
request.setOrderClient(requestVO.getOrderClient()); request.setOrderClient(requestVO.getOrderClient());
request.setCompanySelfCode(requestVO.getThirdOrderCode()); request.setCompanySelfCode(requestVO.getThirdOrderCode());
request.setStoreName(requestVO.getShopName()); request.setStoreName(requestVO.getShopName());
request.setStoreNameEn(requestVO.getShopNameEn());
request.setPartnerName(requestVO.getCompanyName()); request.setPartnerName(requestVO.getCompanyName());
request.setStoreUnifyId(requestVO.getShopCode()); request.setStoreUnifyId(requestVO.getShopCode());
request.setUserId(requestVO.getUserId()); request.setUserId(requestVO.getUserId());
...@@ -2770,9 +2780,11 @@ public class OrderSdkAdapter { ...@@ -2770,9 +2780,11 @@ public class OrderSdkAdapter {
orderItemCreateReq.setId(product.getId()); orderItemCreateReq.setId(product.getId());
orderItemCreateReq.setPartnerId(partnerId); orderItemCreateReq.setPartnerId(partnerId);
orderItemCreateReq.setProductName(product.getProductName()); orderItemCreateReq.setProductName(product.getProductName());
orderItemCreateReq.setProductForeignName(product.getProductForeignName());
orderItemCreateReq.setProductId(product.getProductId()); orderItemCreateReq.setProductId(product.getProductId());
orderItemCreateReq.setProductSpec(product.getSpecification()); orderItemCreateReq.setProductSpec(product.getSpecification());
orderItemCreateReq.setProductSpecName(product.getSpecificationName()); orderItemCreateReq.setProductSpecName(product.getSpecificationName());
orderItemCreateReq.setProductForeignSpecName(product.getSpecificationForeignName());
orderItemCreateReq.setProductSeq(product.getOpid()); orderItemCreateReq.setProductSeq(product.getOpid());
orderItemCreateReq.setProductQuantity(product.getNumber()); orderItemCreateReq.setProductQuantity(product.getNumber());
orderItemCreateReq.setProductPrice(product.getPrice()); orderItemCreateReq.setProductPrice(product.getPrice());
...@@ -2810,7 +2822,7 @@ public class OrderSdkAdapter { ...@@ -2810,7 +2822,7 @@ public class OrderSdkAdapter {
Long setmealTotalSettlementPrice = 0L; Long setmealTotalSettlementPrice = 0L;
for (CreateOrderProductRequest createOrderProductRequest : product.getComboProduct()) { for (CreateOrderProductRequest createOrderProductRequest : product.getComboProduct()) {
// 删除的不计算在内 // 删除的不计算在内
if(createOrderProductRequest.getIsDeleted() != null && createOrderProductRequest.getIsDeleted()) { if(createOrderProductRequest.getIsDeleted() != null && createOrderProductRequest.getIsDeleted()) {
continue; continue;
} }
Long comboProductTotalDiscountAmount = createOrderProductRequest.getTotalDiscountAmount() == null ? 0L : createOrderProductRequest.getTotalDiscountAmount(); Long comboProductTotalDiscountAmount = createOrderProductRequest.getTotalDiscountAmount() == null ? 0L : createOrderProductRequest.getTotalDiscountAmount();
...@@ -2843,6 +2855,7 @@ public class OrderSdkAdapter { ...@@ -2843,6 +2855,7 @@ public class OrderSdkAdapter {
OrderProductAddInfoDto addInfo = JSONObject.parseObject(product.getAddInfo(), OrderProductAddInfoDto.class); OrderProductAddInfoDto addInfo = JSONObject.parseObject(product.getAddInfo(), OrderProductAddInfoDto.class);
if (addInfo !=null ) { if (addInfo !=null ) {
orderItemCreateReq.setProductProperty(addInfo.getAttributeNames()); orderItemCreateReq.setProductProperty(addInfo.getAttributeNames());
orderItemCreateReq.setProductForeignProperty(addInfo.getAttributeForeignNames());
} }
orderItemCreateReq.setProductPicUrl(product.getPicture()); orderItemCreateReq.setProductPicUrl(product.getPicture());
orderItemCreateReq.setThirdProductId(product.getCustomerCode()); orderItemCreateReq.setThirdProductId(product.getCustomerCode());
...@@ -3012,13 +3025,17 @@ public class OrderSdkAdapter { ...@@ -3012,13 +3025,17 @@ public class OrderSdkAdapter {
CreateOrderProductRequest createOrderProductRequest = new CreateOrderProductRequest(); CreateOrderProductRequest createOrderProductRequest = new CreateOrderProductRequest();
createOrderProductRequest.setProductCode(productBean.getProductCode()); createOrderProductRequest.setProductCode(productBean.getProductCode());
createOrderProductRequest.setProductName(productBean.getProductName()); createOrderProductRequest.setProductName(productBean.getProductName());
createOrderProductRequest.setProductForeignName(productBean.getProductForeignName());
createOrderProductRequest.setNumber(productBean.getNumber()); createOrderProductRequest.setNumber(productBean.getNumber());
createOrderProductRequest.setParentProductId(productBean.getParentProductId()); createOrderProductRequest.setParentProductId(productBean.getParentProductId());
createOrderProductRequest.setTrackingNo(trackingNo); createOrderProductRequest.setTrackingNo(trackingNo);
createOrderProductRequest.setAddInfo(productBean.getAddInfo()); createOrderProductRequest.setAddInfo(productBean.getAddInfo());
createOrderProductRequest.setForeignAddInfo(productBean.getForeignAddInfo());
createOrderProductRequest.setProductId(productBean.getProductId()); createOrderProductRequest.setProductId(productBean.getProductId());
createOrderProductRequest.setSpecification(productBean.getSpecification()); createOrderProductRequest.setSpecification(productBean.getSpecification());
createOrderProductRequest.setSpecificationName(productBean.getSpecificationName()); createOrderProductRequest.setSpecificationName(productBean.getSpecificationName());
createOrderProductRequest.setSpecificationForeignName(productBean.getSpecificationName());
createOrderProductRequest.setCustomerCode(productBean.getCustomerCode()); createOrderProductRequest.setCustomerCode(productBean.getCustomerCode());
createOrderProductRequest.setSequence(productBean.getSequence()); createOrderProductRequest.setSequence(productBean.getSequence());
createOrderProductRequest.setPrice(productBean.getPrice()); createOrderProductRequest.setPrice(productBean.getPrice());
......
...@@ -42,6 +42,7 @@ public enum OrderSourceType { ...@@ -42,6 +42,7 @@ public enum OrderSourceType {
FMWD("fmwd", "非码微店", 25), FMWD("fmwd", "非码微店", 25),
Y_POS("ypos", "非码云POS", 26), Y_POS("ypos", "非码云POS", 26),
TIKTOKPAY("tiktokpay","抖音支付", 27), TIKTOKPAY("tiktokpay","抖音支付", 27),
BEAUTIFUL("beautiful","美业", 28),
parkingmanual("parkingmanual", "农工商停车手工录单", 98), parkingmanual("parkingmanual", "农工商停车手工录单", 98),
PARKING("parking", "农工商停车", 99), PARKING("parking", "农工商停车", 99),
SDG("sdg", "闪电购", 1000); SDG("sdg", "闪电购", 1000);
......
...@@ -42,6 +42,11 @@ public class AssortmentGroupCreateOrderRequest extends BaseConfig { ...@@ -42,6 +42,11 @@ public class AssortmentGroupCreateOrderRequest extends BaseConfig {
* 门店名称 * 门店名称
*/ */
private String shopName; private String shopName;
/**
* 门店名称英文
*/
private String shopNameEn;
/** /**
* 用户ID * 用户ID
*/ */
......
...@@ -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;
/** /**
* 第三方商品编号,商品服务唯一 * 第三方商品编号,商品服务唯一
*/ */
...@@ -76,10 +86,14 @@ public class CreateOrderProductRequest extends BaseConfig { ...@@ -76,10 +86,14 @@ public class CreateOrderProductRequest extends BaseConfig {
* 属性 温|半糖|甜 * 属性 温|半糖|甜
*/ */
private String addInfo; private String addInfo;
private String foreignAddInfo;
/** /**
* 属性 * 属性
*/ */
private String extras; private String extras;
private String foreignExtras;
/** /**
* 第三方菜品分类Id * 第三方菜品分类Id
*/ */
......
...@@ -27,6 +27,11 @@ public class OrderProductAddInfoDto extends BaseConfig { ...@@ -27,6 +27,11 @@ public class OrderProductAddInfoDto extends BaseConfig {
private String attributeNames; private String attributeNames;
/** /**
* 属性英文名称 多糖/冷/常温
*/
private String attributeForeignNames;
/**
* 是否是套餐内固定商品 * 是否是套餐内固定商品
*/ */
private Boolean isFixedProduct; private Boolean isFixedProduct;
......
...@@ -19,6 +19,10 @@ public class OrderSpecialExtraAttrRequest { ...@@ -19,6 +19,10 @@ public class OrderSpecialExtraAttrRequest {
*/ */
private String attributeName; private String attributeName;
/** /**
* 属性英文名
*/
private String attributeForeignName;
/**
* 入机code * 入机code
*/ */
private String specialCode; private String specialCode;
......
...@@ -210,6 +210,7 @@ public class QueryOrdersResponse { ...@@ -210,6 +210,7 @@ public class QueryOrdersResponse {
*/ */
private String thirdShopId; private String thirdShopId;
private String shopName; private String shopName;
private String shopNameEn;
private String source; private String source;
private String sourceName; private String sourceName;
/** /**
...@@ -577,6 +578,10 @@ public class QueryOrdersResponse { ...@@ -577,6 +578,10 @@ public class QueryOrdersResponse {
*/ */
private String productName; private String productName;
/** /**
* 商品英文名称
*/
private String productForeignName;
/**
* 商品排序 * 商品排序
*/ */
private int sequence; private int sequence;
...@@ -585,16 +590,20 @@ public class QueryOrdersResponse { ...@@ -585,16 +590,20 @@ public class QueryOrdersResponse {
*/ */
private String specification; private String specification;
private String specificationName; private String specificationName;
private String specificationForeignName;
private String unit; private String unit;
/** /**
* 商品扩展字段 保存为 * 商品扩展字段 保存为
*/ */
private String addInfo; private String addInfo;
private String foreignAddInfo;
/** /**
* 商品属性 * 商品属性
*/ */
private String productProperty; private String productProperty;
private String productForeignProperty;
/** /**
* 数据库字段(保存套餐商品是否为固定商品) * 数据库字段(保存套餐商品是否为固定商品)
......
...@@ -1314,7 +1314,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService { ...@@ -1314,7 +1314,7 @@ public class OrderCenterSdkServiceImpl implements OrderCenterSdkService {
public OrderDetailResponse updateOrderItem(AssortmentSdkUpdateOrderProductInfoRequest updateOrderProductInfoRequest) { public OrderDetailResponse updateOrderItem(AssortmentSdkUpdateOrderProductInfoRequest updateOrderProductInfoRequest) {
QueryOrderByIdResponse queryOrderByIdResponse = null; QueryOrderByIdResponse queryOrderByIdResponse = null;
/** /**
* 若先清除再更新先清除现有订单商品信息 * 若先清除再更新 先清除现有订单商品信息
*/ */
if (AssortmentSdkUpdateOrderProductInfoRequest.OpUpdateOrderItemEnum.deleteAndUpdate == updateOrderProductInfoRequest.getOpUpdateOrderItemEnum()) { if (AssortmentSdkUpdateOrderProductInfoRequest.OpUpdateOrderItemEnum.deleteAndUpdate == updateOrderProductInfoRequest.getOpUpdateOrderItemEnum()) {
this.orderSdkService.clearGroupOrder(this.orderSdkAdapter.convertAssortmentSdkUpdateOrderProductInfoRequestTo(updateOrderProductInfoRequest), updateOrderProductInfoRequest.getTrackingNo()); this.orderSdkService.clearGroupOrder(this.orderSdkAdapter.convertAssortmentSdkUpdateOrderProductInfoRequestTo(updateOrderProductInfoRequest), updateOrderProductInfoRequest.getTrackingNo());
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,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.3.RELEASE</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>2.6.1-SNAPSHOT</version> <version>3.2.8.RELEASE</version>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
<scope>provided</scope> <scope>provided</scope>
</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();
...@@ -89,6 +90,7 @@ public class ShoppingCartAdapter { ...@@ -89,6 +90,7 @@ public class ShoppingCartAdapter {
ProductAttributeValueType productAttributeValueType = new ProductAttributeValueType(); ProductAttributeValueType productAttributeValueType = new ProductAttributeValueType();
productAttributeValueType.setAttributeId(cartGoodsExtra.getAttributeId()); productAttributeValueType.setAttributeId(cartGoodsExtra.getAttributeId());
productAttributeValueType.setAttributeValue(cartGoodsExtra.getAttributeName()); productAttributeValueType.setAttributeValue(cartGoodsExtra.getAttributeName());
productAttributeValueType.setForeignAttributeValue(cartGoodsExtra.getAttributeForeignName());
attributeValueTypes.add(productAttributeValueType); attributeValueTypes.add(productAttributeValueType);
} }
} }
...@@ -280,8 +282,12 @@ public class ShoppingCartAdapter { ...@@ -280,8 +282,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 +298,29 @@ public class ShoppingCartAdapter { ...@@ -292,17 +298,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())) {
...@@ -383,6 +401,7 @@ public class ShoppingCartAdapter { ...@@ -383,6 +401,7 @@ public class ShoppingCartAdapter {
CartGoods.MaterialGoods material = new CartGoods.MaterialGoods(); CartGoods.MaterialGoods material = new CartGoods.MaterialGoods();
material.setQty(materialGoods.getQty()); material.setQty(materialGoods.getQty());
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());
...@@ -479,9 +498,13 @@ public class ShoppingCartAdapter { ...@@ -479,9 +498,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());
...@@ -537,9 +560,11 @@ public class ShoppingCartAdapter { ...@@ -537,9 +560,11 @@ public class ShoppingCartAdapter {
} }
List<String> attributeIds = extra.stream().map(CartGoods.CartGoodsExtra::getAttributeId).collect(Collectors.toList()); List<String> attributeIds = extra.stream().map(CartGoods.CartGoodsExtra::getAttributeId).collect(Collectors.toList());
List<String> attributeNames = extra.stream().map(CartGoods.CartGoodsExtra::getAttributeName).collect(Collectors.toList()); List<String> attributeNames = extra.stream().map(CartGoods.CartGoodsExtra::getAttributeName).collect(Collectors.toList());
List<String> attributeForeignNames = extra.stream().map(CartGoods.CartGoodsExtra::getAttributeForeignName).collect(Collectors.toList());
Map<String, String> result = new HashMap<>(); Map<String, String> result = new HashMap<>();
result.put(ATTRIBUTEID, StringUtils.join(attributeIds, "/")); result.put(ATTRIBUTEID, StringUtils.join(attributeIds, "/"));
result.put(ATTRIBUTENAME, StringUtils.join(attributeNames, "/")); result.put(ATTRIBUTENAME, StringUtils.join(attributeNames, "/"));
result.put(ATTRIBUTEFOREIGNNAME, StringUtils.join(attributeForeignNames, "/"));
return result; return result;
} }
......
...@@ -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;
/** /**
* 购物车一行商品的现单价 * 购物车一行商品的现单价
*/ */
......
...@@ -46,12 +46,12 @@ ...@@ -46,12 +46,12 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>assortment-ordercenter-sdk</artifactId> <artifactId>assortment-ordercenter-sdk</artifactId>
<version>2.1.38-RELEASE</version> <version>2.1.39-RELEASE</version>
</dependency> </dependency>
<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>2.8.4-SNAPSHOT</version> <version>4.0.3.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<artifactId>membercenter-sdk</artifactId> <artifactId>membercenter-sdk</artifactId>
...@@ -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.2.8.RELEASE</version>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
</dependency> </dependency>
<dependency> <dependency>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<dependency> <dependency>
<artifactId>assortment-data-manager</artifactId> <artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId> <groupId>com.freemud.sdk.api.assortment</groupId>
<version>5.2.7.RELEASE</version> <version>5.4.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>cn.freemud.commons</groupId> <groupId>cn.freemud.commons</groupId>
......
...@@ -53,4 +53,26 @@ public class ShoppingCartAdapter { ...@@ -53,4 +53,26 @@ public class ShoppingCartAdapter {
} }
return extraName.toString(); return extraName.toString();
} }
public String getForeignExtras(String skuNameEn, String attributeNamesEn) {
if (StringUtils.isBlank(skuNameEn)) {
skuNameEn = "";
}
if (StringUtils.isBlank(attributeNamesEn)) {
attributeNamesEn = "";
}
skuNameEn = skuNameEn.replace("|", "/") + "/" + attributeNamesEn;
String[] names = skuNameEn.split("/");
StringBuilder extraName = new StringBuilder("");
if (names.length >= 2) {
for (int i = 1; i < names.length; i++) {
if (i == names.length - 1) {
extraName.append(names[i]);
} else {
extraName.append(names[i]).append("/");
}
}
}
return extraName.toString();
}
} }
...@@ -14,6 +14,8 @@ public class OrderProductAddInfo { ...@@ -14,6 +14,8 @@ public class OrderProductAddInfo {
* 属性名称 多糖/冷/常温 * 属性名称 多糖/冷/常温
*/ */
private String attributeNames; private String attributeNames;
private String attributeForeignNames;
/** /**
* 活动商品集合 * 活动商品集合
*/ */
......
...@@ -32,6 +32,7 @@ public class ProductGroupDto { ...@@ -32,6 +32,7 @@ public class ProductGroupDto {
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;
......
...@@ -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;
/** /**
* 是否限制库存 * 是否限制库存
* 用于创建订单时,是否扣减库存 * 用于创建订单时,是否扣减库存
...@@ -296,6 +300,7 @@ public class ShoppingCartGoodsDto { ...@@ -296,6 +300,7 @@ public class ShoppingCartGoodsDto {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 入机code * 入机code
*/ */
...@@ -308,10 +313,12 @@ public class ShoppingCartGoodsDto { ...@@ -308,10 +313,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).attributeForeignNames(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;
/** /**
* 赠送商品数量 * 赠送商品数量
*/ */
......
...@@ -40,4 +40,8 @@ public class PayGiftCouponVo { ...@@ -40,4 +40,8 @@ public class PayGiftCouponVo {
* 折扣券的折扣率 例如8.8折 * 折扣券的折扣率 例如8.8折
*/ */
private String benefitRebate; private String benefitRebate;
/**
* 券log
*/
private String logo;
} }
...@@ -39,12 +39,22 @@ public class ProductVo { ...@@ -39,12 +39,22 @@ public class ProductVo {
* 商品名称 * 商品名称
*/ */
private String name; private String name;
/**
* 商品名称
*/
private String foreignName;
/** /**
* 商品spu名称 * 商品spu名称
*/ */
private String spuName; private String spuName;
/** /**
* 商品spu名称
*/
private String spuForeignName;
/**
* 加购人ID * 加购人ID
*/ */
private String userId; private String userId;
...@@ -73,6 +83,9 @@ public class ProductVo { ...@@ -73,6 +83,9 @@ public class ProductVo {
* 商品的规格信息加属性信息 * 商品的规格信息加属性信息
*/ */
private String extras; private String extras;
private String foreignExtras;
/** /**
* 标准价格 精确到分 * 标准价格 精确到分
*/ */
...@@ -139,6 +152,11 @@ public class ProductVo { ...@@ -139,6 +152,11 @@ public class ProductVo {
* 属性名称 订单详情展示 V1.5.2版本增加 * 属性名称 订单详情展示 V1.5.2版本增加
*/ */
private String attributeNames; private String attributeNames;
/**
* 属性名称英文
*/
private String attributeNamesEn;
/** /**
* 是否包含商品券 V1.5.2版本增加 * 是否包含商品券 V1.5.2版本增加
*/ */
......
...@@ -37,6 +37,8 @@ public class QueryOrderResponseVo { ...@@ -37,6 +37,8 @@ public class QueryOrderResponseVo {
private String shopName; private String shopName;
private String shopNameEn;
private String shopAddress; private String shopAddress;
private String shopPhone; private String shopPhone;
......
...@@ -34,7 +34,7 @@ public class QueryOrderVo { ...@@ -34,7 +34,7 @@ public class QueryOrderVo {
*/ */
private String oid; private String oid;
/** /**
* 订单状态 enum queryOrderStatus 全部订单 1 待取餐 2 已完成 3 全部 4.退款,5 待支付 ,6 已取消 7未支付取消 * 订单状态 enum queryOrderStatus 全部订单 1 待取餐 2 已完成 3 全部 4.退款,5 待支付 ,6 已取消 7未支付取消 8待使用(美业)
*/ */
private Integer queryOrderStatus; private Integer queryOrderStatus;
/** /**
......
...@@ -86,6 +86,8 @@ public class PreviewOrderInfoVo { ...@@ -86,6 +86,8 @@ public class PreviewOrderInfoVo {
*/ */
private String shopName; private String shopName;
private String shopNameEn;
private List<PromotionMessageDto> promotionMessages; private List<PromotionMessageDto> promotionMessages;
/** /**
......
...@@ -22,6 +22,8 @@ public enum OrderChannelType { ...@@ -22,6 +22,8 @@ public enum OrderChannelType {
SAASMALL("saasmall", "微商城"), SAASMALL("saasmall", "微商城"),
BEAUTIFUL("beautiful", "美业"),
APP("app", "APP"); APP("app", "APP");
private String code; private String code;
......
...@@ -22,7 +22,10 @@ public enum QueryOrderStatus { ...@@ -22,7 +22,10 @@ public enum QueryOrderStatus {
NO_PAY(5, "待支付"), NO_PAY(5, "待支付"),
ORDER_CANCEL(6, "已取消"), ORDER_CANCEL(6, "已取消"),
//密雪 //密雪
ORDER_CANCEL_MIXUE(7, "未支付已取消"); ORDER_CANCEL_MIXUE(7, "未支付已取消"),
// 美业专用
WAIT_USE(8, "待使用");
private Integer code; private Integer code;
......
...@@ -256,9 +256,10 @@ public class AppOrderServiceImpl implements AppOrderService { ...@@ -256,9 +256,10 @@ public class AppOrderServiceImpl implements AppOrderService {
if (!PayStatus.NOT_PAY.getCode().equals(orderBean.getPayStatus()) || !OrderStatus.WAIT_PAY.getCode().equals(orderBean.getStatus())) { if (!PayStatus.NOT_PAY.getCode().equals(orderBean.getPayStatus()) || !OrderStatus.WAIT_PAY.getCode().equals(orderBean.getStatus())) {
throw new ServiceException(ResponseResult.ORDER_STATUS_PRE_PAYMENT_NOT_SUPPORT); throw new ServiceException(ResponseResult.ORDER_STATUS_PRE_PAYMENT_NOT_SUPPORT);
} }
//蜜雪sessionId不一致的跳过验证
OrderExtInfoDto extInfo = JSONObject.parseObject(orderBean.getExtInfo(), OrderExtInfoDto.class); OrderExtInfoDto extInfo = JSONObject.parseObject(orderBean.getExtInfo(), OrderExtInfoDto.class);
if (extInfo == null || StringUtils.isBlank(extInfo.getSessionId()) || !extInfo.getSessionId().equals(createPrepayVo.getSessionId())) { // if (extInfo == null || StringUtils.isBlank(extInfo.getSessionId()) || !extInfo.getSessionId().equals(createPrepayVo.getSessionId())) {
if (extInfo == null || StringUtils.isBlank(extInfo.getSessionId())) {
throw new ServiceException(ResponseResult.ORDER_OWNER_ERROR); throw new ServiceException(ResponseResult.ORDER_OWNER_ERROR);
} }
} }
......
...@@ -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;
...@@ -204,6 +205,7 @@ public class CheckOrder { ...@@ -204,6 +205,7 @@ public class CheckOrder {
createOrderVo.setStoreName(storeResponseDto.getStoreName()); createOrderVo.setStoreName(storeResponseDto.getStoreName());
createOrderVo.setStoreAddress(storeResponseDto.getAddress()); createOrderVo.setStoreAddress(storeResponseDto.getAddress());
createOrderVo.setThirdShopId(storeResponseDto.getThirdPartCode()); createOrderVo.setThirdShopId(storeResponseDto.getThirdPartCode());
createOrderVo.setStoreNameEn(storeResponseDto.getStoreNameEn());
return storeResponseDto; return storeResponseDto;
} }
...@@ -623,6 +625,8 @@ public class CheckOrder { ...@@ -623,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);
} }
...@@ -723,6 +727,7 @@ public class CheckOrder { ...@@ -723,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());
......
...@@ -59,6 +59,7 @@ import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse; ...@@ -59,6 +59,7 @@ import com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse;
import com.freemud.sdk.api.assortment.order.service.OrderCenterSdkService; import com.freemud.sdk.api.assortment.order.service.OrderCenterSdkService;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang.ObjectUtils; import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -82,6 +83,7 @@ import java.util.stream.Collectors; ...@@ -82,6 +83,7 @@ import java.util.stream.Collectors;
* @Copyright: ${DATE.YARE} www.freemud.cn Inc. All rights reserved. * @Copyright: ${DATE.YARE} www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目 * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/ */
@Slf4j
@Service @Service
public class EncircleOrderServiceImpl implements EncircleOrderService { public class EncircleOrderServiceImpl implements EncircleOrderService {
...@@ -142,10 +144,14 @@ public class EncircleOrderServiceImpl implements EncircleOrderService { ...@@ -142,10 +144,14 @@ public class EncircleOrderServiceImpl implements EncircleOrderService {
storeTableListRequest.setStoreCode(createOrderVo.getShopId()); storeTableListRequest.setStoreCode(createOrderVo.getShopId());
storeTableListRequest.setTableCode(assortmentCustomerInfoVo.getTableNumber()); storeTableListRequest.setTableCode(assortmentCustomerInfoVo.getTableNumber());
com.freemud.application.sdk.api.base.BaseResponse<GetStoreTableResponse> storeTable = storeCenterService.getStoreTable(storeTableListRequest,LogThreadLocal.getTrackingNo()); com.freemud.application.sdk.api.base.BaseResponse<GetStoreTableResponse> storeTable = storeCenterService.getStoreTable(storeTableListRequest,LogThreadLocal.getTrackingNo());
//activeFlag 是否有效 0无效 1有效
//orderState 点餐状态 1开台 2清台
if(ObjectUtils.notEqual(ResponseResult.SUCCESS.getCode(),storeTable.getCode()) || storeTable.getData() == null) return ResponseUtil.error(ResponseResult.STORE_NOT_TABLE_INFO); if(ObjectUtils.notEqual(ResponseResult.SUCCESS.getCode(),storeTable.getCode()) || storeTable.getData() == null) return ResponseUtil.error(ResponseResult.STORE_NOT_TABLE_INFO);
if(storeTable.getData().getActiveFlag() == 0) return ResponseUtil.error(ResponseResult.QUERY_TABLESTATUS_ACTIVEFLAG_ERROR); if(storeTable.getData().getActiveFlag() == 0) return ResponseUtil.error(ResponseResult.QUERY_TABLESTATUS_ACTIVEFLAG_ERROR);
if(storeTable.getData().getOrderState() == 1) return ResponseUtil.success(); if(storeTable.getData().getOrderState() == 1) {
log.info("门店返回1,已开台");
return ResponseUtil.success();
}
/** /**
* 尝试获取Redis锁 ==>获取锁失败直接提示用户有人正在开台或桌号已被占用 * 尝试获取Redis锁 ==>获取锁失败直接提示用户有人正在开台或桌号已被占用
* 锁过期时间 24小时 * 锁过期时间 24小时
...@@ -203,7 +209,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService { ...@@ -203,7 +209,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService {
throw e; throw e;
}finally { }finally {
//释放锁 //释放锁
RedisLock.getInstance(redisTemplate).unlock(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.CREATERESERVEORDER_LOCKKEY_PREFIX)); redisTemplate.delete(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.CREATERESERVEORDER_LOCKKEY_PREFIX));
} }
/** /**
* 开台成功 * 开台成功
...@@ -222,6 +228,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService { ...@@ -222,6 +228,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService {
groupCreateOrderRequest.setCompanyId(assortmentCustomerInfoVo.getPartnerId()); groupCreateOrderRequest.setCompanyId(assortmentCustomerInfoVo.getPartnerId());
groupCreateOrderRequest.setShopId(assortmentCustomerInfoVo.getStoreId()); groupCreateOrderRequest.setShopId(assortmentCustomerInfoVo.getStoreId());
groupCreateOrderRequest.setShopName(storeResponseDto.getStoreName()); groupCreateOrderRequest.setShopName(storeResponseDto.getStoreName());
groupCreateOrderRequest.setShopNameEn(storeResponseDto.getStoreNameEn());
groupCreateOrderRequest.setBarCounter(assortmentCustomerInfoVo.getTableNumber()); groupCreateOrderRequest.setBarCounter(assortmentCustomerInfoVo.getTableNumber());
groupCreateOrderRequest.setOrderClient(OrderClientType.WAI_MEAL.getIndex()); //默认围餐 groupCreateOrderRequest.setOrderClient(OrderClientType.WAI_MEAL.getIndex()); //默认围餐
//开台不存用户信息 //开台不存用户信息
...@@ -332,7 +339,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService { ...@@ -332,7 +339,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService {
throw new ServiceException(ResponseResult.UPDATE_ORDER_INFO_ERROR); throw new ServiceException(ResponseResult.UPDATE_ORDER_INFO_ERROR);
}finally { }finally {
//释放锁 //释放锁
RedisLock.getInstance(redisTemplate).unlock(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.ORDER_PLUS_DISH_LOCKKEY_PREFIX)); redisTemplate.delete(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.ORDER_PLUS_DISH_LOCKKEY_PREFIX));
try { try {
ShoppingCartBaseResponse cartBaseResponse = shoppingCartClient.clearShoppingCart(shoppingCartClearDto); ShoppingCartBaseResponse cartBaseResponse = shoppingCartClient.clearShoppingCart(shoppingCartClearDto);
if(cartBaseResponse == null || ObjectUtils.notEqual(cartBaseResponse.getCode(),RESPONSE_SUCCESS_CODE)){ if(cartBaseResponse == null || ObjectUtils.notEqual(cartBaseResponse.getCode(),RESPONSE_SUCCESS_CODE)){
...@@ -579,7 +586,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService { ...@@ -579,7 +586,7 @@ public class EncircleOrderServiceImpl implements EncircleOrderService {
throw new ServiceException(ResponseResult.PAY_BACKEND_CONFIG_ERROR); throw new ServiceException(ResponseResult.PAY_BACKEND_CONFIG_ERROR);
}finally { }finally {
//释放锁 //释放锁
RedisLock.getInstance(redisTemplate).unlock(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.CREATE_PRE_PAYMENTORDER_LOCKKEY_PREFIX)); redisTemplate.delete(orderCommonService.redisLockInfo(assortmentCustomerInfoVo,RedisCacheEnum.CREATE_PRE_PAYMENTORDER_LOCKKEY_PREFIX));
if(orderResponseVo != null && Objects.equals(orderResponseVo.getPaySuccess(), false) && updateDiscountApportion) { if(orderResponseVo != null && Objects.equals(orderResponseVo.getPaySuccess(), false) && updateDiscountApportion) {
//记录订单支付状态,防止用户在唤起支付后继续下单,同时也防止重复进行促销计算 //记录订单支付状态,防止用户在唤起支付后继续下单,同时也防止重复进行促销计算
mealCacheManager.setOrderCreatePreParmentLock(assortmentCustomerInfoVo.getPartnerId(),assortmentCustomerInfoVo.getStoreId(),assortmentCustomerInfoVo.getTableNumber()); mealCacheManager.setOrderCreatePreParmentLock(assortmentCustomerInfoVo.getPartnerId(),assortmentCustomerInfoVo.getStoreId(),assortmentCustomerInfoVo.getTableNumber());
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<version>1.3.40.RELEASE</version> <version>1.3.41.RELEASE</version>
<artifactId>ordercenter-sdk</artifactId> <artifactId>ordercenter-sdk</artifactId>
<dependencies> <dependencies>
......
...@@ -71,4 +71,5 @@ ...@@ -71,4 +71,5 @@
| 1.3.37.RELEASE | OrderExtInfoDto新增储值卡号 | 王航航 | 2021-02-25 | | 1.3.37.RELEASE | OrderExtInfoDto新增储值卡号 | 王航航 | 2021-02-25 |
| 1.3.38.RELEASE | 麦咖啡增加新的促销类型 | 徐康 | 2021-03-02 | | 1.3.38.RELEASE | 麦咖啡增加新的促销类型 | 徐康 | 2021-03-02 |
| 1.3.39.RELEASE | 订单满赠优惠 | 张志恒 | 2021-03-11 | | 1.3.39.RELEASE | 订单满赠优惠 | 张志恒 | 2021-03-11 |
| 1.3.40.RELEASE | 外卖配送自动流转 | 李小二 | 2021-03-11 | | 1.3.40.RELEASE | 外卖配送自动流转 | 李小二 | 2021-03-11 |
\ No newline at end of file | 1.3.41.RELEASE | 美业 | 刘鹏飞 | 2021-03-12 |
\ No newline at end of file
...@@ -37,6 +37,7 @@ public enum OrderClientType { ...@@ -37,6 +37,7 @@ public enum OrderClientType {
DPZHCT(24, "美团点评智慧餐厅"), DPZHCT(24, "美团点评智慧餐厅"),
FMWD(25, "非码微店"), FMWD(25, "非码微店"),
TIKTOKPAY(27, "抖音小程序"), TIKTOKPAY(27, "抖音小程序"),
BEAUTIFUL(28, "美业"),
PARKING(99 , "农工商停车"), PARKING(99 , "农工商停车"),
; ;
......
...@@ -40,6 +40,9 @@ public class GroupCreateOrderRequest { ...@@ -40,6 +40,9 @@ public class GroupCreateOrderRequest {
//门店名 //门店名
private String storeName; private String storeName;
//英文门店名
private String storeNameEn;
//商户名 //商户名
private String partnerName; private String partnerName;
......
...@@ -22,4 +22,7 @@ public class OrderExtendedReq { ...@@ -22,4 +22,7 @@ public class OrderExtendedReq {
//渠道分组编号 //渠道分组编号
private String orderClientGroupCode; private String orderClientGroupCode;
//订单门店英文名称
private String storeNameEn;
} }
...@@ -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;
...@@ -81,6 +86,9 @@ public class OrderItemCreateReq { ...@@ -81,6 +86,9 @@ public class OrderItemCreateReq {
//商品属性 //商品属性
private String productProperty; private String productProperty;
//商品英文属性
private String productForeignProperty;
//重量 //重量
private Double weight; private Double weight;
......
...@@ -88,6 +88,9 @@ public class OrderInfoReqs { ...@@ -88,6 +88,9 @@ public class OrderInfoReqs {
//门店名 //门店名
private String storeName; private String storeName;
//门店英文名
private String storeNameEn;
//门店全局唯一编号 //门店全局唯一编号
private String storeUnifyId; private String storeUnifyId;
......
...@@ -46,6 +46,9 @@ public class OrderItemResp { ...@@ -46,6 +46,9 @@ public class OrderItemResp {
//商品名称 //商品名称
private String productName; private String productName;
//商品英文名称
private String productForeignName;
//商品序号 //商品序号
private Integer productSeq; private Integer productSeq;
...@@ -54,6 +57,9 @@ public class OrderItemResp { ...@@ -54,6 +57,9 @@ public class OrderItemResp {
//商品规格名称 //商品规格名称
private String productSpecName; private String productSpecName;
//商品规格英文名称
private String productForeignSpecName;
//商品UPC码 //商品UPC码
private String productUpc; private String productUpc;
...@@ -82,6 +88,9 @@ public class OrderItemResp { ...@@ -82,6 +88,9 @@ public class OrderItemResp {
//商品属性 //商品属性
private String productProperty; private String productProperty;
//商品属性
private String productForeignProperty;
//重量 //重量
private BigDecimal weight; private BigDecimal weight;
......
...@@ -705,6 +705,7 @@ public class OrderSdkService { ...@@ -705,6 +705,7 @@ public class OrderSdkService {
* @return * @return
*/ */
public QueryByCodeResponse updateGroupOrder(GroupOrderUpdateReq groupOrderAffirmReq, String trackingNo){ public QueryByCodeResponse updateGroupOrder(GroupOrderUpdateReq groupOrderAffirmReq, String trackingNo){
log.info(JSONArray.toJSONString(groupOrderAffirmReq));
QueryByCodeResponse queryByCodeResponse = RequestThirdPartyUtils.httpJsonReqComplexNew(this.restTemplate, InterfaceAddressConstant.GROUP_UPDATEORDER, createBaseRequest(groupOrderAffirmReq, trackingNo), new ParameterizedTypeReference<QueryByCodeResponse>() {}); QueryByCodeResponse queryByCodeResponse = RequestThirdPartyUtils.httpJsonReqComplexNew(this.restTemplate, InterfaceAddressConstant.GROUP_UPDATEORDER, createBaseRequest(groupOrderAffirmReq, trackingNo), new ParameterizedTypeReference<QueryByCodeResponse>() {});
return queryByCodeResponse; return queryByCodeResponse;
} }
...@@ -716,7 +717,7 @@ public class OrderSdkService { ...@@ -716,7 +717,7 @@ public class OrderSdkService {
* @return * @return
*/ */
public BaseResponse<PaySuccessResp> clearGroupOrder(GroupOrderClearReq groupOrderAffirmReq,String trackingNo){ public BaseResponse<PaySuccessResp> clearGroupOrder(GroupOrderClearReq groupOrderAffirmReq,String trackingNo){
StringBuilder urlString = new StringBuilder(InterfaceAddressConstant.GROUP_CLEARITEMS); StringBuilder urlString = new StringBuilder(InterfaceAddressConstant.GROUP_CLEARITEMS);
urlString.append("?"); urlString.append("?");
if(StringUtils.isNotEmpty(groupOrderAffirmReq.getOrderCode())){ if(StringUtils.isNotEmpty(groupOrderAffirmReq.getOrderCode())){
urlString.append("&orderCode=") urlString.append("&orderCode=")
......
...@@ -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.3.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
<dependency> <dependency>
<groupId>cn.freemud</groupId> <groupId>cn.freemud</groupId>
<artifactId>ordercenter-sdk</artifactId> <artifactId>ordercenter-sdk</artifactId>
<version>1.3.28.RELEASE</version> <version>1.9.6-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
<dependency> <dependency>
<artifactId>assortment-data-manager</artifactId> <artifactId>assortment-data-manager</artifactId>
<groupId>com.freemud.sdk.api.assortment</groupId> <groupId>com.freemud.sdk.api.assortment</groupId>
<version>4.6.8.RELEASE</version> <version>5.4.4-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.freemud.application.service.sdk</groupId> <groupId>com.freemud.application.service.sdk</groupId>
<version>2.10.RELEASE</version> <version>3.2.8.RELEASE</version>
<artifactId>storecenter-sdk</artifactId> <artifactId>storecenter-sdk</artifactId>
</dependency> </dependency>
......
...@@ -553,6 +553,7 @@ public class CouponAdapter { ...@@ -553,6 +553,7 @@ public class CouponAdapter {
couponPromotionVO.setCouponCode(shoppingCartInfoRequestVo.getCouponCode()); couponPromotionVO.setCouponCode(shoppingCartInfoRequestVo.getCouponCode());
couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType()); couponPromotionVO.setOrderType(shoppingCartInfoRequestVo.getOrderType());
couponPromotionVO.setFlg(shoppingCartInfoRequestVo.getFlag()); couponPromotionVO.setFlg(shoppingCartInfoRequestVo.getFlag());
couponPromotionVO.setUnChooseCouponCode(shoppingCartInfoRequestVo.getUnChooseCouponCode());
return couponPromotionVO; return couponPromotionVO;
} }
} }
...@@ -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());
......
...@@ -90,6 +90,10 @@ public class ActivityCalculationDiscountResponseDto { ...@@ -90,6 +90,10 @@ public class ActivityCalculationDiscountResponseDto {
*/ */
private Map<String, CheckSpqInfoResponseDto> validCouponMap; private Map<String, CheckSpqInfoResponseDto> validCouponMap;
/** /**
* 校验后有效的spqid对应的uuid
*/
private Map<String, List<String>> spqIdToCartUuid;
/**
* 扣减库存 * 扣减库存
*/ */
private List<SubtractStockVO> stocks; private List<SubtractStockVO> stocks;
......
...@@ -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,换购券
*/ */
......
...@@ -129,6 +129,12 @@ public class GetMemberCouponListResponseDto { ...@@ -129,6 +129,12 @@ public class GetMemberCouponListResponseDto {
* 商品信息(商品id) * 商品信息(商品id)
*/ */
private List<String> activeProducts; private List<String> activeProducts;
/**
* 券图片地址
*/
private String logo;
} }
} }
......
...@@ -143,6 +143,7 @@ public class GetMenuResponseDto { ...@@ -143,6 +143,7 @@ public class GetMenuResponseDto {
*/ */
private Integer isSkuProduct; private Integer isSkuProduct;
private String name; private String name;
private String foreignName;
/** /**
* 原始价格 单位分 * 原始价格 单位分
*/ */
...@@ -200,6 +201,7 @@ public class GetMenuResponseDto { ...@@ -200,6 +201,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;
...@@ -220,7 +222,9 @@ public class GetMenuResponseDto { ...@@ -220,7 +222,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;
} }
} }
...@@ -232,6 +236,7 @@ public class GetMenuResponseDto { ...@@ -232,6 +236,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
...@@ -240,6 +245,7 @@ public class GetMenuResponseDto { ...@@ -240,6 +245,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;
} }
} }
...@@ -249,6 +255,7 @@ public class GetMenuResponseDto { ...@@ -249,6 +255,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;
...@@ -268,6 +275,10 @@ public class GetMenuResponseDto { ...@@ -268,6 +275,10 @@ public class GetMenuResponseDto {
* 属性名称 * 属性名称
*/ */
private String attributeName; private String attributeName;
private String foreignAttributeName;
/** /**
* 属性类型 * 属性类型
*/ */
...@@ -293,6 +304,8 @@ public class GetMenuResponseDto { ...@@ -293,6 +304,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;
/** /**
* 活动商品集合 * 活动商品集合
*/ */
......
...@@ -88,6 +88,11 @@ public class CalculationSharingDiscountResponseDto { ...@@ -88,6 +88,11 @@ public class CalculationSharingDiscountResponseDto {
*/ */
private Map<String, CheckSpqInfoResponseDto> validCouponMap; private Map<String, CheckSpqInfoResponseDto> validCouponMap;
/** /**
* 校验后有效的spqid对应的uuid
*/
private Map<String, List<String>> spqIdToCartUuid;
/**
* 扣减库存 * 扣减库存
*/ */
private List<SubtractStockVO> stocks; private List<SubtractStockVO> stocks;
......
...@@ -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());
} }
} }
......
...@@ -54,6 +54,12 @@ public class ActivityCouponBean { ...@@ -54,6 +54,12 @@ public class ActivityCouponBean {
* 0-商品券 1-代金券 3-折扣券 * 0-商品券 1-代金券 3-折扣券
*/ */
private Integer couponType; private Integer couponType;
/**
* 券图片地址
*/
private String couponPic;
/** /**
* 日期描述 * 日期描述
*/ */
......
...@@ -141,19 +141,37 @@ public class CartGoods { ...@@ -141,19 +141,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
*/ */
...@@ -276,6 +294,7 @@ public class CartGoods { ...@@ -276,6 +294,7 @@ public class CartGoods {
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
} }
@Data @Data
...@@ -288,6 +307,8 @@ public class CartGoods { ...@@ -288,6 +307,8 @@ public class CartGoods {
* 属性名 * 属性名
*/ */
private String attributeName; private String attributeName;
private String attributeForeignName;
/** /**
* 麦咖啡特定属性入机code * 麦咖啡特定属性入机code
...@@ -304,6 +325,7 @@ public class CartGoods { ...@@ -304,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的拼接
*/ */
...@@ -346,14 +368,18 @@ public class CartGoods { ...@@ -346,14 +368,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
*/ */
...@@ -576,6 +602,8 @@ public class CartGoods { ...@@ -576,6 +602,8 @@ public class CartGoods {
* 加料名称 * 加料名称
*/ */
private String spuName; private String spuName;
private String spuForeignName;
/** /**
* 购物车一行商品的原单价 * 购物车一行商品的原单价
*/ */
......
...@@ -22,4 +22,5 @@ public class CouponPromotionVO { ...@@ -22,4 +22,5 @@ public class CouponPromotionVO {
private String couponCode; private String couponCode;
private Integer flg; private Integer flg;
private Integer orderType; private Integer orderType;
private String unChooseCouponCode;
} }
...@@ -61,6 +61,11 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo { ...@@ -61,6 +61,11 @@ public class ShoppingCartInfoRequestVo extends BaseRequestVo {
private String couponCode; private String couponCode;
/** /**
* 取消选择的商品券
*/
private String unChooseCouponCode;
/**
* 优惠券code列表 * 优惠券code列表
*/ */
private List<couponCode> couponCodes; private List<couponCode> couponCodes;
......
...@@ -80,7 +80,7 @@ public interface CouponService { ...@@ -80,7 +80,7 @@ public interface CouponService {
* @param cartGoods * @param cartGoods
* @return * @return
*/ */
ActivityClassifyCouponBean availableCoupon(List<CartGoods> cartGoods, String partnerId, String userId, String storeId, String couponCode, boolean hasGoodsCoupon, Integer orderType, int isNew,String appId,String MenuType); ActivityClassifyCouponBean availableCoupon(List<CartGoods> cartGoods, String partnerId, String userId, String storeId, String couponCode, boolean hasGoodsCoupon, Integer orderType, int isNew,String appId,String MenuType, String unChooseCouponCode);
/** /**
* 获取卡券服务商户密钥 * 获取卡券服务商户密钥
...@@ -102,6 +102,11 @@ public interface CouponService { ...@@ -102,6 +102,11 @@ public interface CouponService {
CheckSpqInfoResponseDto checkSpqInfo(CheckSpqInfoRequestDto requestDto, String goodsId); CheckSpqInfoResponseDto checkSpqInfo(CheckSpqInfoRequestDto requestDto, String goodsId);
GetProductsVo getSpqProductInfo(CheckSpqInfoRequestDto requestDto);
GetProductsVo getSpqProductInfo(CheckSpqInfoRequestDto requestDto, String goodsId);
/** /**
* 领券 * 领券
* *
......
...@@ -10,11 +10,15 @@ import cn.freemud.entities.vo.ShoppingCartGoodsBaseResponseVo; ...@@ -10,11 +10,15 @@ 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.service.thirdparty.StoreItemClient;
import cn.freemud.service.thirdparty.StoreItemClient;
import cn.freemud.utils.LogUtil;
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.constant.ResponseResultEnum; import com.freemud.application.sdk.api.constant.ResponseResultEnum;
import com.freemud.application.sdk.api.log.ApiLog; import com.freemud.application.sdk.api.log.ApiLog;
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;
...@@ -27,6 +31,8 @@ import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBase ...@@ -27,6 +31,8 @@ import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBase
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.Autowired;
import org.springframework.beans.factory.annotation.Autowired;
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 cn.freemud.entities.dto.GetMenuResponseDto.DataBean.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean;
......
...@@ -13,6 +13,7 @@ import cn.freemud.enums.*; ...@@ -13,6 +13,7 @@ import cn.freemud.enums.*;
import cn.freemud.service.CouponService; import cn.freemud.service.CouponService;
import cn.freemud.service.IPromotionService; import cn.freemud.service.IPromotionService;
import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant; import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
...@@ -42,14 +43,29 @@ public class CouponPromotionService implements IPromotionService { ...@@ -42,14 +43,29 @@ public class CouponPromotionService implements IPromotionService {
@Autowired @Autowired
private CouponService couponService; private CouponService couponService;
@Autowired
private AssortmentSdkService assortmentSdkService;
@Autowired
private ShoppingCartBaseServiceImpl shoppingCartBaseService;
@Override @Override
public void updateShoppingCartGoodsDiscount(CouponPromotionVO couponPromotionVO, ActivityQueryDto activityQueryDto, ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult, List<CartGoods> cartGoodsList, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, UserLoginInfoDto userLoginInfoDto, ShoppingCartInfoRequestVo shoppingCartInfoRequestVo) { public void updateShoppingCartGoodsDiscount(CouponPromotionVO couponPromotionVO, ActivityQueryDto activityQueryDto,
ActivityCalculationDiscountResponseDto.CalculationDiscountResult calculationDiscountResult, List<CartGoods> cartGoodsList,
ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo, UserLoginInfoDto userLoginInfoDto,
ShoppingCartInfoRequestVo shoppingCartInfoRequestVo) {
// 用户选择了查询优惠券信息 // 用户选择了查询优惠券信息
if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) { if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) {
List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (k.getCartGoodsUid() List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (k.getCartGoodsUid()
.startsWith(CommonsConstant.COUPON_PREFIX) || StringUtils.isNotBlank(k.getCouponCode()))).collect(Collectors.toList()); .startsWith(CommonsConstant.COUPON_PREFIX) || StringUtils.isNotBlank(k.getCouponCode()))).collect(Collectors.toList());
// 是否存在商品券 // 是否存在商品券
String chooseCouponCode = "";
boolean hasGoodssCoupon = CollectionUtils.isNotEmpty(tmpCartGoods); boolean hasGoodssCoupon = CollectionUtils.isNotEmpty(tmpCartGoods);
if (StringUtils.isBlank(couponPromotionVO.getUnChooseCouponCode()) && hasGoodssCoupon){
chooseCouponCode = tmpCartGoods.get(0).getGoodsId().substring(CommonsConstant.COUPON_PREFIX.length());
} else {
chooseCouponCode = couponPromotionVO.getUnChooseCouponCode();
}
// 构建可用不可用优惠券 // 构建可用不可用优惠券
ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoodsList, ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoodsList,
couponPromotionVO.getPartnerId(), couponPromotionVO.getPartnerId(),
...@@ -59,7 +75,7 @@ public class CouponPromotionService implements IPromotionService { ...@@ -59,7 +75,7 @@ public class CouponPromotionService implements IPromotionService {
hasGoodssCoupon, hasGoodssCoupon,
couponPromotionVO.getOrderType(), couponPromotionVO.getOrderType(),
0, 0,
shoppingCartInfoRequestVo.getAppId(),shoppingCartInfoRequestVo.getMenuType() ); shoppingCartInfoRequestVo.getAppId(),shoppingCartInfoRequestVo.getMenuType(), chooseCouponCode);
if (Objects.equals(activityClassifyCouponBean, null)) { if (Objects.equals(activityClassifyCouponBean, null)) {
// 构建一个空得订单券信息 // 构建一个空得订单券信息
activityClassifyCouponBean = createEmptyActivityCouponBean(); activityClassifyCouponBean = createEmptyActivityCouponBean();
...@@ -83,6 +99,28 @@ public class CouponPromotionService implements IPromotionService { ...@@ -83,6 +99,28 @@ public class CouponPromotionService implements IPromotionService {
} }
} }
shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount); shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount);
Map<String, CheckSpqInfoResponseDto> validCouponMap = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getValidCouponMap();
Map<String, List<String>> spqIdToCartUuid = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getSpqIdToCartUuid();
if (MapUtils.isNotEmpty(validCouponMap) && MapUtils.isNotEmpty(spqIdToCartUuid) && calculationDiscountResult != null){
List<String> activityCodeList = calculationDiscountResult.getCouponDiscounts().stream().map(p -> p.getCouponCode()).collect(Collectors.toList());
for (String spqId : validCouponMap.keySet()) {
CheckSpqInfoResponseDto sqpInfo = validCouponMap.get(spqId);
if (!activityCodeList.contains(sqpInfo.getCouponCode())){ // 表示商品券不够启用金额
List<String> uuidList = spqIdToCartUuid.get(sqpInfo.getCouponCode());
if (CollectionUtils.isNotEmpty(uuidList)){
List<CartGoods> newCartList = cartGoodsList.stream().filter(p -> !uuidList.contains(p.getCartGoodsUid())).collect(Collectors.toList());
assortmentSdkService.setShoppingCart(activityQueryDto.getPartnerId(), activityQueryDto.getStoreId(), userLoginInfoDto.getMemberId(), newCartList, null, null, this.shoppingCartBaseService);
cartGoodsList = newCartList;
CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(spqId);
shoppingCartGoodsResponseVo.setChanged(true);
shoppingCartGoodsResponseVo.setToastMsg("当前购物车金额低于【" + checkSpqInfoResponseDto.getCouponName() + "】优惠券起用金额门槛,券已自动移除购物车");
}
}
}
}
//循环购物车商品券 //循环购物车商品券
for (CartGoods cartGoods : cartGoodsList) { for (CartGoods cartGoods : cartGoodsList) {
String couponCode = cartGoods.getCouponCode(); String couponCode = cartGoods.getCouponCode();
...@@ -93,7 +131,6 @@ public class CouponPromotionService implements IPromotionService { ...@@ -93,7 +131,6 @@ public class CouponPromotionService implements IPromotionService {
} }
if (StringUtils.isNotBlank(couponCode)) { if (StringUtils.isNotBlank(couponCode)) {
// 计算优惠信息时,已将券校验过,放在map中 // 计算优惠信息时,已将券校验过,放在map中
Map<String, CheckSpqInfoResponseDto> validCouponMap = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getValidCouponMap();
if (MapUtils.isNotEmpty(validCouponMap)) { if (MapUtils.isNotEmpty(validCouponMap)) {
CheckSpqInfoResponseDto checkSpqInfoResponseDto = null; CheckSpqInfoResponseDto checkSpqInfoResponseDto = null;
if(useCoupon){ if(useCoupon){
......
...@@ -349,8 +349,11 @@ public class CalculationCommonService { ...@@ -349,8 +349,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());
...@@ -410,6 +413,7 @@ public class CalculationCommonService { ...@@ -410,6 +413,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(mg.getQty()); goods.setQty(mg.getQty());
goods.setCustomerCode(cartGoods.getCustomerCode()); goods.setCustomerCode(cartGoods.getCustomerCode());
...@@ -488,8 +492,11 @@ public class CalculationCommonService { ...@@ -488,8 +492,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());
......
...@@ -68,7 +68,9 @@ public class CalculationSharingCartService { ...@@ -68,7 +68,9 @@ public class CalculationSharingCartService {
, Long deliveryAmount , Long deliveryAmount
, String opt , String opt
, String partnerId , String partnerId
, Integer flag) { , Integer flag
, String userId
, String storeId) {
/** /**
* 用促销价格初始化购物车行记录成交价 * 用促销价格初始化购物车行记录成交价
...@@ -78,7 +80,7 @@ public class CalculationSharingCartService { ...@@ -78,7 +80,7 @@ public class CalculationSharingCartService {
/** /**
* 可用券及券折扣 * 可用券及券折扣
*/ */
promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo); promotionSharingService.updateShoppingCartGoodsDiscount(discountResult, cartGoodsList, shoppingCartGoodsResponseVo, couponPromotionVO,shoppingCartInfoRequestVo, userId, partnerId, storeId);
/** /**
* 满减处理 * 满减处理
......
...@@ -8,6 +8,7 @@ import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto; ...@@ -8,6 +8,7 @@ import cn.freemud.entities.dto.calculate.CalculationSharingDiscountRequestDto;
import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto; import cn.freemud.entities.dto.calculate.CalculationSharingDiscountResponseDto;
import cn.freemud.entities.dto.shoppingCart.SendPoint; import cn.freemud.entities.dto.shoppingCart.SendPoint;
import cn.freemud.entities.vo.CartGoods; import cn.freemud.entities.vo.CartGoods;
import cn.freemud.entities.vo.ShoppingCartGoodsResponseVo;
import cn.freemud.entities.vo.ShoppingCartInfoRequestVo; import cn.freemud.entities.vo.ShoppingCartInfoRequestVo;
import cn.freemud.enums.*; import cn.freemud.enums.*;
import cn.freemud.interceptor.BizServiceException; import cn.freemud.interceptor.BizServiceException;
...@@ -30,10 +31,7 @@ import org.apache.commons.lang.StringUtils; ...@@ -30,10 +31,7 @@ import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -82,6 +80,7 @@ public class CalculationSharingDiscountService { ...@@ -82,6 +80,7 @@ public class CalculationSharingDiscountService {
HashMap<String, CheckSpqInfoResponseDto> validCouponMap = new HashMap<>(16); HashMap<String, CheckSpqInfoResponseDto> validCouponMap = new HashMap<>(16);
List<CalculationSharingDiscountRequestDto.CalculationDiscountGoods> calculationDiscountGoodsList = new ArrayList<>(); List<CalculationSharingDiscountRequestDto.CalculationDiscountGoods> calculationDiscountGoodsList = new ArrayList<>();
int cartSize = cartGoodsList.size() - 1; int cartSize = cartGoodsList.size() - 1;
HashMap<String, List<String>> spqIdToCartUuid = new HashMap<>(16);
for (int i = cartSize; i >= 0; i--) { for (int i = cartSize; i >= 0; i--) {
CartGoods cartGoods = cartGoodsList.get(i); CartGoods cartGoods = cartGoodsList.get(i);
if (StringUtils.isBlank(cartGoods.getCouponCode()) && !cartGoods.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)) {//非商品券 if (StringUtils.isBlank(cartGoods.getCouponCode()) && !cartGoods.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)) {//非商品券
...@@ -113,6 +112,16 @@ public class CalculationSharingDiscountService { ...@@ -113,6 +112,16 @@ public class CalculationSharingDiscountService {
} else{ } else{
validCouponMap.put(couponCode, checkSpqInfo); validCouponMap.put(couponCode, checkSpqInfo);
} }
if (spqIdToCartUuid.containsKey(couponCode)){
List<String> uuidList = spqIdToCartUuid.get(couponCode);
uuidList.add(cartGoods.getCartGoodsUid());
spqIdToCartUuid.put(couponCode, uuidList);
} else {
List<String> uuidList = new ArrayList<>();
uuidList.add(cartGoods.getCartGoodsUid());
spqIdToCartUuid.put(couponCode, uuidList);
}
validCouponMap.put(couponCode, checkSpqInfo);
cartGoods.setName(checkSpqInfo.getCouponName()); cartGoods.setName(checkSpqInfo.getCouponName());
cartGoods.setSpuName(checkSpqInfo.getCouponName()); cartGoods.setSpuName(checkSpqInfo.getCouponName());
cartGoods.setStockLimit(checkSpqInfo.isStockLimit()); cartGoods.setStockLimit(checkSpqInfo.isStockLimit());
...@@ -205,6 +214,7 @@ public class CalculationSharingDiscountService { ...@@ -205,6 +214,7 @@ public class CalculationSharingDiscountService {
convert2SendPoint(result, discountDTO); convert2SendPoint(result, discountDTO);
} }
result.setValidCouponMap(validCouponMap); result.setValidCouponMap(validCouponMap);
result.setSpqIdToCartUuid(spqIdToCartUuid);
result.setDeliveryAmount(deliveryAmount); result.setDeliveryAmount(deliveryAmount);
result.setDistributionFee(result.getDistributionFee()); result.setDistributionFee(result.getDistributionFee());
return result; return result;
......
...@@ -9,7 +9,9 @@ import cn.freemud.entities.vo.*; ...@@ -9,7 +9,9 @@ import cn.freemud.entities.vo.*;
import cn.freemud.enums.CouponFlag; import cn.freemud.enums.CouponFlag;
import cn.freemud.enums.GoodsTypeEnum; import cn.freemud.enums.GoodsTypeEnum;
import cn.freemud.service.CouponService; import cn.freemud.service.CouponService;
import cn.freemud.service.impl.AssortmentSdkService;
import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant; import com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant;
import com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
...@@ -38,17 +40,28 @@ public class CouponSharingService { ...@@ -38,17 +40,28 @@ public class CouponSharingService {
@Autowired @Autowired
private CouponService couponService; private CouponService couponService;
@Autowired
private AssortmentSdkService assortmentSdkService;
@Autowired
private ShoppingCartBaseServiceImpl shoppingCartBaseService;
public void updateShoppingCartGoodsDiscount(CalculationSharingDiscountResponseDto.CalculationDiscountResult calculationDiscountResult public void updateShoppingCartGoodsDiscount(CalculationSharingDiscountResponseDto.CalculationDiscountResult calculationDiscountResult
, List<CartGoods> cartGoodsList , List<CartGoods> cartGoodsList
, ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo , ShoppingCartGoodsResponseVo shoppingCartGoodsResponseVo
, CouponPromotionVO couponPromotionVO , CouponPromotionVO couponPromotionVO
,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo) { ,ShoppingCartInfoRequestVo shoppingCartInfoRequestVo, String userId, String partnerId, String storeId) {
// 用户选择了查询优惠券信息 // 用户选择了查询优惠券信息
if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) { if (couponPromotionVO != null && ObjectUtils.equals(CouponFlag.YES.getCode(), couponPromotionVO.getFlg())) {
List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (StringUtils.isNotBlank(k.getCouponCode()) || k.getCartGoodsUid() List<CartGoods> tmpCartGoods = cartGoodsList.parallelStream().filter(k -> (StringUtils.isNotBlank(k.getCouponCode()) || k.getCartGoodsUid()
.startsWith(CommonsConstant.COUPON_PREFIX))).collect(Collectors.toList()); .startsWith(CommonsConstant.COUPON_PREFIX))).collect(Collectors.toList());
// 是否存在商品券 // 是否存在商品券
boolean hasGoodssCoupon = CollectionUtils.isNotEmpty(tmpCartGoods); boolean hasGoodssCoupon = CollectionUtils.isNotEmpty(tmpCartGoods);
String chooseCouponCode = "";
if (StringUtils.isBlank(couponPromotionVO.getUnChooseCouponCode()) && hasGoodssCoupon){
chooseCouponCode = tmpCartGoods.get(0).getGoodsId().substring(CommonsConstant.COUPON_PREFIX.length());
}
// 构建可用不可用优惠券 // 构建可用不可用优惠券
ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoodsList ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoodsList
, couponPromotionVO.getPartnerId() , couponPromotionVO.getPartnerId()
...@@ -60,6 +73,7 @@ public class CouponSharingService { ...@@ -60,6 +73,7 @@ public class CouponSharingService {
, 1 , 1
, shoppingCartInfoRequestVo.getAppId() , shoppingCartInfoRequestVo.getAppId()
, shoppingCartInfoRequestVo.getMenuType() , shoppingCartInfoRequestVo.getMenuType()
, chooseCouponCode
); );
if (Objects.equals(activityClassifyCouponBean, null)) { if (Objects.equals(activityClassifyCouponBean, null)) {
// 构建一个空得订单券信息 // 构建一个空得订单券信息
...@@ -83,6 +97,27 @@ public class CouponSharingService { ...@@ -83,6 +97,27 @@ public class CouponSharingService {
if (first!=null) couponDiscount = first.getDiscount().longValue(); if (first!=null) couponDiscount = first.getDiscount().longValue();
} }
shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount); shoppingCartGoodsResponseVo.setCouponDiscount(couponDiscount);
Map<String, CheckSpqInfoResponseDto> validCouponMap = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getValidCouponMap();
Map<String, List<String>> spqIdToCartUuid = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getSpqIdToCartUuid();
if (MapUtils.isNotEmpty(validCouponMap) && MapUtils.isNotEmpty(spqIdToCartUuid) && calculationDiscountResult != null){
List<String> activityCodeList = calculationDiscountResult.getDiscounts().stream().map(p -> p.getActivityCode()).collect(Collectors.toList());
for (String spqId : validCouponMap.keySet()) {
CheckSpqInfoResponseDto sqpInfo = validCouponMap.get(spqId);
if (!activityCodeList.contains(sqpInfo.getCouponCode())){ // 表示商品券不够启用金额
List<String> uuidList = spqIdToCartUuid.get(sqpInfo.getCouponCode());
if (CollectionUtils.isNotEmpty(uuidList)){
List<CartGoods> newCartList = cartGoodsList.stream().filter(p -> !uuidList.contains(p.getCartGoodsUid())).collect(Collectors.toList());
assortmentSdkService.setShoppingCart(partnerId, storeId, userId, newCartList, null, null, this.shoppingCartBaseService);
cartGoodsList = newCartList;
CheckSpqInfoResponseDto checkSpqInfoResponseDto = validCouponMap.get(spqId);
shoppingCartGoodsResponseVo.setChanged(true);
shoppingCartGoodsResponseVo.setToastMsg("当前购物车金额低于【" + checkSpqInfoResponseDto.getCouponName() + "】优惠券起用金额门槛,券已自动移除购物车");
}
}
}
}
//循环购物车商品券 //循环购物车商品券
for (CartGoods cartGoods : cartGoodsList) { for (CartGoods cartGoods : cartGoodsList) {
if (StringUtils.isNotBlank(cartGoods.getCouponCode()) || cartGoods.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)) { if (StringUtils.isNotBlank(cartGoods.getCouponCode()) || cartGoods.getCartGoodsUid().startsWith(CommonsConstant.COUPON_PREFIX)) {
...@@ -93,7 +128,6 @@ public class CouponSharingService { ...@@ -93,7 +128,6 @@ public class CouponSharingService {
useCoupon = false; useCoupon = false;
} }
// 计算优惠信息时,已将券校验过,放在map中 // 计算优惠信息时,已将券校验过,放在map中
Map<String, CheckSpqInfoResponseDto> validCouponMap = calculationDiscountResult == null ? new HashMap<>() : calculationDiscountResult.getValidCouponMap();
if (MapUtils.isNotEmpty(validCouponMap)) { if (MapUtils.isNotEmpty(validCouponMap)) {
CheckSpqInfoResponseDto checkSpqInfoResponseDto; CheckSpqInfoResponseDto checkSpqInfoResponseDto;
if(useCoupon){ if(useCoupon){
...@@ -161,8 +195,10 @@ public class CouponSharingService { ...@@ -161,8 +195,10 @@ public class CouponSharingService {
cartGoods.setQty(cartGoods.getQty()); cartGoods.setQty(cartGoods.getQty());
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()
......
...@@ -133,7 +133,7 @@ public class CouponServiceTest { ...@@ -133,7 +133,7 @@ public class CouponServiceTest {
List<CartGoods> cartGoods = Lists.newArrayList(); List<CartGoods> cartGoods = Lists.newArrayList();
CartGoods cartGood = new CartGoods(); CartGoods cartGood = new CartGoods();
cartGoods.add(cartGood); cartGoods.add(cartGood);
ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoods, "1864", "122424124", "1011", "88123124", true, 1, 1, "",""); ActivityClassifyCouponBean activityClassifyCouponBean = couponService.availableCoupon(cartGoods, "1864", "122424124", "1011", "88123124", true, 1, 1, "","", "");
assertTrue(activityClassifyCouponBean.getCouponNum() >= 1); assertTrue(activityClassifyCouponBean.getCouponNum() >= 1);
} }
......
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