|
@@ -18,8 +18,11 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
+import static org.springframework.data.elasticsearch.annotations.DateFormat.date;
|
|
|
+
|
|
|
/**
|
|
|
* @author yuu
|
|
|
* @description 针对表【coupon(优惠券)】的数据库操作Service实现
|
|
@@ -54,7 +57,8 @@ public class CouponServiceImpl extends ServiceImpl<CouponMapper, Coupon>
|
|
|
Course course = courseMapper.selectById(primary.getCouponId());
|
|
|
List<Coupon> list=new ArrayList<>();
|
|
|
for (Long i:objects){
|
|
|
- list.add(this.baseMapper.selectOne(new QueryWrapper<Coupon>().eq("id",i).ge("condition_amount",course.getPrice())));
|
|
|
+ Date date1=new Date();
|
|
|
+ list.add(this.baseMapper.selectOne(new QueryWrapper<Coupon>().eq("id",i).ge("condition_amount",course.getPrice()).ge("start_time",date1)));
|
|
|
System.err.println(list);
|
|
|
}
|
|
|
if (list==null){
|