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.WindsubstationtestingpointMapper;
import com.gyee.frame.model.auto.Windsubstationtestingpoint;
import com.gyee.frame.model.auto.WindsubstationtestingpointExample;
import org.springframework.stereotype.Service;

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


@Service
public class Windsubstationtestingpoint2Service implements BaseService<Windsubstationtestingpoint, WindsubstationtestingpointExample> {
    @Resource
    private WindsubstationtestingpointMapper windsubstationtestingpoint2Mapper;


    @Override
    public int deleteByPrimaryKey(String ids) {

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


    }


    @Override
    public Windsubstationtestingpoint selectByPrimaryKey(String id) {

        return windsubstationtestingpoint2Mapper.selectByPrimaryKey(id);

    }


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


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


        return windsubstationtestingpoint2Mapper.insertSelective(record);
    }


    @Override
    public int updateByExampleSelective(Windsubstationtestingpoint record, WindsubstationtestingpointExample example) {

        return windsubstationtestingpoint2Mapper.updateByExampleSelective(record, example);
    }


    @Override
    public int updateByExample(Windsubstationtestingpoint record, WindsubstationtestingpointExample example) {

        return windsubstationtestingpoint2Mapper.updateByExample(record, example);
    }

    @Override
    public List<Windsubstationtestingpoint> selectByExample(WindsubstationtestingpointExample example) {

        return windsubstationtestingpoint2Mapper.selectByExample(example);
    }


    @Override
    public long countByExample(WindsubstationtestingpointExample example) {

        return windsubstationtestingpoint2Mapper.countByExample(example);
    }


    @Override
    public int deleteByExample(WindsubstationtestingpointExample example) {

        return windsubstationtestingpoint2Mapper.deleteByExample(example);
    }



    public int deleteAll() {


        int result= windsubstationtestingpoint2Mapper.deleteAll();


        return result;

    }

    public int insertBatch(List<Windsubstationtestingpoint> ls) {


        int result= windsubstationtestingpoint2Mapper.insertBatch(ls);


        return result;

    }


}
