package com.zy.sc.system.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.core.common.Cools; import org.springframework.stereotype.Service; import com.zy.sc.system.entity.Host; import com.zy.sc.system.mapper.HostMapper; import com.zy.sc.system.service.HostService; @Service("hostService") public class HostServiceImpl extends ServiceImpl implements HostService { @Override public Host selectByName(String name) { if (Cools.isEmpty(name)) { return null; } return this.selectOne(new EntityWrapper().eq("name", name)); } }