package com.njcn.energy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.energy.mapper.EleStsMapper;
import com.njcn.energy.pojo.po.EleEpdPqd;
import com.njcn.energy.pojo.po.EleSts;
import com.njcn.energy.service.IEleStsService;
import org.springframework.stereotype.Service;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/3/15 19:06
 */
@Service
public class EleStsServiceImpl extends ServiceImpl<EleStsMapper, EleSts> implements IEleStsService {
    @Override
    public boolean addSts(EleSts eleSts) {
        return this.save(eleSts);
    }

    @Override
    public boolean updateSts(EleSts eleSts) {
        return this.updateById(eleSts);
    }

    @Override
    public EleSts findByName(String name) {
            return this.lambdaQuery().eq(EleSts::getName,name).one();
    }
}
