Exemplo n.º 1
0
        private Domain.Family.Family GetOrCreateFamily()
        {
            DisableFamilyDataFilter();

            if (!AbpSession.UserId.HasValue)
            {
                throw new UserFriendlyException("未登录,不能获取菜单计划!");
            }
            long userId = AbpSession.UserId.Value;

            Domain.Family.Family family = _familyResponsitory.GetByUser(userId);
            if (family == null)
            {
                throw new UserFriendlyException("请使用手机用户登陆!");
            }

            EnableFamilyDataFilter();

            return(family);
        }