|
|
|
@@ -338,22 +338,27 @@ |
|
|
|
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate"/> |
|
|
|
<result column="detail" jdbcType="VARCHAR" property="detail"/> |
|
|
|
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName"/> |
|
|
|
<result column="c_user_name" jdbcType="VARCHAR" property="cUserName"/> |
|
|
|
<result column="phone" jdbcType="VARCHAR" property="phone"/> |
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<select id="findListOrder" resultMap="orderMap" parameterType="com.iformall.domain.vo.WxOrderQueryVo"> |
|
|
|
|
|
|
|
select o.* from ( |
|
|
|
select o.*,m.`name` merchant_name from ( |
|
|
|
select o.*,m.`name` merchant_name,cubi.`name` c_user_name,cubi.phone from ( |
|
|
|
select o.*,cm.merchant_id from wx_order o |
|
|
|
left join wx_coupon_merchant cm on o.product_id=cm.product_id |
|
|
|
where type in (0,3)) o |
|
|
|
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.*,m.`name` merchantName from ( |
|
|
|
select o.*,m.`name` merchantName,cubi.`name` c_user_name,cubi.phone from ( |
|
|
|
select o.*,mbu.merchant_id from wx_order o |
|
|
|
left join wx_merchant_b_user mbu on o.product_id=mbu.id |
|
|
|
where type in (1,2)) o |
|
|
|
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 |
|
|
|
) o |
|
|
|
<where> |
|
|
|
<if test="tenantId!=null"> |
|
|
|
|