SeckillOrderStrategy.java 462 B

1234567891011121314
  1. package strategyPattern.service.impl;
  2. import org.slf4j.Logger;
  3. import org.slf4j.LoggerFactory;
  4. import strategyPattern.service.OrderStrategy;
  5. public class SeckillOrderStrategy implements OrderStrategy {
  6. private static final Logger log = LoggerFactory.getLogger(NormalOrderStrategy.class);
  7. @Override
  8. public void placeOrder(String userId, String productId) {
  9. log.info("秒杀下单成功,userId:{},productId:{}", userId, productId);
  10. }
  11. }