|
|
|
@@ -7,6 +7,7 @@ |
|
|
|
<result column="type" jdbcType="INTEGER" property="type"/> |
|
|
|
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> |
|
|
|
<result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> |
|
|
|
<result column="detail_picture" jdbcType="VARCHAR" property="detailPicture"/> |
|
|
|
<result column="title" jdbcType="VARCHAR" property="title"/> |
|
|
|
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/> |
|
|
|
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/> |
|
|
|
@@ -86,7 +87,7 @@ |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`tenant_id`,`type`,`cover_img`,`cover_picture`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`, |
|
|
|
`id`,`tenant_id`,`type`,`cover_img`,`cover_picture`,`detail_picture`,`title`,`sub_title`,`sale_price`,`use_price`,`use_limit_quantity`,`send_type`, |
|
|
|
`valid_type`,`valid_start_date`,`valid_end_date`,`valid_days`,`detail`,`price`,`unit`,`remain_inventory`,`inventory`, |
|
|
|
`remark`,`status`,`create_date`,`update_date`,`business`,`sub_business`,`support_transfer`,`subsidy_num`,`subsidy_type`, |
|
|
|
`press_limit_num`, `press_limit_hours`, `auto_refund`,`credit_price`,`credit_refund` |
|
|
|
@@ -429,6 +430,7 @@ |
|
|
|
<result column="type" jdbcType="INTEGER" property="type"/> |
|
|
|
<result column="cover_img" jdbcType="VARCHAR" property="coverImg"/> |
|
|
|
<result column="cover_picture" jdbcType="VARCHAR" property="coverPicture"/> |
|
|
|
<result column="detail_picture" jdbcType="VARCHAR" property="detailPicture"/> |
|
|
|
<result column="title" jdbcType="VARCHAR" property="title"/> |
|
|
|
<result column="sub_title" jdbcType="VARCHAR" property="subTitle"/> |
|
|
|
<result column="sale_price" jdbcType="INTEGER" property="salePrice"/> |
|
|
|
@@ -649,22 +651,6 @@ |
|
|
|
<if test=" null == sortColumns"> order by c.status asc,c.create_date desc </if> |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- |
|
|
|
<select id="findCouponSendCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon"> |
|
|
|
select DATE_FORMAT(c.create_time,'%Y-%m-%d') xtime,count(id) xcount from wx_coupon_action_log c |
|
|
|
where c.create_time between #{startdate} and #{enddate} |
|
|
|
group by xtime |
|
|
|
</select> |
|
|
|
<select id="findCouponGetCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.po.WxCoupon"> |
|
|
|
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c |
|
|
|
left join wx_coupon_order wco on c.id = wco.coupon_id |
|
|
|
where 1=1 |
|
|
|
and wco.create_date between #{startdate} and #{enddate} |
|
|
|
and wco.coupon_price = 0 |
|
|
|
group by xtime |
|
|
|
</select> |
|
|
|
--> |
|
|
|
|
|
|
|
<select id="findCouponOrderCount" parameterType="com.iformall.domain.po.WxCoupon" resultType="com.iformall.domain.vo.WxCouponStatisVo"> |
|
|
|
select DATE_FORMAT(wco.create_date,'%Y-%m-%d') xtime,count(wco.id) xcount from wx_coupon c |
|
|
|
left join wx_coupon_order wco on c.id = wco.coupon_id |
|
|
|
@@ -790,11 +776,11 @@ |
|
|
|
|
|
|
|
<select id="findCouponByTopic" parameterType="com.iformall.domain.po.WxTopic" resultType="com.iformall.domain.po.WxCoupon"> |
|
|
|
select ct.id as id,wc.id as couponId, |
|
|
|
wc.tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`, |
|
|
|
wc.tenant_id,wc.`type`,wc.`cover_img`,wc.`cover_picture`,wc.`detail_picture`,wc.`title`,wc.`sub_title`,wc.`sale_price`,wc.`use_price`,wc.`use_limit_quantity`,wc.`send_type`, |
|
|
|
wc.`valid_type`,wc.`valid_start_date`,wc.`valid_end_date`,wc.`valid_days`,wc.`detail`,wc.`price`,wc.`unit`,wc.`remain_inventory`,wc.`inventory`, |
|
|
|
wc.`remark`,wc.`status`,wc.`create_date`,wc.`update_date`,wc.`business`,wc.`sub_business`,wc.`support_transfer`,wc.`subsidy_num`,wc.`subsidy_type`, |
|
|
|
wc.`press_limit_num`, wc.`press_limit_hours`, wc.`auto_refund`,wc.`credit_price`,wc.`credit_refund` |
|
|
|
,wc.title as couponName,wc.`cover_img` as couponPic,wc.`cover_picture` as couponPicture,wc.id as couponId from wx_coupon_channel ct left join |
|
|
|
,wc.title as couponName,wc.`cover_img` as couponPic,wc.`cover_picture` as couponPicture,wc.`detail_picture` as detailPicture,wc.id as couponId from wx_coupon_channel ct left join |
|
|
|
wx_coupon wc on wc.id = ct.coupon_id |
|
|
|
where ct.`sub_target_id` = #{id} |
|
|
|
</select> |
|
|
|
|