class RobotFactory {

    @Autowired
    private ApplicationContext context;

    /**
     * @param robotType 机器人种类
     * @author ayumi760405
     * @des 取得推送机器人实作
     * @date 2022/12/20 18:20
     */
    public RobotMessenger getRobotMessenger(int robotType) {<FILL_FUNCTION_BODY>}

    public RobotMessenger getRobotMessenger(int robotType, String muteRule, Message message) {
        if (!muteRule.isEmpty()) {
            var mute = RobotMessenger.parseTemplate(muteRule).getValue(RobotMessenger.ctx, message, String.class);
            if ("true".equals(mute)) {
                return null;
            }
        }
        return getRobotMessenger(robotType);
    }
}

        RobotMessenger robotMessenger;
        switch (robotType) {
            case RobotType.DingTalk -> robotMessenger = context.getBean(DingTalkImpl.class);
            case RobotType.WeChat -> robotMessenger = context.getBean(WeChatImpl.class);
            case RobotType.FeiShu -> robotMessenger = context.getBean(FeiShuImpl.class);
            case RobotType.YouSpace -> robotMessenger = context.getBean(YouSpaceImpl.class);
            case RobotType.Telegram -> robotMessenger = context.getBean(TelegramImpl.class);
            case RobotType.LineNotify -> robotMessenger = context.getBean(LineNotifyImpl.class);
            case RobotType.SlackNotify -> robotMessenger = context.getBean(SlackNotifyImpl.class);
            case RobotType.WebHook -> robotMessenger = context.getBean(WebhookImpl.class);
            default -> throw new SonicException("Unsupported robot type");
        }
        return robotMessenger;
    
<no_super_class>