package com.muyu.server.util;

import com.muyu.common.core.utils.StringUtils;
import com.muyu.domain.*;
import com.muyu.enterprise.cache.faultCode.VehicleCacheFaultCodeAddService;
import com.muyu.server.service.*;
import com.muyu.server.service.impl.FaultConditionServiceImpl;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.ArrayList;
import java.util.List;

/**
 * 登录存储redis缓存
 * @Author：yang
 * @Package：com.muyu.server.util
 * @Project：cloud-server-8
 * @name：RunCarCondition
 * @Date：2024/10/7 19:43
 */
@Component
@AllArgsConstructor
public class RunCarCondition {

    private final VehicleCacheFaultCodeAddService vehicleCacheFaultCodeAddService;
    private final FaultConditionService faultConditionService;
    private final CarInformationService carInformationService;
    private final CarFenceService carFenceService;
    private final WarnStrategyService warnStrategyService;
    private final FaultCodeService faultCodeService;
    private final FaultLabelService faultLabelService;

    @GetMapping("text")
    public void runCarCondition(){
        List<FaultCondition> list = faultConditionService.saveFaultConditionList();
        FaultConditionServiceImpl.text(list, carInformationService, carFenceService, warnStrategyService, faultCodeService, faultLabelService, vehicleCacheFaultCodeAddService);
    }
}
