package com.njcn.energy.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.energy.mapper.EleCtrlMapper;
import com.njcn.energy.pojo.po.EleCtrl;
import com.njcn.energy.pojo.po.EleEpdPqd;
import com.njcn.energy.service.IEleCtrlService;
import org.springframework.stereotype.Service;

/**
 * 类的介绍：
 *
 * @author xuyang
 * @version 1.0.0
 * @createTime 2022/3/15 20:02
 */
@Service
public class EleCtrlServiceImpl extends ServiceImpl<EleCtrlMapper, EleCtrl> implements IEleCtrlService {
    @Override
    public boolean addCtrl(EleCtrl eleCtrl) {
        return this.save(eleCtrl);
    }

    @Override
    public boolean updateCtrl(EleCtrl eleCtrl) {
        return this.updateById(eleCtrl);
    }

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