|
|
|
@@ -993,6 +993,82 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="findGoodsList" parameterType="com.iformall.domain.vo.WxCouponOrder" resultMap="AdminBVoResultMap"> |
|
|
|
select |
|
|
|
co.id,co.tenant_id,co.parent_tenant_id,co.coupon_id,co.coupon_type,co.c_user_id,co.owner_id,co.b_user_id, |
|
|
|
co.order_id,co.expired_time,co.coupon_order_status,co.create_date,co.update_date,co.coupon_price,co.verify_type,co.verify_remark, co.pay_vendor, |
|
|
|
co.`freight_price`,co.`shipping_type`,co.`shipping_address`,co.`shipping_status`,co.`delivery_info`, |
|
|
|
c.type,c.title,c.sale_price,c.use_price,c.price,c.unit,c.auto_refund,c.business,c.subsidy_type, |
|
|
|
cu.phone |
|
|
|
FROM wx_coupon_order co |
|
|
|
left join wx_coupon_merchant wcm on co.coupon_id = wcm.product_id and wcm.merchant_id = #{merchantId} |
|
|
|
LEFT JOIN wx_c_user_basic_info cu ON cu.id=co.c_user_id |
|
|
|
LEFT JOIN wx_coupon c ON c.id = co.coupon_id |
|
|
|
where 1=1 |
|
|
|
<choose> |
|
|
|
<when test=" null != couponType"> |
|
|
|
and co.coupon_type = #{couponType} |
|
|
|
</when> |
|
|
|
<otherwise> |
|
|
|
and co.coupon_type < 100 |
|
|
|
</otherwise> |
|
|
|
</choose> |
|
|
|
<if test=" null != tenantId and '' != tenantId"> |
|
|
|
and co.`tenant_id` = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != parentTenantId and '' != parentTenantId"> |
|
|
|
and co.`parent_tenant_id` = #{parentTenantId} |
|
|
|
</if> |
|
|
|
<if test=" null != cUserPhone and '' != cUserPhone"> |
|
|
|
and cu.`phone` = #{cUserPhone} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != couponOrderStatus "> |
|
|
|
and co.coupon_order_status = #{couponOrderStatus} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="startDate != null"> |
|
|
|
AND co.create_date > #{startDate,jdbcType=TIMESTAMP} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="endDate != null"> |
|
|
|
AND co.create_date < #{endDate,jdbcType=TIMESTAMP} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="verifyStartDate != null"> |
|
|
|
AND co.update_date > #{verifyStartDate,jdbcType=TIMESTAMP} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test="verifyEndDate != null"> |
|
|
|
AND co.update_date < #{verifyEndDate,jdbcType=TIMESTAMP} |
|
|
|
</if> |
|
|
|
|
|
|
|
<if test=" null != id "> |
|
|
|
and co.id = #{id} |
|
|
|
</if> |
|
|
|
<if test=" null != orderId "> |
|
|
|
and co.order_id = #{orderId} |
|
|
|
</if> |
|
|
|
<if test=" null != couponId "> |
|
|
|
and c.id = #{couponId} |
|
|
|
</if> |
|
|
|
<if test=" null != title "> |
|
|
|
and c.title like concat('%', #{title},'%') |
|
|
|
</if> |
|
|
|
<if test=" null != type "> |
|
|
|
and c.`type` = #{type} |
|
|
|
</if> |
|
|
|
<if test=" null != business "> |
|
|
|
and c.business = #{business} |
|
|
|
</if> |
|
|
|
<if test=" null != sourceType "> |
|
|
|
and c.`source_type` = #{sourceType} |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns"> order by ${sortColumns} </if> |
|
|
|
<if test=" null == sortColumns">order by co.create_date desc,co.id desc</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="findDetailOfAdmin" parameterType="java.util.HashMap" resultMap="BVoResultMap"> |
|
|
|
select <include refid="allAdminCouponOrderDetailColumns" /> |
|
|
|
|