Commit ce777592 authored by 赵啸非's avatar 赵啸非

添加根据部门id 查询所属大厅

parent a9335fe4
......@@ -26,6 +26,9 @@ import com.mortals.framework.springcloud.service.IApplicationStartedService;
import org.springframework.util.ObjectUtils;
import java.util.List;
import static com.mortals.xhx.common.key.Constant.USER_SITE_TREE;
@Component
@Slf4j
public class DemoStartedService implements IApplicationStartedService {
......@@ -35,10 +38,15 @@ public class DemoStartedService implements IApplicationStartedService {
private IUserFeign userFeign;
@Autowired
private UserService userService;
@Autowired
private ICacheService cacheService;
@Override
public void start() {
logger.info("开始服务..[初始化用户站点树]");
//删除redis 中的 站点树
cacheService.hdel(USER_SITE_TREE);
UserEntity userEntity = new UserEntity();
userEntity.initAttrValue();
userEntity.setId(0L);
......
......@@ -230,7 +230,7 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
}
//如果是管理员 默认全部站点
if (context.getUser().isAdmin() || context.getUser().getId() == 0L) {
log.info("user is admin !");
log.info("user is admin ! id:{}",context.getUser().getId());
siteList = this.find(new SiteQuery());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment