Commit 0300aa1b by ping.wu

买券订单创建修改

parent 70c66671
...@@ -51,4 +51,9 @@ public class OrderProductAddInfoDto extends BaseConfig { ...@@ -51,4 +51,9 @@ public class OrderProductAddInfoDto extends BaseConfig {
/** 是否主食 **/ /** 是否主食 **/
private Integer stapleFood; private Integer stapleFood;
/**
* 商品绑定的券活动(买券虚拟订单才有)
*/
private List<ProductBindingCouponType> productBindingCoupons;
} }
package com.freemud.sdk.api.assortment.order.request.order;
import lombok.Data;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: ProductBindingCouponType
* @Package com.freemud.sdk.api.assortment.order.request.order
* @Description:
* @author: ping1.wu
* @date: 2020/5/26 14:26
* @Copyright: 2020 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public class ProductBindingCouponType {
/**
* 优惠券CODE
*/
private String activityCode;
/**
* 数量
*/
private int num;
/**
* 排序
*/
private int sequence;
}
...@@ -45,6 +45,8 @@ import com.freemud.application.sdk.api.storecenter.request.vo.GetOrgTreeListRequ ...@@ -45,6 +45,8 @@ import com.freemud.application.sdk.api.storecenter.request.vo.GetOrgTreeListRequ
import com.freemud.application.sdk.api.storecenter.response.StoreResponse; import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import com.freemud.application.sdk.api.storecenter.service.StoreCenterService; import com.freemud.application.sdk.api.storecenter.service.StoreCenterService;
import com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter; import com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter;
import com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto;
import com.freemud.sdk.api.assortment.order.request.order.ProductBindingCouponType;
import com.freemud.sdk.api.assortment.order.response.order.CreateOrderResponse; import com.freemud.sdk.api.assortment.order.response.order.CreateOrderResponse;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
...@@ -320,9 +322,17 @@ public class SellCouponOrderServiceImpl { ...@@ -320,9 +322,17 @@ public class SellCouponOrderServiceImpl {
orderItemCreateReq.setThirdProductId(productBean.getCustomerCode()); orderItemCreateReq.setThirdProductId(productBean.getCustomerCode());
orderItemCreateReq.setProductQuantity(1); orderItemCreateReq.setProductQuantity(1);
Map<String,List<GetMenuCategoryInfoResponse.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean.ProductBindingCouponType>> map = new HashMap<>(); OrderProductAddInfoDto orderProductAddInfoDto = new OrderProductAddInfoDto();
map.put("productBindingCoupons",productBean.getProductBindingCouponTypes()); List<ProductBindingCouponType> productBindingCoupons = new ArrayList<>();
orderItemCreateReq.setExtInfo(JSONObject.toJSONString(map)); for (GetMenuCategoryInfoResponse.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean.ProductBindingCouponType productBindingCouponType : productBean.getProductBindingCouponTypes()){
ProductBindingCouponType productBindingCouponType2 = new ProductBindingCouponType();
productBindingCouponType2.setActivityCode(productBindingCouponType.getActivityCode());
productBindingCouponType2.setNum(productBindingCouponType.getNum());
productBindingCouponType2.setSequence(productBindingCouponType.getSequence());
productBindingCoupons.add(productBindingCouponType2);
}
orderProductAddInfoDto.setProductBindingCoupons(productBindingCoupons);
orderItemCreateReq.setExtInfo(JSONObject.toJSONString(orderProductAddInfoDto));
orderItemList.add(orderItemCreateReq); 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