|
|
|
@@ -6,6 +6,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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="type" jdbcType="TINYINT" property="type"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
@@ -21,7 +22,7 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`order_number`,`tenant_id`,`c_user_id`,`product_id`,`type`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail`, |
|
|
|
`id`,`order_number`,`tenant_id`,`c_user_id`,`coupon_channel_id`,`product_id`,`type`,`payment_type`,`payment`,`payment_time`,`order_status`,`create_date`,`update_date`,`detail`, |
|
|
|
`press_end_date`,`press_current_num`,`press_current_value` |
|
|
|
</sql> |
|
|
|
|
|
|
|
@@ -44,6 +45,10 @@ |
|
|
|
and `c_user_id` = #{cUserId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != couponChannelId "> |
|
|
|
and `coupon_channel_id` = #{couponChannelId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != productId "> |
|
|
|
and `product_id` = #{productId} |
|
|
|
</if> |
|
|
|
@@ -122,6 +127,9 @@ |
|
|
|
<if test=" null != cUserId "> |
|
|
|
and `c_user_id` = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test=" null != couponChannelId "> |
|
|
|
and `coupon_channel_id` = #{couponChannelId} |
|
|
|
</if> |
|
|
|
<if test=" null != productId "> |
|
|
|
and `product_id` = #{productId} |
|
|
|
</if> |
|
|
|
@@ -165,14 +173,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
<sql id="allCUserOrderListColumns"> |
|
|
|
o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, |
|
|
|
o.id,o.order_number,o.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.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit, |
|
|
|
cal.channel_type as send_channel_type |
|
|
|
</sql> |
|
|
|
|
|
|
|
|
|
|
|
<sql id="allCUserOrderDetailColumns"> |
|
|
|
o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, |
|
|
|
o.id,o.order_number,o.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.unit,c.detail,c.remark, |
|
|
|
co.id as coupon_order_id,co.coupon_order_status |
|
|
|
</sql> |
|
|
|
@@ -183,6 +191,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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"/> |
|
|
|
@@ -274,6 +283,10 @@ |
|
|
|
and bu.`id` = #{bUserId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != couponChannelId "> |
|
|
|
and o.`coupon_channel_id` = #{couponChannelId} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != productId "> |
|
|
|
and o.`product_id` = #{productId} |
|
|
|
</if> |
|
|
|
@@ -292,6 +305,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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="type" jdbcType="TINYINT" property="type"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
@@ -312,7 +326,7 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allPayOrderColumns"> |
|
|
|
o.`id`,o.`order_number`,o.`tenant_id`,o.`c_user_id`,o.`product_id`,o.`type`, |
|
|
|
o.`id`,o.`order_number`,o.`tenant_id`,o.`c_user_id`,o.`coupon_channel_id`,o.`product_id`,o.`type`, |
|
|
|
o.`payment_type`,o.`payment`,o.`payment_time`,o.`order_status`,o.`create_date`,o.`update_date`,o.`detail`, |
|
|
|
m.name as merchant_name, bu.name, bu.phone as bphone, |
|
|
|
cu.phone, cu.nick_name, cubi.name c_user_name |
|
|
|
@@ -438,6 +452,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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="type" jdbcType="TINYINT" property="type"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
@@ -456,7 +471,7 @@ |
|
|
|
<select id="findListOrder" resultMap="orderMap" parameterType="com.iformall.domain.vo.WxOrderQueryVo"> |
|
|
|
|
|
|
|
select o.* from ( |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
o.order_status,o.create_date,o.update_date,o.detail,'[多商户交易]' merchant_name,cubi.`name` c_user_name,cubi.phone |
|
|
|
from |
|
|
|
( |
|
|
|
@@ -465,7 +480,7 @@ |
|
|
|
on o.product_id=cm.product_id group by o.id having count(o.id)>1)) o |
|
|
|
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id |
|
|
|
union all |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone |
|
|
|
from( |
|
|
|
select o.*,cm.merchant_id from ( |
|
|
|
@@ -481,7 +496,7 @@ |
|
|
|
left join wx_merchant m on o.merchant_id=m.id |
|
|
|
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id |
|
|
|
union all |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
select o.id,o.order_number,o.tenant_id,o.c_user_id,o.coupon_channel_id,o.product_id,o.type,o.payment_type,o.payment,o.payment_time, |
|
|
|
o.order_status,o.create_date,o.update_date,o.detail,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone |
|
|
|
from wx_order o left join wx_merchant m on o.product_id=m.id |
|
|
|
left join wx_c_user_basic_info cubi on o.c_user_id=cubi.id |
|
|
|
@@ -558,6 +573,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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="type" jdbcType="INTEGER" property="type"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
@@ -592,6 +608,7 @@ |
|
|
|
<result column="order_number" jdbcType="BIGINT" property="orderNumber"/> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/> |
|
|
|
<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="type" jdbcType="INTEGER" property="type"/> |
|
|
|
<result column="payment_type" jdbcType="INTEGER" property="paymentType"/> |
|
|
|
@@ -627,13 +644,13 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allOrderPressListColumns"> |
|
|
|
o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status, |
|
|
|
o.id,o.order_number,o.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,o.press_end_date,o.press_current_num,o.press_current_value, |
|
|
|
c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.press_limit_num |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="allOrderPressDetailColumns"> |
|
|
|
o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status, |
|
|
|
o.id,o.order_number,o.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,o.press_end_date,o.press_current_num,o.press_current_value, |
|
|
|
c.type as coupon_type,c.cover_img,c.title,c.sub_title,c.sale_price,c.use_price,c.price,c.unit,c.detail,c.remark,c.press_limit_num, |
|
|
|
co.id as coupon_order_id,co.coupon_order_status |
|
|
|
|