| 1234567891011121314151617181920212223242526272829 |
- package com.example.hotel.blImpl.coupon;
- import com.example.hotel.bl.coupon.CouponStrategy;
- import com.example.hotel.po.Coupon;
- import com.example.hotel.vo.CouponVO;
- import com.example.hotel.vo.HotelTargetMoneyCouponVO;
- import com.example.hotel.vo.OrderVO;
- import org.springframework.stereotype.Service;
- @Service
- public class TargetMoneyCouponStrategyImpl implements CouponStrategy {
- /**
- * 判断某个订单是否满足某种满减金额优惠策略
- * @param orderVO
- * @param coupon
- * @return
- */
- @Override
- public boolean isMatchCoupon(OrderVO orderVO, Coupon coupon) {
- if (coupon.getCouponType() == 3 && orderVO.getPrice() >= coupon.getTargetMoney()) {
- return true;
- }
- return false;
- }
- }
|