package com.dy.pipIrrParamSet.paramSet; 
 | 
  
 | 
import com.dy.pipIrrParamSet.console.Command; 
 | 
import lombok.extern.slf4j.Slf4j; 
 | 
import org.springframework.beans.factory.annotation.Autowired; 
 | 
import org.springframework.context.annotation.Scope; 
 | 
import org.springframework.core.env.Environment; 
 | 
import org.springframework.stereotype.Component; 
 | 
  
 | 
/** 
 | 
 * @Author: liurunyu 
 | 
 * @Date: 2025/5/28 16:29 
 | 
 * @Description 
 | 
 */ 
 | 
@Slf4j 
 | 
@Component 
 | 
@Scope("prototype") 
 | 
public class ParamSet { 
 | 
    private Environment env ; 
 | 
    private ParamSetMw paramSetMw ; 
 | 
    private ParamSetWeb paramSetWeb ; 
 | 
    @Autowired 
 | 
    public void setBean(Environment env){ 
 | 
        this.env = env ; 
 | 
    } 
 | 
    @Autowired 
 | 
    public void setBean(ParamSetMw paramSetMw){ 
 | 
        this.paramSetMw = paramSetMw ; 
 | 
    } 
 | 
    @Autowired 
 | 
    public void setBean(ParamSetWeb paramSetWeb){ 
 | 
        this.paramSetWeb = paramSetWeb ; 
 | 
    } 
 | 
  
 | 
    public void dealCom(String[] comIn, Command command){ 
 | 
        if (comIn.length < 2) { 
 | 
            command.outNoIdentify(); 
 | 
        } 
 | 
        switch (comIn[0]) { 
 | 
            case "mw" : { 
 | 
                if (comIn.length != 3) { 
 | 
                    command.outNoIdentify(); 
 | 
                }else{ 
 | 
                    this.paramSetMw.set(env, comIn, command); 
 | 
                } 
 | 
                break; 
 | 
            } 
 | 
            case "web" : { 
 | 
                this.paramSetWeb.set(comIn, command); 
 | 
                break; 
 | 
            } 
 | 
            default: command.outNoIdentify(); break; 
 | 
        } 
 | 
    } 
 | 
 } 
 |