package com.gyee.frame.service.impl.ticket;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gyee.frame.model.ticket.Woearthline;
import com.gyee.frame.mapper.ticket.WoearthlineMapper;
import com.gyee.frame.service.ticket.WoearthlineService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author chenmh
 * @since 2020-06-08
 */
@Service
public class WoearthlineServiceImpl extends ServiceImpl<WoearthlineMapper, Woearthline> implements WoearthlineService {

    @Override
    public int selectMaxId() {
        return baseMapper.selectMaxId();
    }

    @Override
    public List<Woearthline> getListSafeMeasure(String woNum) {
        QueryWrapper<Woearthline> wrapper = new QueryWrapper<>();
        wrapper.eq("WONUM", woNum);

        List<Woearthline> woearthlines = baseMapper.selectList(wrapper);

        return woearthlines;
    }

    @Override
    public Integer deleteSafeMeasure(List<Double> list) {
        int result = baseMapper.deleteBatchIds(list);
        return result;
    }

}
