Commit f0c19ab4 by 刘鹏飞

创单增加买一赠一寄件信息传递到订单基础

parent 96540de7
package com.freemud.sdk.api.assortment.order.adapter; package com.freemud.sdk.api.assortment.order.adapter;
import cn.freemud.base.constant.Version; import cn.freemud.base.constant.Version;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.freemud.application.sdk.api.couponcenter.offline.domain.ProductRedeemVO; import com.freemud.application.sdk.api.couponcenter.offline.domain.ProductRedeemVO;
import com.freemud.application.sdk.api.couponcenter.offline.domain.TransactionVO; import com.freemud.application.sdk.api.couponcenter.offline.domain.TransactionVO;
...@@ -262,6 +263,12 @@ public class OrderSdkAdapter { ...@@ -262,6 +263,12 @@ public class OrderSdkAdapter {
//订单重量 //订单重量
Double orderWeight = sumOrderWeight(requestVO.getProducts()); Double orderWeight = sumOrderWeight(requestVO.getProducts());
request.setWeight(orderWeight); request.setWeight(orderWeight);
// 买一赠一寄件信息
if(requestVO.getChooseGoods() != null || !requestVO.getChooseGoods().isEmpty()){
request.setChooseGoods(JSONArray.parseArray(JSONObject.toJSONString(requestVO.getChooseGoods()), CreateOrderRequest.ChooseGood.class));
}
return request; return request;
} }
......
...@@ -222,4 +222,48 @@ public class BaseCreateOrderRequest extends BaseConfig { ...@@ -222,4 +222,48 @@ public class BaseCreateOrderRequest extends BaseConfig {
} }
/**
* 买一赠一选择的商品
*/
private List<ChooseGood> chooseGoods;
@Data
public static class ChooseGood {
/**
* 活动类型
*/
private Integer activeType;
/**
* 活动号
*/
private String activeCode;
/**
* 赠送商品id
*/
private String goodsId;
/**
* 赠送商品数量
*/
private Integer qty;
/**
* 可兑换商品券编号
*/
private String couponCode ;
/**
* 商品券兑换数量
*/
private Integer couponQty;
/**
* 是否已选择寄杯
*/
private Boolean sendCoupon;
}
} }
...@@ -314,6 +314,11 @@ public class OrderAdapter { ...@@ -314,6 +314,11 @@ public class OrderAdapter {
createOrderDto.setPayChannelType(createOrderVo.getPayChannelType()); createOrderDto.setPayChannelType(createOrderVo.getPayChannelType());
// createOrderDto.setOtherInfo(getOrderOtherInfo(shoppingCartGoodsDto)); // createOrderDto.setOtherInfo(getOrderOtherInfo(shoppingCartGoodsDto));
// 买一赠一寄件信息
if(createOrderVo.getChooseGoods() != null || !createOrderVo.getChooseGoods().isEmpty()){
createOrderDto.setChooseGoods(JSONArray.parseArray(JSONObject.toJSONString(createOrderVo.getChooseGoods()), BaseCreateOrderRequest.ChooseGood.class));
}
return createOrderDto; return createOrderDto;
} }
......
...@@ -182,7 +182,7 @@ public class CreateOrderVo { ...@@ -182,7 +182,7 @@ public class CreateOrderVo {
/** /**
* 买一赠一选择的商品 * 买一赠一选择的商品
*/ */
private List<chooseGood> chooseGoods; private List<ChooseGood> chooseGoods;
/** /**
* 是否使用用户积分 * 是否使用用户积分
...@@ -354,7 +354,7 @@ public class CreateOrderVo { ...@@ -354,7 +354,7 @@ public class CreateOrderVo {
} }
@Data @Data
public static class chooseGood { public static class ChooseGood {
/** /**
* 活动类型 * 活动类型
......
...@@ -215,4 +215,48 @@ public class CreateOrderRequest extends BaseRequest { ...@@ -215,4 +215,48 @@ public class CreateOrderRequest extends BaseRequest {
private Byte payChannelType; private Byte payChannelType;
/**
* 买一赠一选择的商品
*/
private List<ChooseGood> chooseGoods;
@Data
public static class ChooseGood {
/**
* 活动类型
*/
private Integer activeType;
/**
* 活动号
*/
private String activeCode;
/**
* 赠送商品id
*/
private String goodsId;
/**
* 赠送商品数量
*/
private Integer qty;
/**
* 可兑换商品券编号
*/
private String couponCode ;
/**
* 商品券兑换数量
*/
private Integer couponQty;
/**
* 是否已选择寄杯
*/
private Boolean sendCoupon;
}
} }
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