Giter Club home page Giter Club logo

openreservation / reservationserver Goto Github PK

View Code? Open in Web Editor NEW
224.0 224.0 86.0 31.73 MB

预约系统 ReservationSystem powered by asp.net core

Home Page: https://reservation.weihanli.xyz

License: MIT License

C# 18.11% CSS 2.07% JavaScript 68.37% HTML 10.94% Dockerfile 0.06% TypeScript 0.31% Mustache 0.13%
asp-net-core aspnet-core aspnet-mvc aspnetcore booking booking-system docker helm identityserver4 kubernetes open-reservation reservation reservation-system

reservationserver's People

Contributors

azure-pipelines[bot] avatar dependabot[bot] avatar weihanli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reservationserver's Issues

1.1.0 Roadmap

  • Built-In IoC
  • Built-In AOP
  • Built-In Dapper
  • Built-In Repository
  • Built-In Logging
  • Built-In TOTP implement
  • Built-In EventBus
  • Built-In Cron
  • Built-In PipelineBuilder
  • And More ...

通用预约流程

更通用的预约流程,需求收集

  • 预约频次限制,每个预约项目配置每个人每天/每周/每月最多可以预约次数
  • 预约时间段允许多次预约,当前每个预约时间段只能被预约一次,有些情况允许同一个时间段多次预约,比如驾校预约,同一时间段允许多人同时预约,也需要限制,需要根据每个预约项目进行配置
  • 预约通知(站内通知/邮件通知/短信通知/小程序消息通知 ...
  • 候补预约( 12306 候补 ...

reservation-server pod CrashLoopBackOff

reservation-server pod启动不了,使用openreservation/reservation-server:dev 镜像,用 kubectl logs 查看报错提示

Unhandled exception. System.TypeLoadException: Method 'Create' in type 'Pomelo.EntityFrameworkCore.MySql.Query.ExpressionVisitors.Internal.MySqlSqlTranslatingExpressionVisitorFactory' from assembly 'Pomelo.EntityFrameworkCore.MySql, Version=3.1.1.0, Culture=neutral, PublicKeyToken=2cc498582444921b' does not have an implementation.

Update support for MySql database

Currently, the project had upgraded to .NET5, but the MySql database provider is still .NET Core 3.1 provider.
Since the MySQL database provider for efcore 5.0 is still in preview, use preview version for now

Docker can't run up

git clone 项目,然后在项目根目录下sudo docker build -t booking:1 . ,完成之后,

~/github/ActivityReservation$ sudo docker run -p 80:80 booking:1
Unhandled exception. System.Threading.Tasks.TaskCanceledException: The operation was canceled.
at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken)
at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at Microsoft.Rest.RetryDelegatingHandler.<>c__DisplayClass11_0.<b__1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Rest.RetryDelegatingHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
at System.Net.Http.HttpClient.FinishSendAsyncBuffered(Task1 sendTask, HttpRequestMessage request, CancellationTokenSource cts, Boolean disposeCts) at Microsoft.Azure.KeyVault.KeyVaultClient.GetSecretWithHttpMessagesAsync(String vaultBaseUrl, String secretName, String secretVersion, Dictionary2 customHeaders, CancellationToken cancellationToken)
at Microsoft.Azure.KeyVault.KeyVaultClientExtensions.GetSecretAsync(IKeyVaultClient operations, String secretIdentifier, CancellationToken cancellationToken)
at Microsoft.Extensions.Configuration.AzureKeyVault.AzureKeyVaultConfigurationProvider.LoadAsync()
at Microsoft.Extensions.Configuration.AzureKeyVault.AzureKeyVaultConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at ActivityReservation.Program.Main(String[] args) in /src/ActivityReservation/ActivityReservation/Program.cs:line 11

预约项目管理优化

现在每创建一个预约项目都需要配置一个预约的时间段,对于大部分预约时间段都一样的预约项目来说,如果我们能够支持一个默认的预约时间段配置的话就会很方便,就不必一个一个配置了,会高效很多

  • 添加一个 Duplicate 的功能用来创建一个除了名称其他配置都一样的预约项目以高效的创建项目
  • 配置默认的预约时间段(预约时间段模板管理??),在创建预约项目的时候可以选择要使用的预约时间段配置(有点增加复杂度了,暂时不考虑实现)

简化部署

现在演示项目部署需要的环境有点多,不能直接拿来用,需要精简一下,增加一个分支维护一个简化的版本

单机简易版环境:

  • 只依赖数据库 SqlLite

多机可分布式部署版环境:

  • 数据库默认使用 MySql(或sql server)
  • redis
  • azure key valut(后面自己实现一个基于数据库的配置中心项目,存数据库,移除这个依赖项)

angular client

新的活动室预约客户端, 使用 angular + material 构建,试用地址 https://reservation-preview.weihanli.xyz/

有几个问题待处理待优化

  • 预约成功后弹出提示并跳转到预约列表
  • 页面加载增加 loading
  • 预约列表优化展示
  • 预约增加验证码
  • 侧边栏导航优化

Could UI rearrange like this?

你好,建议web界面可以仿照下面的抓图,进行预订或者浏览预订的状态,感觉比较直观和友好。

image

兄弟您好,我是找您帮忙的那个朋友

我现在发现几个的bug
1 禁用时间段存在比较严重的bug,第一,设置禁用时间段之后,发现后面的可选日期都被禁用,而前面的可选日期不被禁用,例如禁用日期设置为2017.12.15-2017.12.17,测试发现15号和16号均可以预约,而17号之后,包括18号19号都无法预约
2 禁用时间段无法删除
3 公告系统我在我这边怎么也无法保存,保存之后打开页面提示404错误,你的demo似乎是好的,不知道这是什么问题

单机版Docker部署失败

docker拉下来
docker pull weihanli/activityreservation
运行
docker run -d -p 8900:80 --name=reservation weihanli/activityreservation

为什么镜像没生效,镜像自己就停了呢

System.InvalidOperationException: The LINQ expression 'DbSet<ReservationPlace>

https://sentry.io/organizations/weihanli/issues/1449528537/?referrer=github_plugin

System.InvalidOperationException: The LINQ expression 'DbSet<ReservationPlace>
    .Where(r => !(r.IsDel))
    .Any(r => r.PlaceName.ToUpperInvariant().Equals(__ToUpperInvariant_0) && r.IsDel == False)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.
  Module "WeihanLi.EntityFramework.EFRepository`2", in Exist
    Boolean Exist(System.Linq.Expressions.Expression`1[System.Func`2[TEntity,System.Boolean]])
  File "/src/ActivityReservation/ActivityReservation.AdminLogic/Controllers/ReservationPlaceController.cs", line 103, in AddPlace
    Microsoft.AspNetCore.Mvc.ActionResult AddPlace(System.String)
  Module "(unknown)", in lambda_method
    System.Object lambda_method(System.Runtime.CompilerServices.Closure, System.Object, System.Object[])
  File "/src/ActivityReservation/ActivityReservation.Helper/Extensions/PerformanceLogExtension.cs", line 23, in MoveNext
    Void MoveNext()
  File "/src/ActivityReservation/ActivityReservation.Helper/Extensions/RequestLogExtension.cs", line 30, in MoveNext
    Void MoveNext()
...
(57 additional frame(s) were not displayed)

The LINQ expression 'DbSet<ReservationPlace>
    .Where(r => !(r.IsDel))
    .Any(r => r.PlaceName.ToUpperInvariant().Equals(__ToUpperInvariant_0) && r.IsDel == False)' could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation explicitly by inserting a call to either AsEnumerable(), AsAsyncEnumerable(), ToList(), or ToListAsync(). See https://go.microsoft.com/fwlink/?linkid=2101038 for more information.

代码重构

  • SentryProvider for Microsoft.Extensions.Logging
  • GeetestValidation refact
  • GoogleRecaptchaHelper

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.