Procházet zdrojové kódy

[砍价][新增]:砍价订单过期检查

release_toaliyun_real
Stormeye Wu před 7 roky
rodič
revize
57fea50709
3 změnil soubory, kde provedl 26 přidání a 1 odebrání
  1. +8
    -0
      mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java
  2. +1
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxOrderMapper.java
  3. +17
    -1
      mallinkService/src/main/resources/mapper/WxOrderMapper.xml

+ 8
- 0
mallinkSchedule/src/main/java/com/iformall/schedule/OrderExpiringSchedule.java Zobrazit soubor

@@ -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})


+ 1
- 0
mallinkService/src/main/java/com/iformall/mapper/WxOrderMapper.java Zobrazit soubor

@@ -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);


+ 17
- 1
mallinkService/src/main/resources/mapper/WxOrderMapper.xml Zobrazit soubor

@@ -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 &gt; #{startDate,jdbcType=TIMESTAMP}
</if>
<if test="endDate != null">
AND press_end_date &lt; #{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,


Načítá se…
Zrušit
Uložit