package com.yuchen.saas.park.service.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yuchen.saas.park.api.entity.park.PmgBatWarningLevel;
import com.yuchen.saas.park.service.service.IWarningLevelService;
import com.yuchen.saas.park.service.mapper.WarningLevelMapper;
import org.nest.springwrap.core.mp.base.BaseServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class WarningLevelServiceImpl extends BaseServiceImpl<WarningLevelMapper, PmgBatWarningLevel> implements IWarningLevelService {
    @Override
    public List<PmgBatWarningLevel> getAllLevel() {
        return baseMapper.getAllLevel();
    }

    @Override
    public List<PmgBatWarningLevel> getLevelByParkId(Long parkId) {
        LambdaQueryWrapper<PmgBatWarningLevel> queryWrapper=new LambdaQueryWrapper<>();
        queryWrapper.eq(PmgBatWarningLevel::getParkId,parkId);
        return baseMapper.selectList(queryWrapper);
    }
}
