|  |  | 
 |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
 |  |  | import com.baomidou.mybatisplus.service.impl.ServiceImpl; | 
 |  |  | import com.core.exception.CoolException; | 
 |  |  | import com.zy.crm.manager.entity.Node; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  | import com.zy.crm.system.entity.Dept; | 
 |  |  | import com.zy.crm.system.mapper.DeptMapper; | 
 |  |  | import com.zy.crm.system.service.DeptService; | 
 |  |  | import com.zy.crm.system.service.UserService; | 
 |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
 |  |  | import org.springframework.stereotype.Service; | 
 |  |  |  | 
 |  |  | import java.util.Date; | 
 |  |  |  | 
 |  |  | 
 |  |  |     private UserService userService; | 
 |  |  |  | 
 |  |  |     @Override | 
 |  |  |     public Dept getTop() { | 
 |  |  |     public Dept getTop(Long hostId) { | 
 |  |  |         Dept top = this.selectOne(new EntityWrapper<Dept>().eq("level", 0)); | 
 |  |  |         if (top == null) { | 
 |  |  |             top = new Dept(); | 
 |  |  |             top.setHostId(hostId); | 
 |  |  |             top.setName("全部"); | 
 |  |  |             top.setUuid("全部"); | 
 |  |  |             top.setLevel(0); |