Browse Source

[砍价][修改]:砍价券过期时间按照过期时间小的走

release_toaliyun_real
Stormeye Wu 7 years ago
parent
commit
bc2e0ab2b7
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java

+ 5
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java View File

@@ -378,7 +378,11 @@ public class WxOrderServiceImpl implements WxOrderService {
if (isPress) {
// 初始砍价信息
record.setPressCurrentNum(0);
record.setPressEndDate(DateUtils.getHourTimeAfter(coupon.getPressLimitHours(), new Date()));
// 砍价券过期时间取券的过期时间和砍价限制时间中时间小的那个
Date pressEndDate = DateUtils.getHourTimeAfter(coupon.getPressLimitHours(), new Date());
if(pressEndDate.after(coupon.getValidEndDate()))
pressEndDate = coupon.getValidEndDate();
record.setPressEndDate(pressEndDate);
record.setPressCurrentValue(coupon.getPrice() - coupon.getSalePrice());
}



Loading…
Cancel
Save