package com.youchain.utils; import cn.hutool.json.JSONUtil; import com.youchain.modules.system.domain.Dept; import lombok.extern.slf4j.Slf4j; import java.util.List; @Slf4j public class UserUtils { public static Dept getDept(){ List dataScopes = SecurityUtils.getCurrentUserDataScope(); Dept dept=new Dept(); if(dataScopes.size()>0){ dept.setId(dataScopes.get(0)); }else{ dept.setId(0L); } return dept; } }