|
|
|
@@ -299,9 +299,12 @@ |
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
<resultMap id="CVoResultMap" type="com.iformall.domain.vo.WxOrderCouponVo"> |
|
|
|
<resultMap id="CVoListMap" type="com.iformall.domain.vo.WxOrderCouponVo"> |
|
|
|
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
|
|
|
|
<result column="level" jdbcType="INTEGER" property="level"/> |
|
|
|
|
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> |
|
|
|
@@ -348,6 +351,57 @@ |
|
|
|
<result column="shipping_status" jdbcType="INTEGER" property="shippingStatus"/> |
|
|
|
<result column="delivery_info" jdbcType="VARCHAR" property="deliveryInfo"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<resultMap id="CVoResultMap" type="com.iformall.domain.vo.WxOrderCouponVo"> |
|
|
|
|
|
|
|
<id column="id" jdbcType="BIGINT" property="id"/> |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" /> |
|
|
|
<result column="c_user_id" jdbcType="BIGINT" property="cUserId"/> |
|
|
|
<result column="coupon_channel_id" jdbcType="BIGINT" property="couponChannelId"/> |
|
|
|
<result column="product_id" jdbcType="BIGINT" property="productId"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
<result column="payment" jdbcType="INTEGER" property="payment"/> |
|
|
|
<result column="payment_time" jdbcType="TIMESTAMP" property="paymentTime"/> |
|
|
|
<result column="freight_price" jdbcType="INTEGER" property="freightPrice"/> |
|
|
|
<result column="order_status" jdbcType="INTEGER" property="orderStatus"/> |
|
|
|
<result column="create_date" jdbcType="TIMESTAMP" property="createDate"/> |
|
|
|
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> |
|
|
|
|
|
|
|
<result column="type" jdbcType="INTEGER" property="type"/> |
|
|
|
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> |
|
|
|
<result column="title" jdbcType="VARCHAR" property="title"/> |
|
|
|
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/> |
|
|
|
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/> |
|
|
|
<result column="use_price" jdbcType="INTEGER" property="usePrice"/> |
|
|
|
<result column="detail" jdbcType="VARCHAR" property="detail"/> |
|
|
|
<result column="price" jdbcType="INTEGER" property="price"/> |
|
|
|
<result column="tail_price" jdbcType="INTEGER" property="tailPrice"/> |
|
|
|
<result column="orig_price" jdbcType="INTEGER" property="origPrice"/> |
|
|
|
<result column="unit" jdbcType="INTEGER" property="unit"/> |
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark"/> |
|
|
|
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/> |
|
|
|
<result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/> |
|
|
|
<result column="subsidy_num" jdbcType="INTEGER" property="subsidyNum"></result> |
|
|
|
|
|
|
|
<result column="pick_start_date" jdbcType="TIMESTAMP" property="pickStartDate"/> |
|
|
|
<result column="pick_end_date" jdbcType="TIMESTAMP" property="pickEndDate"/> |
|
|
|
|
|
|
|
<result column="coupon_order_id" jdbcType="BIGINT" property="couponOrderId"/> |
|
|
|
<result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus"/> |
|
|
|
<result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> |
|
|
|
<result column="support_transfer" jdbcType="INTEGER" property="supportTransfer"/> |
|
|
|
|
|
|
|
<result column="compose_order_type" jdbcType="INTEGER" property="composeOrderType" /> |
|
|
|
<result column="compose_order_id" jdbcType="BIGINT" property="composeOrderId" /> |
|
|
|
|
|
|
|
<result column="shipping_type" jdbcType="INTEGER" property="shippingType"/> |
|
|
|
<result column="shipping_address" jdbcType="VARCHAR" property="shippingAddress"/> |
|
|
|
<result column="shipping_status" jdbcType="INTEGER" property="shippingStatus"/> |
|
|
|
<result column="delivery_info" jdbcType="VARCHAR" property="deliveryInfo"/> |
|
|
|
|
|
|
|
<collection column="{productId=product_id,tenantId=tenant_id}" property="merchantVoList" |
|
|
|
ofType="com.iformall.domain.vo.WxMerchantVo" |
|
|
|
javaType="java.util.List" |
|
|
|
@@ -394,12 +448,17 @@ |
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="listGoodsCAsPage" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoResultMap"> |
|
|
|
select |
|
|
|
<include refid="allCUserOrderListColumns"/> |
|
|
|
<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, |
|
|
|
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` |
|
|
|
from wx_coupon c,wx_order o |
|
|
|
left join wx_coupon_order co on co.order_id = o.id |
|
|
|
where o.product_id = c.id and o.order_status in (0,1,2,3,4,5) |
|
|
|
where o.product_id = c.id and o.order_status in (0,2) |
|
|
|
and o.compose_order_type in (0,3) |
|
|
|
and o.compose_order_id = 0 |
|
|
|
<if test="cUserId != null"> |
|
|
|
and o.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
@@ -409,13 +468,58 @@ |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and o.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != composeOrderId "> |
|
|
|
and o.`compose_order_id` = #{composeOrderId} |
|
|
|
<if test="orderStatus != null"> |
|
|
|
AND o.order_status = #{orderStatus} |
|
|
|
</if> |
|
|
|
|
|
|
|
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, |
|
|
|
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` |
|
|
|
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) |
|
|
|
<if test="cUserId != null"> |
|
|
|
and o.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and o.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and o.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test="orderStatus != null"> |
|
|
|
AND o.order_status = #{orderStatus} |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns">order by ${sortColumns}</if> |
|
|
|
|
|
|
|
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 , |
|
|
|
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) |
|
|
|
and o.compose_order_id > 0 |
|
|
|
<if test="cUserId != null"> |
|
|
|
and o.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and o.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and o.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test="orderStatus != null"> |
|
|
|
AND o.order_status = #{orderStatus} |
|
|
|
</if> |
|
|
|
group by o.compose_order_type,o.compose_order_id |
|
|
|
|
|
|
|
) a |
|
|
|
order by a.create_date desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="selectDetailOfCUser" parameterType="com.iformall.domain.po.WxOrder" resultMap="CVoResultMap"> |
|
|
|
|