提交 ced42832 authored 作者: 吴德鹏's avatar 吴德鹏

订单优化

上级 fdd99e19
......@@ -144,6 +144,10 @@ public class TbCfOrderEntity implements Serializable {
private Integer orderSource;
private BigDecimal reduceAmount;
private String tested;
public Integer getOrderSource() {
return orderSource;
}
......@@ -553,4 +557,20 @@ public class TbCfOrderEntity implements Serializable {
public void setItemPrice(BigDecimal itemPrice) {
this.itemPrice = itemPrice;
}
public BigDecimal getReduceAmount() {
return reduceAmount;
}
public void setReduceAmount(BigDecimal reduceAmount) {
this.reduceAmount = reduceAmount;
}
public String getTested() {
return tested;
}
public void setTested(String tested) {
this.tested = tested;
}
}
......@@ -32,6 +32,8 @@ public class TbCfOrderListEntity implements Serializable {
private BigDecimal itemsPrice;
private String itemUrl;
private String email;
private BigDecimal reduceAmount;
private String tested;
public String getEmail() {
return email;
......@@ -194,4 +196,20 @@ public class TbCfOrderListEntity implements Serializable {
public void setDeliveryFlag(String deliveryFlag) {
this.deliveryFlag = deliveryFlag;
}
public BigDecimal getReduceAmount() {
return reduceAmount;
}
public void setReduceAmount(BigDecimal reduceAmount) {
this.reduceAmount = reduceAmount;
}
public String getTested() {
return tested;
}
public void setTested(String tested) {
this.tested = tested;
}
}
......@@ -45,13 +45,23 @@ public class TbCfOrderListServiceImpl implements TbCfOrderListService {
@Override
public List<DeliveryOrderVo> queryOrderDeliveryList(String orderId) {
TbCfOrderEntity order = tbCfOrderDao.queryOrderById(orderId);
List<DeliveryOrderVo> list;
if (order.getOrderSource() != null && PC_WEB_ORDER.equals(order.getOrderSource().toString())) {
return tbCfOrderListDao.queryOrderDeliveryWebList(orderId);
}
list = tbCfOrderListDao.queryOrderDeliveryWebList(orderId);
} else {
list = tbCfOrderListDao.queryOrderDeliveryList(orderId);
}
list.stream().forEach(l -> {
String s = trimBothEndsChars(l.getItemSku(), ";");
l.setItemSku(s);
});
return list;
}
return tbCfOrderListDao.queryOrderDeliveryList(orderId);
public String trimBothEndsChars(String srcStr, String splitter) {
String regex = "^" + splitter + "*|" + splitter + "*$";
return srcStr.replaceAll(regex, "");
}
@Override
......
......@@ -23,6 +23,7 @@ public class DeliveryOrderVo implements Serializable {
private String deliveryPhone;
private String deliveryAddress;
private String itemUrl;
private String reduceAmount;
public String getItemUrl() {
return itemUrl;
......@@ -152,4 +153,12 @@ public class DeliveryOrderVo implements Serializable {
public void setItemSku(String itemSku) {
this.itemSku = itemSku;
}
public String getReduceAmount() {
return reduceAmount;
}
public void setReduceAmount(String reduceAmount) {
this.reduceAmount = reduceAmount;
}
}
......@@ -35,6 +35,8 @@ public class OrderBasicVo implements Serializable {
private BigDecimal couponPrice;
private BigDecimal reduceAmount;
public BigDecimal getCouponPrice() {
return couponPrice;
}
......@@ -252,4 +254,12 @@ public class OrderBasicVo implements Serializable {
public void setOrderSource(Integer orderSource) {
this.orderSource = orderSource;
}
public BigDecimal getReduceAmount() {
return reduceAmount;
}
public void setReduceAmount(BigDecimal reduceAmount) {
this.reduceAmount = reduceAmount;
}
}
......@@ -23,6 +23,8 @@
<result property="couponTitle" column="coupon_title"/>
<result property="deliveryFlag" column="delivery_flag"/>
<result property="itemUrl" column="item_url"/>
<result property="reduceAmount" column="reduce_amount"/>
<result property="tested" column="tested"/>
</resultMap>
<!--查询订单列表-->
<select id="queryOrderList" resultType="com.platform.entity.TbCfOrderListEntity">
......@@ -42,7 +44,8 @@
o.fee,
c.coupon_id,
c.coupon_title,
o.delivery_flag
o.delivery_flag,
o.reduce_amount
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_user_info u on u.user_id=o.user_id
......@@ -136,7 +139,8 @@
p.p_express_number,
o.delivery_name,
o.delivery_phone,
o.delivery_address
o.delivery_address,
o.reduce_amount
FROM
tb_cf_item_order_r r
LEFT JOIN tb_cf_order o ON o.order_id = r.order_id
......@@ -190,7 +194,8 @@
o.remark_info,
o.update_time,
o.order_source,
o.coupon_price
o.coupon_price,
o.reduce_amount
from tb_cf_order o
LEFT JOIN tb_cf_finance f on f.order_id=o.order_id
LEFT JOIN tb_cf_coupon c on c.coupon_id=o.coupon_id
......
......@@ -18,7 +18,7 @@ $(function () {
formatoptions: {prefix: "$"}
},
{label: '订单状态', name: 'orderStatus', index: 'order_status', width: 100, formatter: orderStatusFormat},
{label: '代购状态', name: 'deliveryFlag', index: 'delivery_flag',width: 100, formatter: deliveryFlagFormat},
{label: '代购状态', name: 'deliveryFlag', index: 'delivery_flag', width: 100, formatter: deliveryFlagFormat},
{label: '收货人', name: 'deliveryName', index: 'delivery_name', hidden: true},
{label: '收货人手机', name: 'deliveryPhone', index: 'delivery_phone', hidden: true},
{label: '收货地址', name: 'deliveryAddress', index: 'delivery_address', hidden: true},
......@@ -496,6 +496,10 @@ let vm = new Vue({
}, {
costtype: '优惠活动',
constnum: 1,
}
, {
costtype: '满减金额',
constnum: 1,
}, {
costtype: '应付款金额',
constnum: 1,
......@@ -885,7 +889,8 @@ let vm = new Vue({
// vm.costData[4].constnum = r.orderBasicVo.couponId;
vm.costData[4].constnum = r.orderBasicVo.couponPrice;
vm.costData[6].constnum = r.orderBasicVo.couponTitle;
vm.costData[7].constnum = r.orderBasicVo.realityPay;
vm.costData[7].constnum = r.orderBasicVo.reduceAmount;
vm.costData[8].constnum = r.orderBasicVo.realityPay;
}
});
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论