|
|
|
@@ -454,28 +454,6 @@ |
|
|
|
order by xTime desc |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > |
|
|
|
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price from wx_coupon_order |
|
|
|
where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} GROUP BY xTime |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryPriceTotal" resultType="java.lang.Integer" > |
|
|
|
SELECT IFNULL(SUM(coupon_price),0) from wx_coupon_order |
|
|
|
where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<update id="offExpiredCouponOrderByValidDate"> |
|
|
|
update wx_coupon_order SET coupon_order_status = 2, update_date = now() |
|
|
|
where expired_time < now() and coupon_price = 0 and coupon_order_status = 0 |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="findExpiredCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns" /> from wx_coupon_order |
|
|
|
where expired_time < now() and coupon_price > 0 and coupon_order_status = 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
<sql id="allCUserCouponOrderCarListColumns"> |
|
|
|
c.id,c.expired_time,c.coupon_order_status,c.create_date,c.update_date,c.coupon_price, |
|
|
|
co.cover_img,co.title,co.sub_title,co.sale_price,co.use_price,co.price,co.unit,m.id as merchant_id, |
|
|
|
@@ -589,4 +567,24 @@ |
|
|
|
and create_date <= #{endTime} |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryPriceTotalGroup" resultType="com.iformall.domain.vo.CUserDateAmountVo" > |
|
|
|
SELECT DATE_FORMAT(create_date,'%Y-%m-%d') as xTime,IFNULL(SUM(coupon_price),0) as price from wx_coupon_order |
|
|
|
where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} GROUP BY xTime |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="queryPriceTotal" resultType="java.lang.Integer" > |
|
|
|
SELECT IFNULL(SUM(coupon_price),0) from wx_coupon_order |
|
|
|
where tenant_id=#{tenantId} AND create_date >= #{startTime} and create_date < #{endTime} |
|
|
|
</select> |
|
|
|
|
|
|
|
<update id="offExpiredCouponOrderByValidDate"> |
|
|
|
update wx_coupon_order SET coupon_order_status = 2, update_date = now() |
|
|
|
where expired_time < now() and coupon_price = 0 and coupon_order_status = 0 |
|
|
|
</update> |
|
|
|
|
|
|
|
<select id="findExpiredCouponOrderByValidDate" parameterType="com.iformall.domain.po.WxCouponOrder" resultMap="BaseResultMap"> |
|
|
|
select <include refid="allColumns" /> from wx_coupon_order |
|
|
|
where expired_time < now() and coupon_price > 0 and coupon_order_status = 0 |
|
|
|
</select> |
|
|
|
|
|
|
|
</mapper> |