| package com.mzl.flower.service.menber.impl; | 
|   | 
| import com.mzl.flower.service.menber.GrowthValueDeductionStrategy; | 
| import org.springframework.beans.factory.annotation.Autowired; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import java.util.HashMap; | 
| import java.util.Map; | 
|   | 
|   | 
| @Service | 
| public class GrowthValueStrategyContext { | 
|     @Autowired | 
|     private final Map<String, GrowthValueDeductionStrategy> growthValueDeductionStrategyMap = new HashMap<>(); | 
|   | 
|     public GrowthValueStrategyContext(Map<String, GrowthValueDeductionStrategy> growthValueDeductionStrategyMap) { | 
|         this.growthValueDeductionStrategyMap.clear(); | 
|         growthValueDeductionStrategyMap.forEach((k, v) -> this.growthValueDeductionStrategyMap.put(k, v)); | 
|     } | 
|   | 
|     public GrowthValueDeductionStrategy getGrowthInfo(String growthInfo) { | 
|         return growthValueDeductionStrategyMap.get(growthInfo); | 
|     } | 
| } |