| @@ -46,6 +46,14 @@ public class OrderExpiringSchedule { | |||||
| orderCoupons.parallelStream().forEach( o -> { | orderCoupons.parallelStream().forEach( o -> { | ||||
| orderExpired(o); | orderExpired(o); | ||||
| }); | }); | ||||
| // 砍价相关订单 | |||||
| dateMap.put("type", EnumOrderType.COUPON.getCode()); | |||||
| dateMap.put("endDate", curDate); | |||||
| List<WxOrder> orderPresss = wxOrderMapper.findListOfUnpaidPressOrderByDate(dateMap); | |||||
| orderPresss.parallelStream().forEach( o -> { | |||||
| orderExpired(o); | |||||
| }); | |||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| @@ -17,6 +17,7 @@ public interface WxOrderMapper extends CommonMapper<WxOrder, Long> { | |||||
| Integer dayCountList(WxOrder wxOrder); | Integer dayCountList(WxOrder wxOrder); | ||||
| List<WxOrder> findListOfUnpaidOrderByDate(Map dateMap); | List<WxOrder> findListOfUnpaidOrderByDate(Map dateMap); | ||||
| List<WxOrder> findListOfUnpaidPressOrderByDate(Map dateMap); | |||||
| List<WxOrderCouponVo> findListOfCUser(WxOrder wxOrder); | List<WxOrderCouponVo> findListOfCUser(WxOrder wxOrder); | ||||
| WxOrderCouponVo selectDetailOfCUser(WxOrder wxOrder); | WxOrderCouponVo selectDetailOfCUser(WxOrder wxOrder); | ||||
| @@ -118,7 +118,7 @@ | |||||
| select | select | ||||
| <include refid="allColumns"/> | <include refid="allColumns"/> | ||||
| from wx_order | from wx_order | ||||
| where order_status = '0' | |||||
| where order_status = '0' and press_end_date is null | |||||
| <if test="type != null"> | <if test="type != null"> | ||||
| AND type = #{type,jdbcType=TINYINT} | AND type = #{type,jdbcType=TINYINT} | ||||
| </if> | </if> | ||||
| @@ -130,6 +130,22 @@ | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <select id="findListOfUnpaidPressOrderByDate" parameterType="map" resultMap="BaseResultMap"> | |||||
| select | |||||
| <include refid="allColumns"/> | |||||
| from wx_order | |||||
| where order_status = '0' and press_end_date is not null | |||||
| <if test="type != null"> | |||||
| AND type = #{type,jdbcType=TINYINT} | |||||
| </if> | |||||
| <if test="startDate != null"> | |||||
| AND create_date > #{startDate,jdbcType=TIMESTAMP} | |||||
| </if> | |||||
| <if test="endDate != null"> | |||||
| AND press_end_date < #{endDate,jdbcType=TIMESTAMP} | |||||
| </if> | |||||
| </select> | |||||
| <sql id="allCUserOrderListColumns"> | <sql id="allCUserOrderListColumns"> | ||||
| o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, | o.id,o.order_number,o.tenant_id,o.c_user_id,o.product_id,o.payment_type,o.payment,o.payment_time,o.order_status,o.create_date,o.update_date, | ||||