package com.lantone.daqe.facade.base;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lantone.daqe.entity.RegularInfo;
import com.lantone.daqe.service.impl.RegularInfoServiceImpl;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 表名：dc_regular_info 业务类
 * </p>
 */
@Component
public class RegularInfoFacade extends RegularInfoServiceImpl {
    public boolean isExist(RegularInfo regularInfo) {
        boolean flag = false;
        RegularInfo regular = this.getOne(new QueryWrapper<RegularInfo>()
                .eq("name", regularInfo.getName()));
        if (regular != null) {
            flag = true;
        }
        return flag;
    }

}