Commit 8866fd31 by ping.wu

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

Merge branches 'feature/20211213_保存spu商品货号_wuping' and 'master' of http://gitlab.freemud.com/order-group-application/order-group
parents ea571c7e 896ee7cd
......@@ -3133,6 +3133,9 @@ public class OrderSdkAdapter {
if (StringUtils.isNotBlank(product.getThirdProductSpecId())) {
extInfo.setThirdProductSpecId(product.getThirdProductSpecId());
}
if (StringUtils.isNotBlank(product.getSpuProductCode())) {
extInfo.setSpuProductCode(product.getSpuProductCode());
}
//第三方商品属性id
if (StringUtils.isNotBlank(product.getThirdProductPropertyId())) {
extInfo.setThirdProductPropertyId(product.getThirdProductPropertyId());
......
......@@ -65,6 +65,9 @@ public class CreateOrderProductRequest extends BaseConfig {
* 商品货号,商品服务可重复
*/
private String productCode;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
/**
* 商品价格 单价分
*/
......
......@@ -124,4 +124,7 @@ public class OrderProductAddInfoDto extends BaseConfig {
//积分商品活动使用总积分
private Long score;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
}
......@@ -40,6 +40,9 @@ public class GetProductsVo {
*/
private String productCode;
//多规格商品的spu商品 商品货号,单规格即为单规格商品货号
private String spuProductCode;
/**
* 第三方商品规格编号
*/
......
......@@ -63,6 +63,8 @@ public class ItemServiceImpl implements ItemService{
boolean toPosCustomerCode = productInfosDto.getData().getToPosProductIdType() != null && productInfosDto.getData().getToPosProductIdType() == 1;
productInfosDto.getData().getProducts().forEach(productBean -> {
GetProductsVo spuProductsVo = new GetProductsVo();
spuProductsVo.setSpuProductCode(productBean.getProductCode());
//保存货号到三方商品编号字段
if(toPosCustomerCode){
spuProductsVo.setCustomerCode(productBean.getProductCode());
......@@ -108,6 +110,8 @@ public class ItemServiceImpl implements ItemService{
if (CollectionUtils.isNotEmpty(productBean.getSkuList())) {
for (SkuProduct skuProductBean : productBean.getSkuList()) {
GetProductsVo skuProductsVo = new GetProductsVo();
skuProductsVo.setSpuProductCode(productBean.getProductCode());
//保存货号到三方商品编号字段
if(toPosCustomerCode){
skuProductsVo.setCustomerCode(skuProductBean.getProductCode());
......@@ -146,6 +150,8 @@ public class ItemServiceImpl implements ItemService{
if (CollectionUtils.isNotEmpty(productBean.getProductComboList())) {
for (ProductComboListDto productComboListDto : productBean.getProductComboList()) {
GetProductsVo comboProductsVo = new GetProductsVo();
comboProductsVo.setSpuProductCode(productComboListDto.getProductCode());
//保存货号到三方商品编号字段
if(toPosCustomerCode){
comboProductsVo.setCustomerCode(productComboListDto.getProductCode());
......@@ -192,6 +198,7 @@ public class ItemServiceImpl implements ItemService{
//多规格获取sku信息
GetProductsVo groupProductsVo = new GetProductsVo();
groupProductsVo.setSpuProductCode(groupDetailBean.getProductCode());
//保存货号到三方商品编号字段
if(toPosCustomerCode){
groupProductsVo.setCustomerCode(groupDetailBean.getProductCode());
......
......@@ -2417,6 +2417,7 @@ public class OrderServiceImpl implements Orderservice {
for (CreateOrderProductRequest productDto : createOrderDto.getProducts()) {
String skuId = productDto.getSpecification();
if (products.get(skuId) != null) {
productDto.setSpuProductCode(products.get(skuId).getSpuProductCode());
productDto.setCustomerCode(products.get(skuId).getCustomerCode());
productDto.setProductCode(products.get(skuId).getProductCode());
productDto.setThirdProductSpecId(products.get(productDto.getSpecification()).getThirdProductSpecId());
......@@ -2434,6 +2435,7 @@ public class OrderServiceImpl implements Orderservice {
for (CreateOrderProductRequest comboProduct : productDto.getComboProduct()) {
String comboSkuId = comboProduct.getSpecification();
if (products.get(comboSkuId) != null) {
comboProduct.setSpuProductCode(products.get(comboSkuId).getSpuProductCode());
comboProduct.setCustomerCode(products.get(comboSkuId).getCustomerCode());
comboProduct.setProductCode(products.get(comboSkuId).getProductCode());
comboProduct.setThirdProductSpecId(products.get(comboSkuId).getThirdProductSpecId());
......
......@@ -887,6 +887,7 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
}
}
}
orderProductAddInfoDto.setSpuProductCode(productBean.getProductCode());
orderProductAddInfoDto.setProductBindingCoupons(productBindingCoupons);
orderItemCreateReq.setExtInfo(JSONObject.toJSONString(orderProductAddInfoDto));
orderItemList.add(orderItemCreateReq);
......
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