package com.njcn.energy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.energy.mapper.EleDoMapper;
import com.njcn.energy.pojo.po.EleDo;
import com.njcn.energy.pojo.po.EleEpdPqd;
import com.njcn.energy.service.IEleDoService;
import org.springframework.stereotype.Service;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/3/15 19:29
 */
@Service
public class EleDoServiceImpl extends ServiceImpl<EleDoMapper, EleDo> implements IEleDoService {
    @Override
    public boolean addDo(EleDo eleDo) {
        return this.save(eleDo);
    }

    @Override
    public boolean updateDo(EleDo eleDo) {
        return this.updateById(eleDo);
    }

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