package com.yeejoin.equipmanage.service.impl;

import com.yeejoin.equipmanage.service.ISystemDicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yeejoin.equipmanage.common.entity.ManufacturerInfo;
import com.yeejoin.equipmanage.mapper.ManufacturerInfoMapper;
import com.yeejoin.equipmanage.service.IManufacturerInfoService;

/**
 *  服务实现类
 *
 * @author wujiang
 * @date 2020-07-07
 */
@Service
public class ManufacturerInfoServiceImpl extends ServiceImpl<ManufacturerInfoMapper, ManufacturerInfo> implements IManufacturerInfoService {

    @Autowired
    ManufacturerInfoMapper manufacturerInfoMapper;


    @Override
    public int finduseManufacturer(Long id) {
        return manufacturerInfoMapper.finduseManufacturer(id);
    }

    @Override
    public String checkName(String name, Long id) {
        int i = manufacturerInfoMapper.checkName(name,id);
        if (i==0){
            return "";
        }else {
            return "企业名称重复";
        }
    }
}
