package com.gyee.frame.service;

import com.gyee.frame.common.base.BaseService;
import com.gyee.frame.common.support.Convert;
import com.gyee.frame.mapper.auto.WindturbinetestingpointMapper;
import com.gyee.frame.model.auto.Windturbinetestingpoint;
import com.gyee.frame.model.auto.WindturbinetestingpointExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class WindturbinetestingpointService implements BaseService<Windturbinetestingpoint, WindturbinetestingpointExample> {
    @Resource
    private WindturbinetestingpointMapper windturbinetestingpointMapper;


    @Override
    public int deleteByPrimaryKey(String ids) {

        List<String> lista = Convert.toListStrArray(ids);
        WindturbinetestingpointExample example = new WindturbinetestingpointExample();
        example.createCriteria().andIdIn(lista);
        return windturbinetestingpointMapper.deleteByExample(example);


    }


    @Override
    public Windturbinetestingpoint selectByPrimaryKey(String id) {

        return windturbinetestingpointMapper.selectByPrimaryKey(id);

    }


    @Override
    public int updateByPrimaryKeySelective(Windturbinetestingpoint record) {
        return windturbinetestingpointMapper.updateByPrimaryKeySelective(record);
    }


    /**
     * 添加
     */
    @Override
    public int insertSelective(Windturbinetestingpoint record) {



        return windturbinetestingpointMapper.insertSelective(record);
    }


    @Override
    public int updateByExampleSelective(Windturbinetestingpoint record, WindturbinetestingpointExample example) {

        return windturbinetestingpointMapper.updateByExampleSelective(record, example);
    }


    @Override
    public int updateByExample(Windturbinetestingpoint record, WindturbinetestingpointExample example) {

        return windturbinetestingpointMapper.updateByExample(record, example);
    }

    @Override
    public List<Windturbinetestingpoint> selectByExample(WindturbinetestingpointExample example) {

        return windturbinetestingpointMapper.selectByExample(example);
    }


    @Override
    public long countByExample(WindturbinetestingpointExample example) {

        return windturbinetestingpointMapper.countByExample(example);
    }


    @Override
    public int deleteByExample(WindturbinetestingpointExample example) {

        return windturbinetestingpointMapper.deleteByExample(example);
    }


    public  List<Windturbinetestingpoint> findAllList() {

        WindturbinetestingpointExample example = new WindturbinetestingpointExample();

        List<Windturbinetestingpoint> vos = windturbinetestingpointMapper.selectByExample(example);


        return vos;

    }

    public int deleteAll() {


        int result= windturbinetestingpointMapper.deleteAll();


        return result;

    }

    public int insertBatch(List<Windturbinetestingpoint> ls) {


        int result= windturbinetestingpointMapper.insertBatch(ls);


        return result;

    }
}
