|
|
@@ -378,6 +378,8 @@ |
|
|
<result column="phone" jdbcType="VARCHAR" property="cUserPhone" /> |
|
|
<result column="phone" jdbcType="VARCHAR" property="cUserPhone" /> |
|
|
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" /> |
|
|
<result column="merchant_name" jdbcType="VARCHAR" property="merchantName" /> |
|
|
|
|
|
|
|
|
|
|
|
<result column="verify_merchant_name" jdbcType="VARCHAR" property="verifyMerchantName"/> |
|
|
|
|
|
|
|
|
<collection column="{productId=coupon_id}" property="merchantVoList" |
|
|
<collection column="{productId=coupon_id}" property="merchantVoList" |
|
|
ofType="com.iformall.domain.vo.WxMerchantVo" |
|
|
ofType="com.iformall.domain.vo.WxMerchantVo" |
|
|
javaType="java.util.List" |
|
|
javaType="java.util.List" |
|
|
@@ -393,7 +395,7 @@ |
|
|
where m.id = cm.merchant_id and cm.product_id=co.coupon_id and cm.status = 0) else '[多商户通用]' end) as merchant_name, |
|
|
where m.id = cm.merchant_id and cm.product_id=co.coupon_id and cm.status = 0) else '[多商户通用]' end) as merchant_name, |
|
|
(case when com.mc = 1 then (select m.id from wx_merchant m, |
|
|
(case when com.mc = 1 then (select m.id from wx_merchant m, |
|
|
wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id = co.coupon_id |
|
|
wx_coupon_merchant cm where m.id = cm.merchant_id and cm.product_id = co.coupon_id |
|
|
and cm.status = 0) else 0 end) as merchant_id,(select phone from wx_c_user where id=co.c_user_id) phone |
|
|
|
|
|
|
|
|
and cm.status = 0) else 0 end) as merchant_id,cu.phone,bu.verify_merchant_name |
|
|
</sql> |
|
|
</sql> |
|
|
|
|
|
|
|
|
<sql id="allAdminCouponOrderDetailColumns"> |
|
|
<sql id="allAdminCouponOrderDetailColumns"> |
|
|
@@ -407,14 +409,19 @@ |
|
|
<select id="findListOfAdmin" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BVoResultMap"> |
|
|
<select id="findListOfAdmin" parameterType="com.iformall.domain.vo.WxCouponOrderBVo" resultMap="BVoResultMap"> |
|
|
select <include refid="allAdminCouponOrderListColumns" /> |
|
|
select <include refid="allAdminCouponOrderListColumns" /> |
|
|
from |
|
|
from |
|
|
wx_coupon_order co, |
|
|
|
|
|
wx_coupon c, |
|
|
|
|
|
(select tco.id as tcoid, |
|
|
|
|
|
(select count(*) from wx_coupon_merchant tcm |
|
|
|
|
|
where tcm.product_id = tco.coupon_id |
|
|
|
|
|
and tcm.status = 0) as mc |
|
|
|
|
|
from wx_coupon_order tco) com |
|
|
|
|
|
where com.tcoid = co.id |
|
|
|
|
|
|
|
|
wx_coupon_order co inner join wx_coupon c on c.id = co.coupon_id |
|
|
|
|
|
inner join (select tco.id as tcoid, |
|
|
|
|
|
(select count(*) from wx_coupon_merchant tcm |
|
|
|
|
|
where tcm.product_id = tco.coupon_id |
|
|
|
|
|
and tcm.status = 0) as mc |
|
|
|
|
|
from wx_coupon_order tco) com on com.tcoid = co.id |
|
|
|
|
|
inner join wx_c_user cu on cu.id=co.c_user_id |
|
|
|
|
|
left join ( |
|
|
|
|
|
select bu.id as bu_id,m.name as verify_merchant_name |
|
|
|
|
|
from wx_merchant_b_user bu inner join wx_merchant m on bu.merchant_id=m.id |
|
|
|
|
|
where bu.tenant_id = #{tenantId} |
|
|
|
|
|
) bu on bu.bu_id = co.b_user_id |
|
|
|
|
|
where 1=1 |
|
|
<choose> |
|
|
<choose> |
|
|
<when test=" null != couponType"> |
|
|
<when test=" null != couponType"> |
|
|
and co.coupon_type = #{couponType} |
|
|
and co.coupon_type = #{couponType} |
|
|
@@ -423,7 +430,6 @@ |
|
|
and co.coupon_type < 100 |
|
|
and co.coupon_type < 100 |
|
|
</otherwise> |
|
|
</otherwise> |
|
|
</choose> |
|
|
</choose> |
|
|
and c.id = co.coupon_id |
|
|
|
|
|
<if test=" null != tenantId "> |
|
|
<if test=" null != tenantId "> |
|
|
and co.tenant_id = #{tenantId} |
|
|
and co.tenant_id = #{tenantId} |
|
|
</if> |
|
|
</if> |
|
|
|