package com.gyee.wisdom.alarm.sharding.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gyee.wisdom.alarm.sharding.entity.ShutdownEvent;
import com.gyee.wisdom.alarm.sharding.entity.TestingPointAI;
import com.gyee.wisdom.alarm.sharding.entity.TestingPointDI;
import com.gyee.wisdom.alarm.sharding.mapper.TestingPointDIMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @description:
 * @auther: Wanghs
 * @date: 2022-04-08
 */
@Service
public class TestingPointDIService extends ServiceImpl<TestingPointDIMapper, TestingPointDI> {

    @Autowired
    private TestingPointDIMapper testingPointDIMapper;

    public List<String> getModel(){
//        QueryWrapper wrapper=new QueryWrapper<TestingPointDI>();
//        wrapper.select("distinct MODELID");
//        List list = testingPointDIMapper.selectMaps(wrapper);
        List<String> lst = testingPointDIMapper.getModel();
        return lst;
    }

    public List<TestingPointDI> getTestingPointDIByMinModelId(String minModel){
        List<TestingPointDI> pointByMinModel = testingPointDIMapper.getPointByMinModel(minModel);
        return pointByMinModel;
    }
    public List<TestingPointDI> getAllList(){
        List<TestingPointDI> testingPointAIS = testingPointDIMapper.selectByStationAndModel(null, null);
        return testingPointAIS;
    }
}
