|
|
|
@@ -957,9 +957,76 @@ |
|
|
|
select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<resultMap id="CVoResultMapOptimize" type="com.iformall.domain.vo.WxCouponOrderCVo"> |
|
|
|
<id column="id" jdbcType="BIGINT" property="id" /> |
|
|
|
<result column="tenant_id" jdbcType="BIGINT" property="tenantId" /> |
|
|
|
<result column="coupon_id" jdbcType="BIGINT" property="couponId" /> |
|
|
|
<result column="coupon_type" jdbcType="INTEGER" property="couponType" /> |
|
|
|
<result column="c_user_id" jdbcType="BIGINT" property="cUserId" /> |
|
|
|
<result column="owner_id" jdbcType="BIGINT" property="ownerId" /> |
|
|
|
<result column="b_user_id" jdbcType="BIGINT" property="bUserId" /> |
|
|
|
<result column="order_id" jdbcType="BIGINT" property="orderId" /> |
|
|
|
<result column="expired_time" jdbcType="TIMESTAMP" property="expiredTime" /> |
|
|
|
<result column="coupon_order_status" jdbcType="INTEGER" property="couponOrderStatus" /> |
|
|
|
<result column="create_date" jdbcType="TIMESTAMP" property="createDate" /> |
|
|
|
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" /> |
|
|
|
<result column="coupon_price" jdbcType="INTEGER" property="couponPrice" /> |
|
|
|
<result column="verify_type" jdbcType="INTEGER" property="verifyType" /> |
|
|
|
|
|
|
|
<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="unit" jdbcType="INTEGER" property="unit" /> |
|
|
|
<result column="remark" jdbcType="VARCHAR" property="remark" /> |
|
|
|
<result column="valid_type" jdbcType="INTEGER" property="validType" /> |
|
|
|
<result column="valid_start_date" jdbcType="TIMESTAMP" property="validStartDate"/> |
|
|
|
<result column="valid_end_date" jdbcType="TIMESTAMP" property="validEndDate"/> |
|
|
|
<result column="auto_refund" jdbcType="INTEGER" property="autoRefund" /> |
|
|
|
|
|
|
|
<result column="send_channel_type" jdbcType="INTEGER" property="sendChannelType" /> |
|
|
|
|
|
|
|
<collection column="{productId=coupon_id}" property="merchantVoList" |
|
|
|
ofType="com.iformall.domain.vo.WxMerchantVo" |
|
|
|
javaType="java.util.List" |
|
|
|
select="com.iformall.mapper.WxCouponMerchantMapper.findMerchantVoList" > |
|
|
|
</collection> |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
|
|
|
|
<!-- <select id="findListOfCUser" parameterType="com.iformall.domain.vo.WxCouponOrderCVo" resultMap="CVoResultMap"> |
|
|
|
select <include refid="allCUserCouponOrderListColumns" /> |
|
|
|
from wx_coupon c,wx_coupon_order co |
|
|
|
left join wx_coupon_action_log cal on cal.coupon_order_id = co.id |
|
|
|
where 1=1 |
|
|
|
and co.coupon_id = c.id |
|
|
|
and co.coupon_type != 5 |
|
|
|
and co.coupon_type != 51 |
|
|
|
and co.coupon_type < 100 |
|
|
|
<if test="cUserId != null"> |
|
|
|
and co.c_user_id = #{cUserId} |
|
|
|
</if> |
|
|
|
<if test="ownerId != null"> |
|
|
|
and co.owner_id = #{ownerId} |
|
|
|
</if> |
|
|
|
<if test="tenantId != null"> |
|
|
|
and co.tenant_id = #{tenantId} |
|
|
|
</if> |
|
|
|
<if test="couponOrderStatus != null and 0 == couponOrderStatus"> |
|
|
|
AND (co.coupon_order_status = #{couponOrderStatus} OR co.coupon_order_status = 100 ) |
|
|
|
</if> |
|
|
|
<if test="couponOrderStatus != null and 0 != couponOrderStatus"> |
|
|
|
AND co.coupon_order_status = #{couponOrderStatus} |
|
|
|
</if> |
|
|
|
<if test=" null != sortColumns"> order by ${sortColumns} </if> |
|
|
|
</select> --> |
|
|
|
|
|
|
|
<select id="findListOfCUser" parameterType="com.iformall.domain.vo.WxCouponOrderCVo" resultMap="CVoResultMap"> |
|
|
|
<select id="findListOfCUserOptimize" parameterType="com.iformall.domain.vo.WxCouponOrderCVo" resultMap="CVoResultMapOptimize"> |
|
|
|
select <include refid="allCUserCouponOrderListColumns" /> |
|
|
|
from wx_coupon c,wx_coupon_order co |
|
|
|
left join wx_coupon_action_log cal on cal.coupon_order_id = co.id |
|
|
|
|