|
@@ -157,6 +157,8 @@ public class MercCouponFactoryBase extends ServiceImpl<MercCouponMapper, MercCou
|
|
|
List<Map<String, Object>> result = new ArrayList<>();
|
|
|
String thirdMemberId = param.getString("thirdMemberId");
|
|
|
String orderCreateTime = param.getString("orderCreateTime");
|
|
|
+ LocalDate orderCreateDate = LocalDateTime.parse(orderCreateTime, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")).toLocalDate();
|
|
|
+
|
|
|
//查找商家可赠送的优惠券
|
|
|
LambdaQueryWrapper<MercCoupon> lqw = new LambdaQueryWrapper<MercCoupon>()
|
|
|
.eq(MercCoupon::getMercId, param.getInt("mercId"))
|
|
@@ -164,10 +166,10 @@ public class MercCouponFactoryBase extends ServiceImpl<MercCouponMapper, MercCou
|
|
|
.eq(MercCoupon::getSendType, CouponSendTypeEnum.SHOPPING.getCode())
|
|
|
.and(wrapper -> wrapper.isNull(MercCoupon::getSendStartDate)
|
|
|
.or()
|
|
|
- .le(MercCoupon::getSendStartDate, orderCreateTime))
|
|
|
+ .le(MercCoupon::getSendStartDate, orderCreateDate))
|
|
|
.and(wrapper -> wrapper.isNull(MercCoupon::getSendEndDate)
|
|
|
.or()
|
|
|
- .ge(MercCoupon::getSendEndDate, orderCreateTime));
|
|
|
+ .ge(MercCoupon::getSendEndDate, orderCreateDate));
|
|
|
List<MercCoupon> list = list(lqw);
|
|
|
//过滤超过使用时间的券
|
|
|
list = filterCouponValidEndDate(list);
|