Coder Social home page Coder Social logo

easyoc / easyoc Goto Github PK

View Code? Open in Web Editor NEW
42.0 6.0 9.0 31.04 MB

EasyOC 是一个基于OrchardCore 的低代码SPA 服务端开发框架 ,前端项目 https://github.com/EasyOC/easyoc-amis-admin

License: Apache License 2.0

JavaScript 11.96% PowerShell 0.01% C# 4.40% HTML 11.39% CSS 72.13% SCSS 0.06% Liquid 0.03% TypeScript 0.03%
orchardcore lowcode lucene graphql

easyoc's Issues

Script Query 的使用: params 必须是 parameters

shellDb.GetRows('Select * from Document where id=@id',params), 注意遵循不同数据库的语法规范

parameters 要用IDictionary<string, object> 格式的json
`{

    "Id": 1,
    "Name": "John Doe",
    "IsVerified": true,
    "Roles": [
        "Admin",
        "User"
    ],
    "Profile": {
        "Age": 30,
        "Country": "USA"
    }

}`

要将 params 修改为: parameters 。 后台代码已经定死了
image

如果升级到.net core8 会出现 FreeSql.DatabaseModel.DbColumnInfo 报错。暂时没找到哪个dll的问题

image
`An unhandled exception occurred while processing the request.
VerificationException: Method System.Linq.Enumerable.MaxInteger: type argument 'FreeSql.DatabaseModel.DbColumnInfo' violates the constraint of type parameter 'T'.
System.RuntimeMethodHandle.GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[] methodInstantiation)

ArgumentException: GenericArguments[0], 'FreeSql.DatabaseModel.DbColumnInfo', on 'System.Nullable1[T] MaxInteger[T](System.Collections.Generic.IEnumerable1[System.Nullable`1[T]])' violates the constraint of type 'T'.
System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e)

Stack Query Cookies Headers Routing
VerificationException: Method System.Linq.Enumerable.MaxInteger: type argument 'FreeSql.DatabaseModel.DbColumnInfo' violates the constraint of type parameter 'T'.
System.RuntimeMethodHandle.GetStubIfNeeded(RuntimeMethodHandleInternal method, RuntimeType declaringType, RuntimeType[] methodInstantiation)
System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation)

Show raw exception details
ArgumentException: GenericArguments[0], 'FreeSql.DatabaseModel.DbColumnInfo', on 'System.Nullable1[T] MaxInteger[T](System.Collections.Generic.IEnumerable1[System.Nullable1[T]])' violates the constraint of type 'T'. System.RuntimeType.ValidateGenericArguments(MemberInfo definition, RuntimeType[] genericArguments, Exception e) System.Reflection.RuntimeMethodInfo.MakeGenericMethod(Type[] methodInstantiation) AutoMapper.Internal.TypeDetails+<>c__DisplayClass25_1.<GetPublicNoArgExtensionMethods>b__10(MethodInfo extensionMethod) System.Linq.Enumerable+WhereSelectArrayIterator<TSource, TResult>.MoveNext() System.Linq.Enumerable+ConcatIterator<TSource>.MoveNext() System.Linq.Enumerable.SelectManyIterator<TSource, TCollection, TResult>(IEnumerable<TSource> source, Func<TSource, IEnumerable<TCollection>> collectionSelector, Func<TSource, TCollection, TResult> resultSelector)+MoveNext() System.Linq.Enumerable+WhereSelectEnumerableIterator<TSource, TResult>.MoveNext() System.Linq.Enumerable+UnionIterator<TSource>.GetNext() System.Linq.Enumerable+UnionIterator<TSource>.MoveNext() System.Linq.Enumerable+ConcatIterator<TSource>.MoveNext() AutoMapper.Internal.TypeDetails.PossibleNames() AutoMapper.Internal.TypeDetails.GetMember(string name) AutoMapper.Configuration.Conventions.DefaultName.GetMatchingMemberInfo(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch) AutoMapper.Configuration.Conventions.ParentSourceToDestinationNameMapper.GetMatchingMemberInfo(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch) AutoMapper.Configuration.Conventions.DefaultMember.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, IMemberConfiguration parent, bool isReverseMap) AutoMapper.Configuration.Conventions.MemberConfiguration.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, bool isReverseMap) AutoMapper.Configuration.Conventions.NameSplitMember.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, IMemberConfiguration parent, bool isReverseMap) AutoMapper.Configuration.Conventions.MemberConfiguration.MapDestinationPropertyToSource(ProfileMap options, TypeDetails sourceType, Type destType, Type destMemberType, string nameToSearch, List<MemberInfo> resolvers, bool isReverseMap) AutoMapper.ProfileMap.MapDestinationPropertyToSource(TypeDetails sourceTypeDetails, Type destType, Type destMemberType, string destMemberName, List<MemberInfo> members, bool reverseNamingConventions) AutoMapper.TypeMap..ctor(Type sourceType, Type destinationType, ProfileMap profile, bool isReverseMap) AutoMapper.ProfileMap.BuildTypeMap(IGlobalConfiguration configurationProvider, ITypeMapConfiguration config) AutoMapper.ProfileMap.Register(IGlobalConfiguration configurationProvider) AutoMapper.MapperConfiguration.Seal() AutoMapper.MapperConfiguration..ctor(MapperConfigurationExpression configurationExpression) Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions+<>c.<AddAutoMapperClasses>b__12_2(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions+<>c.<AddAutoMapperClasses>b__12_3(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitDisposeCache(ServiceCallSite transientCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.OrchardCoreBuilderExtensions+<>c.<AddDataAccess>b__0_1(IServiceProvider sp) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor<TArgument, TResult>.VisitCallSite(ServiceCallSite callSite, TArgument argument) Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(ServiceIdentifier serviceIdentifier) System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue>.GetOrAdd(TKey key, Func<TKey, TValue> valueFactory) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(ServiceIdentifier serviceIdentifier, ServiceProviderEngineScope serviceProviderEngineScope) Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType) Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService<T>(IServiceProvider provider) Microsoft.Extensions.DependencyInjection.OrchardCoreBuilderExtensions+<>c+<<AddDataAccess>b__0_2>d.MoveNext() OrchardCore.Environment.Shell.Builders.ShellContextFactory.CreateDescribedContextAsync(ShellSettings settings, ShellDescriptor shellDescriptor) OrchardCore.Environment.Shell.Builders.ShellContextFactory.OrchardCore.Environment.Shell.Builders.IShellContextFactory.CreateShellContextAsync(ShellSettings settings) OrchardCore.Environment.Shell.ShellHost.GetOrCreateShellContextAsync(ShellSettings settings) OrchardCore.Environment.Shell.ShellHost.GetScopeAsync(ShellSettings settings) OrchardCore.Modules.ModularTenantContainerMiddleware.Invoke(HttpContext httpContext) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)

调回net6 就没有问题

项目启动会报错,NatashaInitiizer .preheating() 执行错误

这个没跟踪到是什么原因。 应该不是版本问题吧。
program-main 执行错误。
image

发生异常: CLR/NatashaException
“NatashaException”类型的异常在 EasyOC.CMS.WebHost.dll 中发生,但未在用户代码中进行处理: '应输入标识符'
在 AssemblyCSharpBuilder.Add(String script)
在 NatashaInitializer.Preheating(Func`3 excludeReferencesFunc)
在 EasyOC.CMS.WebHost.Program.<>c.

b__0_0() 在 e:\2024\EasyOC\EasyOC-github\EasyOC\src\EasyOC.CMS.WebHost\Program.cs 中: 第 20 行
在 System.Threading.Tasks.Task.InnerInvoke()
在 System.Threading.Tasks.Task.<>c.<.cctor>b__272_0(Object obj)
在 System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)

Error on setup screen

Hello when I try to run the setup screen and use the EasyOC init recipe after pressing Setup I get the following error :

An unhandled exception has occurred while executing the request. OpenIddict.Abstractions.OpenIddictExceptions+ValidationException: One or more validation error(s) occurred while trying to create a new application:

The client secret cannot be null or empty for a confidential application.

Integration Features

Can you import content into orchard from excel files for a specific content type?

Approaches for Orchard Core and SPA Framework ?

Im following this interesting project.
What is your experience with oc and this spa approach ?
Is it working out well ?
Im thinking of trying something similar using htmx with orchard core to acheive spa like functionality.

RDBMS的js方法, 默认返回的表是空的。

原因是: 默认过滤filterText 跟connectionConfigIdid一样。
造成 查询id ,且过滤掉 id 等于filtertext的内容
预期目标是 filterText 应该是空。
实际是跟id一致。
后台代码-对应filtertext 应该是要数据库scheme.table 而不是id:
` public async Task<IEnumerable> GetAllTablesAsync(QueryTablesDto queryTablesDto)
{
if (HttpContextAccessor.HttpContext.User.Identity.IsAuthenticated)
{
Console.WriteLine();
}
List result = await GetTablesFromCache(queryTablesDto.ConnectionConfigId, queryTablesDto.DisableCache);

        if (!string.IsNullOrEmpty(queryTablesDto.FilterText))
        {
            queryTablesDto.FilterText = queryTablesDto.FilterText.ToLower().Replace("[", string.Empty).Replace("]", string.Empty);
        }

        var tables = result
            .WhereIf(!string.IsNullOrEmpty(queryTablesDto.FilterText),
            x => $"{x.Schema}.{x.Name}".ToLower().Contains(queryTablesDto.FilterText))
            .OrderBy(x => x.Schema).ThenBy(x => x.Name)
            .Take(queryTablesDto.MaxResultCount)
            .Select(x => {
                var mResult = new DbTableInfoDto()
                {
                    ColumnsCount = x.Columns.Count
                };
                x.Columns.Clear();
                mResult = _mapper.Map(x, mResult);
                return mResult;
            }
            );

        return tables;
    }`

image

graphql 更新内容mutation Api

目前的内容更新方式是在前端将 ContentItem.CotentTypePart.Field.Text 这样的深度路径直接展开成直属字段
在更新内容时再根据类型定义将单级属性对象转换为ContentItem

比如 :

{
    "Customer": {
        "CustName": {
            "Text": "Google"
        }
    }
}

展开为 :

{   "CustName":"Google" }

以上的操作如果对于简单类型的直接属性看起来没什么问题,但对于复杂一些的类型定义比如

{
    "Customer": {
        "CustName": {
            "Text": "Google"
        },
        "Field1": {
            "Text": "Value1"
        }
    },
    "Part1": {
        "Field1": {
            "Text": "Value2"
        }
    }
}

此时将会转换为

{
    "CustName": "Google",
    "Field1": "Value1",
    "Field1": "Value2"
}

会产生两个重复的Field1,
所以此时需要新建一个Api

{
    "CustName": "Google",
    "Field1": "Value1",
    "Part1": {
        "Field1": "Value2"
    }
}

理想的方式是实现Graphql 的 mutation api ,它可以避免传输一些非必要的字段,减少网络开销
https://graphql.org/learn/queries/

Does freesql help in doing json queries in orchards db?

Since orchards records are stored in the documents table in json format does freesql help in writing queries in json and return objects ?
Ive seen freesql has some json extensions but cant find examples on how to use them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.