Browse Source

fix: 修改框架

master
fajiao 2 years ago
parent
commit
17782ad612
  1. 4
      Cis.Application/Cis.Application.csproj
  2. 252
      Cis.Application/Cis.Application.xml
  3. 14
      Cis.Application/GlobalUsings.cs
  4. 31
      Cis.Application/applicationsettings.json
  5. 12
      Cis.Core/Cis.Core.csproj
  6. 475
      Cis.Core/Cis.Core.xml
  7. 22
      Cis.Core/DbContext.cs
  8. 20
      Cis.Web.Core/Cis.Web.Core.xml
  9. 49
      Cis.Web.Core/Startup.cs
  10. 4
      Cis.Web.Entry/Cis.Web.Entry.csproj
  11. 10
      Cis.Web.Entry/Controllers/HomeController.cs
  12. 8
      Cis.Web.Entry/Views/Home/Index.cshtml
  13. 2
      Cis.Web.Entry/Views/Shared/_Layout.cshtml
  14. 9
      Cis.Web.Entry/appsettings.json
  15. BIN
      Cis.Web.Entry/wwwroot/images/logo.png

4
Cis.Application/Cis.Application.csproj

@ -8,12 +8,12 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="applicationsettings.json" /> <None Remove="AppConfig.json" />
<None Remove="Cis.Application.xml" /> <None Remove="Cis.Application.xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="applicationsettings.json"> <Content Include="AppConfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>

252
Cis.Application/Cis.Application.xml

@ -4,16 +4,258 @@
<name>Cis.Application</name> <name>Cis.Application</name>
</assembly> </assembly>
<members> <members>
<member name="T:Cis.Application.SystemAppService"> <member name="T:Cis.Application.Cb.CbInfo">
<summary> <summary>
系统服务接口 Cb -> Camera base
</summary> </summary>
</member> </member>
<member name="M:Cis.Application.SystemAppService.GetDescription"> <member name="F:Cis.Application.Cb.CbInfo.GroupName">
<summary> <summary>
获取系统描述 Api 分组名
</summary>
</member>
<member name="F:Cis.Application.Cb.CbInfo.GroupOrder">
<summary>
Api 分组排序
</summary>
</member>
<member name="F:Cis.Application.Cb.CbInfo.DbName">
<summary>
数据库名
</summary>
</member>
<member name="F:Cis.Application.Cb.CbInfo.CbCameraTbName">
<summary>
CbCamera 表名
</summary>
</member>
<member name="F:Cis.Application.Cb.CbInfo.CbCameraTbDesc">
<summary>
CbCamera 表描述
</summary>
</member>
<member name="T:Cis.Application.Cb.CbCamera">
<summary>
系统字典类型表
</summary>
</member>
<member name="P:Cis.Application.Cb.CbCamera.Name">
<summary>
名称
</summary>
</member>
<member name="P:Cis.Application.Cb.CbCamera.Ip">
<summary>
ip 地址
</summary>
</member>
<member name="P:Cis.Application.Cb.CbCamera.Port">
<summary>
端口
</summary>
</member>
<member name="P:Cis.Application.Cb.CbCamera.UserName">
<summary>
账号
</summary>
</member>
<member name="P:Cis.Application.Cb.CbCamera.Password">
<summary>
密码
</summary>
</member>
<member name="T:Cis.Application.Cb.CbCameraService">
<summary>
相机服务
</summary>
</member>
<member name="T:Cis.Application.Cm.CmInfo">
<summary>
Cm -> Camera mark
</summary>
</member>
<member name="F:Cis.Application.Cm.CmInfo.GroupName">
<summary>
Api 分组名
</summary>
</member>
<member name="F:Cis.Application.Cm.CmInfo.GroupOrder">
<summary>
Api 分组排序
</summary>
</member>
<member name="F:Cis.Application.Cm.CmInfo.DbName">
<summary>
数据库名
</summary>
</member>
<member name="F:Cis.Application.Cm.CmInfo.CmMarkGroupTbName">
<summary>
CmMarkGroup 表名
</summary>
</member>
<member name="F:Cis.Application.Cm.CmInfo.CmMarkGroupTbDesc">
<summary>
CmMarkGroup 表描述
</summary>
</member>
<member name="T:Cis.Application.Cm.CmMarkGroup">
<summary>
标记分组表
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkGroup.Name">
<summary>
名称
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkGroup.Order">
<summary>
排序
</summary>
</member>
<member name="P:Cis.Application.Cm.CmMarkGroup.Remark">
<summary>
备注
</summary>
</member>
<member name="T:Cis.Application.Cm.CmMarkGroupService">
<summary>
标记分组服务
</summary>
</member>
<member name="M:Cis.Application.Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
配置应用所需服务,在该方法中可以添加应用所需要的功能或服务
</summary>
<param name="services"></param>
</member>
<member name="M:Cis.Application.Startup.Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
<summary>
配置应用请求处理管道
</summary>
<param name="app"></param>
<param name="env"></param>
</member>
<member name="T:Cis.Application.Sys.SysInfo">
<summary>
Sys -> System
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.GroupName">
<summary>
Api 分组名
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.GroupOrder">
<summary>
Api 分组排序
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.DbName">
<summary>
数据库名
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.SysDictTypeTbName">
<summary>
SysDictType 表名
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.SysDictTypeTbDesc">
<summary>
SysDictType 表描述
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.SysDictDataTbName">
<summary>
SysDataType 表名
</summary>
</member>
<member name="F:Cis.Application.Sys.SysInfo.SysDictDataTbDesc">
<summary>
SysDataType 表描述
</summary>
</member>
<member name="T:Cis.Application.Sys.SysDictData">
<summary>
系统字典值表
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.DictTypeId">
<summary>
字典类型Id
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.DictType">
<summary>
字典类型
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.Value">
<summary>
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.Code">
<summary>
编码
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.Order">
<summary>
排序
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictData.Status">
<summary>
状态
</summary>
</member>
<member name="T:Cis.Application.Sys.SysDictType">
<summary>
系统字典类型表
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictType.Name">
<summary>
名称
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictType.Code">
<summary>
编码
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictType.Order">
<summary>
排序
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictType.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Cis.Application.Sys.SysDictType.Status">
<summary>
状态
</summary>
</member>
<member name="T:Cis.Application.Sys.SysDictDataService">
<summary>
系统字典值服务
</summary>
</member>
<member name="T:Cis.Application.Sys.SysDictTypeService">
<summary>
系统字典类型服务
</summary> </summary>
<returns></returns>
</member> </member>
</members> </members>
</doc> </doc>

14
Cis.Application/GlobalUsings.cs

@ -1,15 +1,7 @@
global using Furion; global using Cis.Core;
global using Furion.DataEncryption; global using Furion;
global using Furion.DataValidation;
global using Furion.DependencyInjection; global using Furion.DependencyInjection;
global using Furion.DynamicApiController; global using Furion.DynamicApiController;
global using Furion.Extensions;
global using Furion.FriendlyException;
global using Furion.Logging;
global using Mapster;
global using Microsoft.AspNetCore.Authorization;
global using Microsoft.AspNetCore.Http;
global using Microsoft.AspNetCore.Mvc; global using Microsoft.AspNetCore.Mvc;
global using Microsoft.CodeAnalysis;
global using System.ComponentModel.DataAnnotations;
global using SqlSugar; global using SqlSugar;
global using System.ComponentModel.DataAnnotations;

31
Cis.Application/applicationsettings.json

@ -1,31 +0,0 @@
{
"$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
"SpecificationDocumentSettings": {
"DocumentTitle": "Furion | 规范化接口",
"GroupOpenApiInfos": [
{
"Group": "Default",
"Title": "规范化接口演示",
"Description": "让 .NET 开发更简单,更通用,更流行。",
"Version": "1.0.0",
"TermsOfService": "https://furion.icu",
"Contact": {
"Name": "百小僧",
"Url": "https://gitee.com/monksoul",
"Email": "monksoul@outlook.com"
},
"License": {
"Name": "Apache-2.0",
"Url": "https://gitee.com/dotnetchina/Furion/blob/rc1/LICENSE"
}
}
]
},
"CorsAccessorSettings": {
"WithExposedHeaders": [
"access-token",
"x-access-token",
"environment"
]
}
}

12
Cis.Core/Cis.Core.csproj

@ -8,13 +8,25 @@
<ItemGroup> <ItemGroup>
<None Remove="Cis.Core.xml" /> <None Remove="Cis.Core.xml" />
<None Remove="CoreConfig.json" />
</ItemGroup>
<ItemGroup>
<Content Include="CoreConfig.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.4.9" /> <PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.4.9" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.4.9" /> <PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.4.9" />
<PackageReference Include="Furion.Pure" Version="4.4.9" /> <PackageReference Include="Furion.Pure" Version="4.4.9" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.9" />
<PackageReference Include="NewLife.Redis" Version="5.0.2022.901" />
<PackageReference Include="SqlSugarCore" Version="5.1.3.1" /> <PackageReference Include="SqlSugarCore" Version="5.1.3.1" />
<PackageReference Include="Yitter.IdGenerator" Version="1.0.14" />
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties /></VisualStudio></ProjectExtensions>
</Project> </Project>

475
Cis.Core/Cis.Core.xml

@ -4,14 +4,481 @@
<name>Cis.Core</name> <name>Cis.Core</name>
</assembly> </assembly>
<members> <members>
<member name="T:Cis.Core.DbContext"> <member name="T:Cis.Core.NotTableAttribute">
<summary> <summary>
数据库上下文对象 非实体表特性
</summary> </summary>
</member> </member>
<member name="F:Cis.Core.DbContext.Instance"> <member name="M:Cis.Core.CacheSetup.AddCache(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary> <summary>
SqlSugar 数据库实例 缓存注册(新生命Redis组件)
</summary>
<param name="services"></param>
</member>
<member name="T:Cis.Core.SqlSugarCache">
<summary>
SqlSugar二级缓存(必须是内存缓存)
</summary>
</member>
<member name="F:Cis.Core.SqlSugarConst.DefaultConfigId">
<summary>
默认数据库标识
</summary>
</member>
<member name="F:Cis.Core.SqlSugarConst.DefaultPrimaryKey">
<summary>
默认表主键
</summary>
</member>
<member name="T:Cis.Core.EntityBaseId">
<summary>
框架实体基类Id
</summary>
</member>
<member name="P:Cis.Core.EntityBaseId.Id">
<summary>
雪花Id
</summary>
</member>
<member name="T:Cis.Core.EntityBase">
<summary>
框架实体基类
</summary>
</member>
<member name="P:Cis.Core.EntityBase.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Cis.Core.EntityBase.UpdateTime">
<summary>
更新时间
</summary>
</member>
<member name="P:Cis.Core.EntityBase.CreateUserId">
<summary>
创建者Id
</summary>
</member>
<member name="P:Cis.Core.EntityBase.UpdateUserId">
<summary>
修改者Id
</summary>
</member>
<member name="P:Cis.Core.EntityBase.IsDelete">
<summary>
软删除
</summary>
</member>
<member name="T:Cis.Core.DataEntityBase">
<summary>
业务数据实体基类(数据权限)
</summary>
</member>
<member name="P:Cis.Core.DataEntityBase.CreateOrgId">
<summary>
创建者部门Id
</summary>
</member>
<member name="P:Cis.Core.Pagination.Index">
<summary>
当前页
</summary>
</member>
<member name="P:Cis.Core.Pagination.Size">
<summary>
页码容量
</summary>
</member>
<member name="P:Cis.Core.Pagination.Field">
<summary>
排序字段
</summary>
</member>
<member name="P:Cis.Core.Pagination.Order">
<summary>
排序方向
</summary>
</member>
<member name="P:Cis.Core.Pagination.Total">
<summary>
总记录数
</summary>
</member>
<member name="P:Cis.Core.Pagination.Number">
<summary>
页码数
</summary>
</member>
<member name="T:Cis.Core.CacheTypeEnum">
<summary>
缓存类型枚举
</summary>
</member>
<member name="F:Cis.Core.CacheTypeEnum.Memory">
<summary>
内存缓存
</summary>
</member>
<member name="F:Cis.Core.CacheTypeEnum.Redis">
<summary>
Redis缓存
</summary>
</member>
<member name="T:Cis.Core.StatusEnum">
<summary>
通用状态枚举
</summary>
</member>
<member name="F:Cis.Core.StatusEnum.Disable">
<summary>
停用
</summary>
</member>
<member name="F:Cis.Core.StatusEnum.Enable">
<summary>
启用
</summary>
</member>
<member name="T:Cis.Core.ObjectExtension">
<summary>
对象拓展
</summary>
</member>
<member name="M:Cis.Core.ObjectExtension.HasImplementedRawGeneric(System.Type,System.Type)">
<summary>
判断类型是否实现某个泛型
</summary>
<param name="type">类型</param>
<param name="generic">泛型类型</param>
<returns>bool</returns>
</member>
<member name="M:Cis.Core.ObjectExtension.ToQueryString(System.Collections.Generic.Dictionary{System.String,System.String},System.Boolean)">
<summary>
将字典转化为QueryString格式
</summary>
<param name="dict"></param>
<param name="urlEncode"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.UrlEncode(System.String)">
<summary>
将字符串URL编码
</summary>
<param name="str"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.ToDataTable``1(System.Collections.Generic.List{``0})">
<summary>
List转DataTable
</summary>
<typeparam name="T"></typeparam>
<param name="list"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.ToJson(System.Object)">
<summary>
对象序列化成Json字符串
</summary>
<param name="obj"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.ToObject``1(System.String)">
<summary>
Json字符串反序列化成对象
</summary>
<typeparam name="T"></typeparam>
<param name="json"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.ToJObject(System.String)">
<summary>
字串反序列化成linq对象
</summary>
<param name="Json">字串</param>
<returns></returns>
</member>
<member name="M:Cis.Core.ObjectExtension.IsIgnoreColumn(System.Reflection.PropertyInfo)">
<summary>
排除SqlSugar忽略的列
</summary>
<param name="pi"></param>
<returns></returns>
</member>
<member name="T:Cis.Core.CacheOptions">
<summary>
缓存配置选项
</summary>
</member>
<member name="P:Cis.Core.CacheOptions.CacheType">
<summary>
缓存类型
</summary>
</member>
<member name="P:Cis.Core.CacheOptions.RedisConnectionString">
<summary>
Redis连接字符串
</summary>
</member>
<member name="T:Cis.Core.DbConnectionOptions">
<summary>
数据库配置选项
</summary>
</member>
<member name="P:Cis.Core.DbConnectionOptions.ConnectionConfigs">
<summary>
数据库集合
</summary>
</member>
<member name="P:Cis.Core.DbConnectionConfig.EnableInitDb">
<summary>
启用库表初始化
</summary>
</member>
<member name="T:Cis.Core.SnowIdOptions">
<summary>
雪花Id配置选项
</summary>
</member>
<member name="P:Cis.Core.SnowIdOptions.WorkerId">
<summary>
机器码
</summary>
</member>
<member name="T:Cis.Core.IEntityFilter">
<summary>
自定义实体过滤器接口
</summary>
</member>
<member name="M:Cis.Core.IEntityFilter.AddEntityFilter">
<summary>
实体过滤器
</summary>
<returns></returns>
</member>
<member name="T:Cis.Core.ISqlSugarEntitySeedData`1">
<summary>
实体种子数据接口
</summary>
<typeparam name="TEntity"></typeparam>
</member>
<member name="M:Cis.Core.ISqlSugarEntitySeedData`1.HasData">
<summary>
种子数据
</summary>
<returns></returns>
</member>
<member name="T:Cis.Core.SqlSugarPagedList`1">
<summary>
分页泛型集合
</summary>
<typeparam name="TEntity"></typeparam>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.Page">
<summary>
页码
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.PageSize">
<summary>
页容量
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.Total">
<summary>
总条数
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.TotalPages">
<summary>
总页数
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.Items">
<summary>
当前页集合
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.HasPrevPage">
<summary>
是否有上一页
</summary>
</member>
<member name="P:Cis.Core.SqlSugarPagedList`1.HasNextPage">
<summary>
是否有下一页
</summary>
</member>
<member name="T:Cis.Core.SqlSugarPagedExtensions">
<summary>
分页拓展类
</summary>
</member>
<member name="M:Cis.Core.SqlSugarPagedExtensions.ToPagedList``1(SqlSugar.ISugarQueryable{``0},System.Int32,System.Int32)">
<summary>
分页拓展
</summary>
<param name="entity"></param>
<param name="pageIndex"></param>
<param name="pageSize"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.SqlSugarPagedExtensions.ToPagedListAsync``1(SqlSugar.ISugarQueryable{``0},System.Int32,System.Int32)">
<summary>
分页拓展
</summary>
<param name="entity"></param>
<param name="pageIndex"></param>
<param name="pageSize"></param>
<returns></returns>
</member>
<member name="T:Cis.Core.SqlSugarRepository`1">
<summary>
SqlSugar仓储类
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="M:Cis.Core.SqlSugarSetup.AddSqlSugar(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
Sqlsugar 上下文初始化
</summary>
<param name="services"></param>
</member>
<member name="M:Cis.Core.SqlSugarSetup.InitDataBase(SqlSugar.SqlSugarScope,Cis.Core.DbConnectionOptions)">
<summary>
初始化数据库结构
</summary>
</member>
<member name="T:Cis.Core.SqlSugarUnitOfWork">
<summary>
SqlSugar 事务和工作单元
</summary>
</member>
<member name="F:Cis.Core.SqlSugarUnitOfWork._sqlSugarClient">
<summary>
SqlSugar 对象
</summary>
</member>
<member name="M:Cis.Core.SqlSugarUnitOfWork.#ctor(SqlSugar.ISqlSugarClient)">
<summary>
构造函数
</summary>
<param name="sqlSugarClient"></param>
</member>
<member name="M:Cis.Core.SqlSugarUnitOfWork.BeginTransaction(Microsoft.AspNetCore.Mvc.Filters.FilterContext,Furion.DatabaseAccessor.UnitOfWorkAttribute)">
<summary>
开启工作单元处理
</summary>
<param name="context"></param>
<param name="unitOfWork"></param>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:Cis.Core.SqlSugarUnitOfWork.CommitTransaction(Microsoft.AspNetCore.Mvc.Filters.FilterContext,Furion.DatabaseAccessor.UnitOfWorkAttribute)">
<summary>
提交工作单元处理
</summary>
<param name="resultContext"></param>
<param name="unitOfWork"></param>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:Cis.Core.SqlSugarUnitOfWork.RollbackTransaction(Microsoft.AspNetCore.Mvc.Filters.FilterContext,Furion.DatabaseAccessor.UnitOfWorkAttribute)">
<summary>
回滚工作单元处理
</summary>
<param name="resultContext"></param>
<param name="unitOfWork"></param>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="M:Cis.Core.SqlSugarUnitOfWork.OnCompleted(Microsoft.AspNetCore.Mvc.Filters.FilterContext,Microsoft.AspNetCore.Mvc.Filters.FilterContext)">
<summary>
执行完毕(无论成功失败)
</summary>
<param name="context"></param>
<param name="resultContext"></param>
<exception cref="T:System.NotImplementedException"></exception>
</member>
<member name="T:Cis.Core.RespParamProvider">
<summary>
全局规范化结果
</summary>
</member>
<member name="M:Cis.Core.RespParamProvider.OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext,Furion.FriendlyException.ExceptionMetadata)">
<summary>
异常返回值
</summary>
<param name="context"></param>
<param name="metadata"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.RespParamProvider.OnSucceeded(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext,System.Object)">
<summary>
成功返回值
</summary>
<param name="context"></param>
<param name="data"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.RespParamProvider.OnValidateFailed(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext,Furion.DataValidation.ValidationMetadata)">
<summary>
验证失败返回值
</summary>
<param name="context"></param>
<param name="metadata"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.RespParamProvider.OnResponseStatusCodes(Microsoft.AspNetCore.Http.HttpContext,System.Int32,Furion.UnifyResult.UnifyResultSettingsOptions)">
<summary>
特定状态码返回值
</summary>
<param name="context"></param>
<param name="statusCode"></param>
<param name="unifyResultSettings"></param>
<returns></returns>
</member>
<member name="M:Cis.Core.RespParamProvider.RESTfulResult(System.Int32,System.Boolean,System.Object,System.Object)">
<summary>
返回 RESTful 风格结果集
</summary>
<param name="statusCode"></param>
<param name="succeeded"></param>
<param name="data"></param>
<param name="errors"></param>
<returns></returns>
</member>
<member name="T:Cis.Core.RespParam`1">
<summary>
全局返回结果
</summary>
<typeparam name="T"></typeparam>
</member>
<member name="P:Cis.Core.RespParam`1.Code">
<summary>
状态码
</summary>
</member>
<member name="P:Cis.Core.RespParam`1.Type">
<summary>
类型success、warning、error
</summary>
</member>
<member name="P:Cis.Core.RespParam`1.Message">
<summary>
错误信息
</summary>
</member>
<member name="P:Cis.Core.RespParam`1.Data">
<summary>
数据
</summary>
</member>
<member name="P:Cis.Core.RespParam`1.Extras">
<summary>
附加数据
</summary>
</member>
<member name="P:Cis.Core.RespParam`1.Timestamp">
<summary>
时间戳
</summary> </summary>
</member> </member>
</members> </members>

22
Cis.Core/DbContext.cs

@ -1,22 +0,0 @@
using Furion;
using SqlSugar;
using System.Collections.Generic;
namespace Cis.Core;
/// <summary>
/// 数据库上下文对象
/// </summary>
public static class DbContext
{
/// <summary>
/// SqlSugar 数据库实例
/// </summary>
public static readonly SqlSugarScope Instance = new(
// 读取 appsettings.json 中的 ConnectionConfigs 配置节点
App.GetConfig<List<ConnectionConfig>>("ConnectionConfigs")
, db =>
{
// 这里配置全局事件,比如拦截执行 SQL
});
}

20
Cis.Web.Core/Cis.Web.Core.xml

@ -4,5 +4,25 @@
<name>Cis.Web.Core</name> <name>Cis.Web.Core</name>
</assembly> </assembly>
<members> <members>
<member name="M:Cis.Web.Core.ProjectOptions.AddProjectOptions(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
注册项目配置选项
</summary>
<param name="services"></param>
<returns></returns>
</member>
<member name="M:Cis.Web.Core.Startup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)">
<summary>
配置应用所需服务,在该方法中可以添加应用所需要的功能或服务
</summary>
<param name="services"></param>
</member>
<member name="M:Cis.Web.Core.Startup.Configure(Microsoft.AspNetCore.Builder.IApplicationBuilder,Microsoft.AspNetCore.Hosting.IWebHostEnvironment)">
<summary>
配置应用请求处理管道
</summary>
<param name="app"></param>
<param name="env"></param>
</member>
</members> </members>
</doc> </doc>

49
Cis.Web.Core/Startup.cs

@ -1,34 +1,77 @@
using Furion; using Cis.Core;
using Furion;
using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Hosting;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using Yitter.IdGenerator;
namespace Cis.Web.Core; namespace Cis.Web.Core;
public class Startup : AppStartup public class Startup : AppStartup
{ {
/// <summary>
/// 配置应用所需服务,在该方法中可以添加应用所需要的功能或服务
/// </summary>
/// <param name="services"></param>
public void ConfigureServices(IServiceCollection services) public void ConfigureServices(IServiceCollection services)
{ {
// 配置选项
services.AddProjectOptions();
// 缓存注册
services.AddCache();
// SqlSugar
services.AddSqlSugar();
// JWT
services.AddJwt<JwtHandler>(); services.AddJwt<JwtHandler>();
// 允许跨域
services.AddCorsAccessor(); services.AddCorsAccessor();
// 远程请求
services.AddRemoteRequest();
// 任务调度
services.AddTaskScheduler();
// 日志监听
services.AddMonitorLogging();
services.AddControllersWithViews() services.AddControllersWithViews()
.AddInjectWithUnifyResult(); .AddNewtonsoftJson(options =>
{
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); // 首字母小写(驼峰样式)
options.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; // 时间格式化
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; // 忽略循环引用
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore; // 忽略空值
})
.AddInjectWithUnifyResult<RespParamProvider>();
// 配置雪花Id算法机器码
YitIdHelper.SetIdGenerator(new IdGeneratorOptions
{
WorkerId = App.GetOptions<SnowIdOptions>().WorkerId
});
} }
/// <summary>
/// 配置应用请求处理管道
/// </summary>
/// <param name="app"></param>
/// <param name="env"></param>
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{ {
if (env.IsDevelopment()) if (env.IsDevelopment())
{ {
app.UseDeveloperExceptionPage(); app.UseDeveloperExceptionPage();
app.UseForwardedHeaders();
} }
else else
{ {
app.UseExceptionHandler("/Home/Error"); app.UseExceptionHandler("/Home/Error");
app.UseForwardedHeaders();
app.UseHsts(); app.UseHsts();
} }
// 启用HTTPS
app.UseHttpsRedirection(); app.UseHttpsRedirection();
app.UseStaticFiles(); app.UseStaticFiles();

4
Cis.Web.Entry/Cis.Web.Entry.csproj

@ -10,4 +10,8 @@
<ProjectReference Include="..\Cis.Web.Core\Cis.Web.Core.csproj" /> <ProjectReference Include="..\Cis.Web.Core\Cis.Web.Core.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\images\" />
</ItemGroup>
</Project> </Project>

10
Cis.Web.Entry/Controllers/HomeController.cs

@ -1,5 +1,4 @@
using Cis.Application; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
namespace Cis.Web.Entry.Controllers; namespace Cis.Web.Entry.Controllers;
@ -7,16 +6,13 @@ namespace Cis.Web.Entry.Controllers;
[AllowAnonymous] [AllowAnonymous]
public class HomeController : Controller public class HomeController : Controller
{ {
private readonly ISystemService _systemService; public HomeController()
public HomeController(ISystemService systemService)
{ {
_systemService = systemService;
} }
public IActionResult Index() public IActionResult Index()
{ {
ViewBag.Description = _systemService.GetDescription(); ViewBag.Description = "Hello, dotnet.";
return View(); return View();
} }

8
Cis.Web.Entry/Views/Home/Index.cshtml

@ -3,10 +3,8 @@
} }
<div style="text-align:center;margin-top:50px;"> <div style="text-align:center;margin-top:50px;">
<img src="~/images/logo.png" style="height:100px;" />
<div align="center">
<p><a href="https://gitee.com/dotnetchina/Furion/stargazers"><img src="https://gitee.com/dotnetchina/Furion/badge/star.svg?theme=gvp" alt="star"></a> <a href="https://gitee.com/dotnetchina/Furion/members"><img src="https://gitee.com/dotnetchina/Furion/badge/fork.svg?theme=gvp" alt="fork"></a> <a href="https://github.com/MonkSoul/Furion/stargazers"><img src="https://img.shields.io/github/stars/MonkSoul/Furion?logo=github" alt="GitHub stars"></a> <a href="https://github.com/MonkSoul/Furion/network"><img src="https://img.shields.io/github/forks/MonkSoul/Furion?logo=github" alt="GitHub forks"></a> <a href="https://github.com/MonkSoul/Furion/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-orange" alt="GitHub license"></a> <a href="https://www.nuget.org/packages/Furion"><img src="https://img.shields.io/nuget/v/Furion.svg?cacheSeconds=10800" alt="nuget"></a></p>
</div>
<p>@ViewBag.Description</p> <p>@ViewBag.Description</p>
<p><a href="/api">API 接口</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="https://gitee.com/dotnetchina/Furion" target="_blank">源码地址</a></p> <p>
<a href="/api">API 接口</a>
</p>
</div> </div>

2
Cis.Web.Entry/Views/Shared/_Layout.cshtml

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>@ViewData["Title"] - Furion</title> <title>@ViewData["Title"]</title>
</head> </head>
<body> <body>
@RenderBody() @RenderBody()

9
Cis.Web.Entry/appsettings.json

@ -7,12 +7,5 @@
"Microsoft.EntityFrameworkCore": "Information" "Microsoft.EntityFrameworkCore": "Information"
} }
}, },
"AllowedHosts": "*", "AllowedHosts": "*"
"ConnectionConfigs": [
{
"ConnectionString": "Data Source=./Furion.db",
"DbType": "Sqlite",
"IsAutoCloseConnection": true
}
]
} }

BIN
Cis.Web.Entry/wwwroot/images/logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Loading…
Cancel
Save