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.Windsubstationtestingpoint2Mapper;
import com.gyee.frame.model.auto.Windsubstationtestingpoint2;
import com.gyee.frame.model.auto.Windsubstationtestingpoint2Example;
import org.springframework.stereotype.Service;

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


@Service
public class Windsubstationtestingpoint2Service implements BaseService<Windsubstationtestingpoint2, Windsubstationtestingpoint2Example> {
    @Resource
    private Windsubstationtestingpoint2Mapper windsubstationtestingpoint2Mapper;


    @Override
    public int deleteByPrimaryKey(String ids) {

        List<String> lista = Convert.toListStrArray(ids);
        Windsubstationtestingpoint2Example example = new Windsubstationtestingpoint2Example();
        example.createCriteria().andCodeIn(lista);
        return windsubstationtestingpoint2Mapper.deleteByExample(example);


    }


    @Override
    public Windsubstationtestingpoint2 selectByPrimaryKey(String id) {

        return windsubstationtestingpoint2Mapper.selectByPrimaryKey(id);

    }


    @Override
    public int updateByPrimaryKeySelective(Windsubstationtestingpoint2 record) {
        return windsubstationtestingpoint2Mapper.updateByPrimaryKeySelective(record);
    }


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


        return windsubstationtestingpoint2Mapper.insertSelective(record);
    }


    @Override
    public int updateByExampleSelective(Windsubstationtestingpoint2 record, Windsubstationtestingpoint2Example example) {

        return windsubstationtestingpoint2Mapper.updateByExampleSelective(record, example);
    }


    @Override
    public int updateByExample(Windsubstationtestingpoint2 record, Windsubstationtestingpoint2Example example) {

        return windsubstationtestingpoint2Mapper.updateByExample(record, example);
    }

    @Override
    public List<Windsubstationtestingpoint2> selectByExample(Windsubstationtestingpoint2Example example) {

        return windsubstationtestingpoint2Mapper.selectByExample(example);
    }


    @Override
    public long countByExample(Windsubstationtestingpoint2Example example) {

        return windsubstationtestingpoint2Mapper.countByExample(example);
    }


    @Override
    public int deleteByExample(Windsubstationtestingpoint2Example example) {

        return windsubstationtestingpoint2Mapper.deleteByExample(example);
    }



    public int deleteAll() {


        int result= windsubstationtestingpoint2Mapper.deleteAll();


        return result;

    }

    public int insertBatch(List<Windsubstationtestingpoint2> ls) {


        int result= windsubstationtestingpoint2Mapper.insertBatch(ls);


        return result;

    }


}
