Commit 703a67be by 徐康

随单购月卡订单详情

parent fd8f0f0c
...@@ -421,7 +421,7 @@ public class OrderSdkAdapter { ...@@ -421,7 +421,7 @@ public class OrderSdkAdapter {
* @return * @return
*/ */
private Integer getCostType(QueryOrderAccountType queryOrderAccountType) { private Integer getCostType(QueryOrderAccountType queryOrderAccountType) {
// 订单费用类型 1=包装费,2=运费,3=餐盒单价,4=餐盒数量,5=会员卡费用 // 订单费用类型 1=包装费,2=运费,3=餐盒单价,4=餐盒数量,5=会员卡费用,10=麦咖啡月卡
Integer type = 0; Integer type = 0;
String code = queryOrderAccountType.getCode(); String code = queryOrderAccountType.getCode();
......
...@@ -1171,6 +1171,18 @@ public class OrderAdapter { ...@@ -1171,6 +1171,18 @@ public class OrderAdapter {
//商品信息转换 //商品信息转换
convent2ProductVos(ordersBean.getProductList(), responseVo); convent2ProductVos(ordersBean.getProductList(), responseVo);
responseVo.setOrderAccounts(convent2OrderAccountVo(ordersBean.getApportionDetails())); responseVo.setOrderAccounts(convent2OrderAccountVo(ordersBean.getApportionDetails()));
if(CollectionUtils.isNotEmpty(ordersBean.getOrderCostDetailList())) {
ordersBean.getOrderCostDetailList().forEach(o -> {
if(o.getCostType() == 10) {
ProductVo productVo = new ProductVo();
productVo.setName(o.getCostName());
productVo.setSpuName(o.getCostName());
productVo.setFinalPrice(o.getCostAmount().longValue());
productVo.setOriginalPrice(o.getActualCostAmount().longValue());
responseVo.getProducts().add(productVo);
}
});
}
Long promotionAmount = 0L; Long promotionAmount = 0L;
Long deliveryAmount = 0L; Long deliveryAmount = 0L;
Long packageAmount = 0L; Long packageAmount = 0L;
...@@ -1911,10 +1923,14 @@ public class OrderAdapter { ...@@ -1911,10 +1923,14 @@ public class OrderAdapter {
discountTotalAmount = discountTotalAmount + productDiscount.getDiscountAmount()*productDiscount.getDiscountQty(); discountTotalAmount = discountTotalAmount + productDiscount.getDiscountAmount()*productDiscount.getDiscountQty();
if (OrderAccountType.PRODUCT_COUPON.getCode().equals(productDiscount.getDiscountType())) { if (OrderAccountType.PRODUCT_COUPON.getCode().equals(productDiscount.getDiscountType())) {
hasProductCoupon = true; hasProductCoupon = true;
productVo.setName(productDiscount.getDiscountDesc()); if("啡常月享卡".equals(productDiscount.getDiscountDesc())) {
productVo.setSpuName(productDiscount.getDiscountDesc()); productVo.setCouponName(productDiscount.getDiscountDesc());
productVo.setExtras(""); } else {
productVo.setSpecification(""); productVo.setName(productDiscount.getDiscountDesc());
productVo.setSpuName(productDiscount.getDiscountDesc());
productVo.setExtras("");
productVo.setSpecification("");
}
} }
if (OrderAccountType.BUYM_SENDN.getCode().equals(productDiscount.getDiscountType())) { if (OrderAccountType.BUYM_SENDN.getCode().equals(productDiscount.getDiscountType())) {
activityType = ActivityTypeEnum.TYPE_61.getCode(); activityType = ActivityTypeEnum.TYPE_61.getCode();
......
...@@ -133,6 +133,11 @@ public class ProductVo { ...@@ -133,6 +133,11 @@ public class ProductVo {
private String unit; private String unit;
/** /**
* 优惠券名称
*/
private String couponName;
/**
* 1.5.5版本添加 * 1.5.5版本添加
* 商品参与活动类型(61:买一赠一) * 商品参与活动类型(61:买一赠一)
*/ */
......
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