package com.xy.service.factory.device.impl;

import com.xy.annotate.FactoryRoute;
import com.xy.device.EnumDeviceType;
import com.xy.service.factory.device.DeviceFactory;
import com.xy.utils.FactoryUtils;
import lombok.AllArgsConstructor;

@AllArgsConstructor
@FactoryRoute(interfaceClass = DeviceFactory.class)
public class DeviceFactoryRoute implements FactoryUtils.RouteService {

    @Override
    public String route(Object object) {
        Integer deviceType = Integer.valueOf(object.toString());
        return deviceType == EnumDeviceType.N_5.getIntCode() ? "2" : "1";
    }
}
