Commit 3e2b4633 by ping.wu

Merge branches 'feature/20211213_保存spu商品货号_wuping' and 'qa' of…

Merge branches 'feature/20211213_保存spu商品货号_wuping' and 'qa' of http://gitlab.freemud.com/order-group-application/order-group into qa

# Conflicts:
#	assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderProductAddInfoDto.java
parents e0eec9e1 05b23181
...@@ -3138,6 +3138,9 @@ public class OrderSdkAdapter { ...@@ -3138,6 +3138,9 @@ public class OrderSdkAdapter {
if (StringUtils.isNotBlank(product.getThirdProductSpecId())) { if (StringUtils.isNotBlank(product.getThirdProductSpecId())) {
extInfo.setThirdProductSpecId(product.getThirdProductSpecId()); extInfo.setThirdProductSpecId(product.getThirdProductSpecId());
} }
if (StringUtils.isNotBlank(product.getSpuProductCode())) {
extInfo.setSpuProductCode(product.getSpuProductCode());
}
//第三方商品属性id //第三方商品属性id
if (StringUtils.isNotBlank(product.getThirdProductPropertyId())) { if (StringUtils.isNotBlank(product.getThirdProductPropertyId())) {
extInfo.setThirdProductPropertyId(product.getThirdProductPropertyId()); extInfo.setThirdProductPropertyId(product.getThirdProductPropertyId());
......
...@@ -65,6 +65,9 @@ public class CreateOrderProductRequest extends BaseConfig { ...@@ -65,6 +65,9 @@ public class CreateOrderProductRequest extends BaseConfig {
* 商品货号,商品服务可重复 * 商品货号,商品服务可重复
*/ */
private String productCode; private String productCode;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
/** /**
* 商品价格 单价分 * 商品价格 单价分
*/ */
......
...@@ -129,4 +129,7 @@ public class OrderProductAddInfoDto extends BaseConfig { ...@@ -129,4 +129,7 @@ public class OrderProductAddInfoDto extends BaseConfig {
* 【订C,“POS编码”让凌顶那边去匹配商品】 https://www.tapd.cn/43862731/prong/stories/view/1143862731001039549 * 【订C,“POS编码”让凌顶那边去匹配商品】 https://www.tapd.cn/43862731/prong/stories/view/1143862731001039549
*/ */
private String linkedId; private String linkedId;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
} }
...@@ -304,7 +304,11 @@ public class OrderCallBackMQService { ...@@ -304,7 +304,11 @@ public class OrderCallBackMQService {
wechatReportOrderDto.setStatus(NewOrderStatus.PENDING_PAYMENT.getIndex().equals(orderInfoReqs.getOrderState()) ? 2 : 1); wechatReportOrderDto.setStatus(NewOrderStatus.PENDING_PAYMENT.getIndex().equals(orderInfoReqs.getOrderState()) ? 2 : 1);
// 菜品列表 // 菜品列表
List<WechatReportOrderDto.DishInfo> dishList = new ArrayList<>(); List<WechatReportOrderDto.DishInfo> dishList = new ArrayList<>();
//【ID1040698】【数据上报】如果是套餐商品,只上报套餐,不上报明细, 解决数据上报商品数量(20)超限制报错
for (OrderItemResp item : orderInfoReqs.getOrderItemList()) { for (OrderItemResp item : orderInfoReqs.getOrderItemList()) {
if(StringUtils.isNotEmpty(item.getParentProductId()) && !"0".equals(item.getParentProductId())){
continue;
}
WechatReportOrderDto.DishInfo dishInfo = new WechatReportOrderDto.DishInfo(); WechatReportOrderDto.DishInfo dishInfo = new WechatReportOrderDto.DishInfo();
dishInfo.setOutDishNo(item.getProductId()); dishInfo.setOutDishNo(item.getProductId());
dishInfo.setCount(item.getProductQuantity()); dishInfo.setCount(item.getProductQuantity());
...@@ -313,6 +317,9 @@ public class OrderCallBackMQService { ...@@ -313,6 +317,9 @@ public class OrderCallBackMQService {
dishInfo.setUrl(item.getProductPicUrl()); dishInfo.setUrl(item.getProductPicUrl());
dishList.add(dishInfo); dishList.add(dishInfo);
} }
if(dishList.size() >20){
dishList.subList(0,20);
}
wechatReportOrderDto.setDishList(dishList); wechatReportOrderDto.setDishList(dishList);
return wechatReportOrderDto; return wechatReportOrderDto;
} }
......
...@@ -40,6 +40,9 @@ public class GetProductsVo { ...@@ -40,6 +40,9 @@ public class GetProductsVo {
*/ */
private String productCode; private String productCode;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
/** /**
* 第三方商品规格编号 * 第三方商品规格编号
*/ */
......
...@@ -63,6 +63,8 @@ public class ItemServiceImpl implements ItemService{ ...@@ -63,6 +63,8 @@ public class ItemServiceImpl implements ItemService{
boolean toPosCustomerCode = productInfosDto.getData().getToPosProductIdType() != null && productInfosDto.getData().getToPosProductIdType() == 1; boolean toPosCustomerCode = productInfosDto.getData().getToPosProductIdType() != null && productInfosDto.getData().getToPosProductIdType() == 1;
productInfosDto.getData().getProducts().forEach(productBean -> { productInfosDto.getData().getProducts().forEach(productBean -> {
GetProductsVo spuProductsVo = new GetProductsVo(); GetProductsVo spuProductsVo = new GetProductsVo();
spuProductsVo.setSpuProductCode(productBean.getProductCode());
//保存货号到三方商品编号字段 //保存货号到三方商品编号字段
if(toPosCustomerCode){ if(toPosCustomerCode){
spuProductsVo.setCustomerCode(productBean.getProductCode()); spuProductsVo.setCustomerCode(productBean.getProductCode());
...@@ -108,6 +110,8 @@ public class ItemServiceImpl implements ItemService{ ...@@ -108,6 +110,8 @@ public class ItemServiceImpl implements ItemService{
if (CollectionUtils.isNotEmpty(productBean.getSkuList())) { if (CollectionUtils.isNotEmpty(productBean.getSkuList())) {
for (SkuProduct skuProductBean : productBean.getSkuList()) { for (SkuProduct skuProductBean : productBean.getSkuList()) {
GetProductsVo skuProductsVo = new GetProductsVo(); GetProductsVo skuProductsVo = new GetProductsVo();
skuProductsVo.setSpuProductCode(productBean.getProductCode());
//保存货号到三方商品编号字段 //保存货号到三方商品编号字段
if(toPosCustomerCode){ if(toPosCustomerCode){
skuProductsVo.setCustomerCode(skuProductBean.getProductCode()); skuProductsVo.setCustomerCode(skuProductBean.getProductCode());
...@@ -146,6 +150,8 @@ public class ItemServiceImpl implements ItemService{ ...@@ -146,6 +150,8 @@ public class ItemServiceImpl implements ItemService{
if (CollectionUtils.isNotEmpty(productBean.getProductComboList())) { if (CollectionUtils.isNotEmpty(productBean.getProductComboList())) {
for (ProductComboListDto productComboListDto : productBean.getProductComboList()) { for (ProductComboListDto productComboListDto : productBean.getProductComboList()) {
GetProductsVo comboProductsVo = new GetProductsVo(); GetProductsVo comboProductsVo = new GetProductsVo();
comboProductsVo.setSpuProductCode(productComboListDto.getProductCode());
//保存货号到三方商品编号字段 //保存货号到三方商品编号字段
if(toPosCustomerCode){ if(toPosCustomerCode){
comboProductsVo.setCustomerCode(productComboListDto.getProductCode()); comboProductsVo.setCustomerCode(productComboListDto.getProductCode());
...@@ -192,6 +198,7 @@ public class ItemServiceImpl implements ItemService{ ...@@ -192,6 +198,7 @@ public class ItemServiceImpl implements ItemService{
//多规格获取sku信息 //多规格获取sku信息
GetProductsVo groupProductsVo = new GetProductsVo(); GetProductsVo groupProductsVo = new GetProductsVo();
groupProductsVo.setSpuProductCode(groupDetailBean.getProductCode());
//保存货号到三方商品编号字段 //保存货号到三方商品编号字段
if(toPosCustomerCode){ if(toPosCustomerCode){
groupProductsVo.setCustomerCode(groupDetailBean.getProductCode()); groupProductsVo.setCustomerCode(groupDetailBean.getProductCode());
......
...@@ -2412,6 +2412,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -2412,6 +2412,7 @@ public class OrderServiceImpl implements Orderservice {
for (CreateOrderProductRequest productDto : createOrderDto.getProducts()) { for (CreateOrderProductRequest productDto : createOrderDto.getProducts()) {
String skuId = productDto.getSpecification(); String skuId = productDto.getSpecification();
if (products.get(skuId) != null) { if (products.get(skuId) != null) {
productDto.setSpuProductCode(products.get(skuId).getSpuProductCode());
productDto.setCustomerCode(products.get(skuId).getCustomerCode()); productDto.setCustomerCode(products.get(skuId).getCustomerCode());
productDto.setProductCode(products.get(skuId).getProductCode()); productDto.setProductCode(products.get(skuId).getProductCode());
productDto.setThirdProductSpecId(products.get(productDto.getSpecification()).getThirdProductSpecId()); productDto.setThirdProductSpecId(products.get(productDto.getSpecification()).getThirdProductSpecId());
...@@ -2429,6 +2430,7 @@ public class OrderServiceImpl implements Orderservice { ...@@ -2429,6 +2430,7 @@ public class OrderServiceImpl implements Orderservice {
for (CreateOrderProductRequest comboProduct : productDto.getComboProduct()) { for (CreateOrderProductRequest comboProduct : productDto.getComboProduct()) {
String comboSkuId = comboProduct.getSpecification(); String comboSkuId = comboProduct.getSpecification();
if (products.get(comboSkuId) != null) { if (products.get(comboSkuId) != null) {
comboProduct.setSpuProductCode(products.get(comboSkuId).getSpuProductCode());
comboProduct.setCustomerCode(products.get(comboSkuId).getCustomerCode()); comboProduct.setCustomerCode(products.get(comboSkuId).getCustomerCode());
comboProduct.setProductCode(products.get(comboSkuId).getProductCode()); comboProduct.setProductCode(products.get(comboSkuId).getProductCode());
comboProduct.setThirdProductSpecId(products.get(comboSkuId).getThirdProductSpecId()); comboProduct.setThirdProductSpecId(products.get(comboSkuId).getThirdProductSpecId());
......
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