Browse Source

update couponOrder

release_toaliyun_real
xhxu 4 years ago
parent
commit
ddc182ea29
2 changed files with 15 additions and 12 deletions
  1. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java
  2. +13
    -11
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -2527,7 +2527,8 @@ public class WxOrderServiceImpl implements WxOrderService {
if(oc.getLevel().equals(1)){
record.setComposeOrderId(oc.getComposeOrderId());
record.setOrderStatus(oc.getOrderStatus());
oc.setOrderCouponVoList(wxOrderMapper.findListOfCUser(record));
List<WxOrderCouponVo> orderCouponVoList = wxOrderMapper.findListOfCUser(record);
oc.setOrderCouponVoList(orderCouponVoList);
}
});



+ 13
- 11
mallinkService/src/main/resources/mapper/WxOrderMapper.xml View File

@@ -261,7 +261,7 @@
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date,
c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.detail,c.remark,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,
co.id as coupon_order_id,co.coupon_order_status,c.support_transfer,c.subsidy_num,o.compose_order_type,o.compose_order_id,
o.`freight_price`,o.`shipping_type`,o.`shipping_address`,co.`shipping_status`,co.`delivery_info`
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`,co.`shipping_status`,co.`delivery_info`
</sql>

<update id="updateStatusByPressCouponId" parameterType="com.iformall.domain.po.WxOrder">
@@ -345,6 +345,7 @@
<result column="compose_order_type" jdbcType="INTEGER" property="composeOrderType" />
<result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId" />
<result column="coupon_number" jdbcType="INTEGER" property="couponNumber"/>

<result column="shipping_type" jdbcType="INTEGER" property="shippingType"/>
<result column="shipping_address" jdbcType="VARCHAR" property="shippingAddress"/>
@@ -396,6 +397,7 @@

<result column="compose_order_type" jdbcType="INTEGER" property="composeOrderType" />
<result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId" />
<result column="coupon_number" jdbcType="INTEGER" property="couponNumber"/>

<result column="shipping_type" jdbcType="INTEGER" property="shippingType"/>
<result column="shipping_address" jdbcType="VARCHAR" property="shippingAddress"/>
@@ -420,7 +422,7 @@
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date,
c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,
o.compose_order_type,o.compose_order_id,
o.`freight_price`,o.`shipping_type`,o.`shipping_address`
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`
</sql>

<select id="findListOfCUser" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoResultMap">
@@ -451,10 +453,10 @@
<select id="listGoodsCAsPage" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoListMap">
select * from(

select 0 level,o.compose_order_type,o.compose_order_id,o.order_status,o.create_date,
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.update_date,
select 0 level,o.compose_order_type,o.compose_order_id,o.payment,o.order_status,o.create_date,
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment_time,o.update_date,
c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,
o.`freight_price`,o.`shipping_type`,o.`shipping_address`
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`
from wx_coupon c,wx_order o
where o.product_id = c.id and o.order_status in (0,2)
and o.compose_order_type in (0,3)
@@ -474,10 +476,10 @@

union all

select 0 level, o.compose_order_type,o.compose_order_id,o.order_status,o.create_date,
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.update_date,
select 0 level, o.compose_order_type,o.compose_order_id,o.payment,o.order_status,o.create_date,
o.id,o.order_number,o.tenant_id,o.parent_tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.payment_type,o.payment_time,o.update_date,
c.type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.tail_price,c.orig_price,c.unit,c.valid_start_date,c.valid_end_date,c.pick_start_date,c.pick_end_date,
o.`freight_price`,o.`shipping_type`,o.`shipping_address`
o.`coupon_number`,o.`freight_price`,o.`shipping_type`,o.`shipping_address`
from wx_coupon c,wx_order o
where o.product_id = c.id and o.order_status in (1,3,4,5)
and o.compose_order_type in (0,1,2,3)
@@ -496,10 +498,10 @@

union all

select 1 level,o.compose_order_type,o.compose_order_id,o.order_status,min(create_date) create_date,
null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,
select 1 level,o.compose_order_type,o.compose_order_id,sum(o.payment) payment,o.order_status,min(create_date) create_date,
null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,
null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,null ,
null ,null ,null
null ,null ,null ,null
from wx_order o
where o.order_status in (0,2)
and o.compose_order_type in (1,2)


Loading…
Cancel
Save