master
wanghaomei 2 years ago
commit 69b9991f33

9
.gitignore vendored

@ -0,0 +1,9 @@
/BookingCustomer/BookingCustomer.Application/obj
/BookingCustomer/BookingCustomer.Application/bin
/BookingCustomer/BookingCustomer.Core/obj
/BookingCustomer/BookingCustomer.Core/bin
/BookingCustomer/BookingCustomer.Web.Core/obj
/BookingCustomer/BookingCustomer.Web.Core/bin
/BookingCustomer/BookingCustomer.Web.Entry/obj
/BookingCustomer/BookingCustomer.Web.Entry/bin
/.vs

@ -0,0 +1,43 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32328.378
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookingCustomer.Application", "BookingCustomer\BookingCustomer.Application\BookingCustomer.Application.csproj", "{26FEE8A5-30F7-490C-A4A9-0C8B116ACC7C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookingCustomer.Core", "BookingCustomer\BookingCustomer.Core\BookingCustomer.Core.csproj", "{511A59F9-CF74-460C-9E75-61DA64321EFA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookingCustomer.Web.Core", "BookingCustomer\BookingCustomer.Web.Core\BookingCustomer.Web.Core.csproj", "{71E078BE-C608-4E88-A264-E3765D700ADA}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BookingCustomer.Web.Entry", "BookingCustomer\BookingCustomer.Web.Entry\BookingCustomer.Web.Entry.csproj", "{A05DE169-D2AC-4217-8D17-DE82C2391FE7}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{26FEE8A5-30F7-490C-A4A9-0C8B116ACC7C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{26FEE8A5-30F7-490C-A4A9-0C8B116ACC7C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{26FEE8A5-30F7-490C-A4A9-0C8B116ACC7C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{26FEE8A5-30F7-490C-A4A9-0C8B116ACC7C}.Release|Any CPU.Build.0 = Release|Any CPU
{511A59F9-CF74-460C-9E75-61DA64321EFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{511A59F9-CF74-460C-9E75-61DA64321EFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{511A59F9-CF74-460C-9E75-61DA64321EFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{511A59F9-CF74-460C-9E75-61DA64321EFA}.Release|Any CPU.Build.0 = Release|Any CPU
{71E078BE-C608-4E88-A264-E3765D700ADA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{71E078BE-C608-4E88-A264-E3765D700ADA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{71E078BE-C608-4E88-A264-E3765D700ADA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{71E078BE-C608-4E88-A264-E3765D700ADA}.Release|Any CPU.Build.0 = Release|Any CPU
{A05DE169-D2AC-4217-8D17-DE82C2391FE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A05DE169-D2AC-4217-8D17-DE82C2391FE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A05DE169-D2AC-4217-8D17-DE82C2391FE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A05DE169-D2AC-4217-8D17-DE82C2391FE7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {68DDA4F9-DD78-4664-B268-60ED4984CD26}
EndGlobalSection
EndGlobal

@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>BookingCustomer.Application.xml</DocumentationFile>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Remove="applicationsettings.json" />
<None Remove="BookingCustomer.Application.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="applicationsettings.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BookingCustomer.Core\BookingCustomer.Core.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="System\Services\" />
</ItemGroup>
</Project>

@ -0,0 +1,19 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BookingCustomer.Application</name>
</assembly>
<members>
<member name="T:BookingCustomer.Application.SystemAppService">
<summary>
系统服务接口
</summary>
</member>
<member name="M:BookingCustomer.Application.SystemAppService.GetDescription">
<summary>
获取系统描述
</summary>
<returns></returns>
</member>
</members>
</doc>

@ -0,0 +1,15 @@
global using Furion;
global using Furion.DataEncryption;
global using Furion.DataValidation;
global using Furion.DependencyInjection;
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.CodeAnalysis;
global using SqlSugar;
global using System.ComponentModel.DataAnnotations;

@ -0,0 +1,9 @@
namespace BookingCustomer.Application
{
public class Mapper : IRegister
{
public void Register(TypeAdapterConfig config)
{
}
}
}

@ -0,0 +1,9 @@
namespace BookingCustomer.Application
{
public interface ISystemService
{
string GetDescription();
string Test();
}
}

@ -0,0 +1,21 @@
using BookingCustomer.Core;
using BookingCustomer.Core.DbEntity;
namespace BookingCustomer.Application
{
public class SystemService : ISystemService, ITransient
{
public string GetDescription()
{
return "让 .NET 开发更简单,更通用,更流行。";
}
public string Test()
{
var bookingdb = DbContext.Instance.GetConnection("booking");
var cc= bookingdb.Queryable<BookingOrder>().Count();
return $"数量:{cc}";
}
}
}

@ -0,0 +1,61 @@
using BookingCustomer.Core;
using BookingCustomer.Core.DbEntity;
using Furion.RemoteRequest.Extensions;
namespace BookingCustomer.Application
{
/// <summary>
/// 系统服务接口
/// </summary>
public class SystemAppService : IDynamicApiController
{
private readonly ISystemService _systemService;
private readonly IHttpContextAccessor _httpContextAccessor;
public SystemAppService(ISystemService systemService, IHttpContextAccessor httpContextAccessor)
{
_systemService = systemService;
_httpContextAccessor = httpContextAccessor;
}
/// <summary>
/// 获取系统描述
/// </summary>
/// <returns></returns>
public string GetDescription()
{
return _systemService.GetDescription();
}
public string Test()
{
return DbContext.BookingDB.Queryable<BookingOrder>().Count().ToString();
}
public string Test2()
{
return DbContext.MyshippingDB.Queryable<SysParamSet>().Count().ToString();
}
[AllowAnonymous]
public string Login()
{
var accessToken = JWTEncryption.Encrypt(new Dictionary<string, object>()
{
{ "UserId", 111 }, // 存储Id
{ "Account",222 }, // 存储用户名
});
// 设置Swagger自动登录
_httpContextAccessor.HttpContext.SigninToSwagger(accessToken);
// 生成刷新Token令牌
var refreshToken = JWTEncryption.GenerateRefreshToken(accessToken, 30);
// 设置刷新Token令牌
_httpContextAccessor.HttpContext.Response.Headers["x-access-token"] = refreshToken;
return accessToken;
}
}
}

@ -0,0 +1,31 @@
{
"$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.baiqian.ltd",
"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"
]
}
}

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>BookingCustomer.Core.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<None Remove="BookingCustomer.Core.xml" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Furion.Extras.Authentication.JwtBearer" Version="4.8.8.1" />
<PackageReference Include="Furion.Extras.ObjectMapper.Mapster" Version="4.8.8.1" />
<PackageReference Include="Furion.Pure" Version="4.8.8.1" />
<PackageReference Include="SqlSugarCore" Version="5.1.4.66" />
</ItemGroup>
</Project>

@ -0,0 +1,26 @@
using Furion;
using SqlSugar;
using System.Collections.Generic;
namespace BookingCustomer.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
});
public static readonly SqlSugarProvider BookingDB = Instance.GetConnection("booking");
public static readonly SqlSugarProvider MyshippingDB = Instance.GetConnection("myshipping");
}
}

@ -0,0 +1,125 @@
using System;
using SqlSugar;
using System.ComponentModel;
namespace BookingCustomer.Core.DbEntity
{
/// <summary>
///
/// </summary>
[SugarTable("booking_ctn")]
[Description("箱信息")]
public class BookingCtn : DBEntityTenant
{
/// <summary>
/// 单据ID
/// </summary>
public long? BILLID { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
[Description("箱型代码")]
public string CTNCODE { get; set; }
/// <summary>
/// 箱型
/// </summary>
[Description("箱型")]
public string CTNALL { get; set; }
/// <summary>
/// 箱量
/// </summary>
[Description("箱量")]
public int? CTNNUM { get; set; }
/// <summary>
/// TEU
/// </summary>
[Description("TEU")]
public int? TEU { get; set; }
/// <summary>
/// 箱号
/// </summary>
[Description("箱号")]
public string CNTRNO { get; set; }
/// <summary>
/// 封号
/// </summary>
[Description("封号")]
public string SEALNO { get; set; }
/// <summary>
/// 件数
/// </summary>
[Description("件数")]
public int? PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
[Description("包装")]
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
[Description("毛重")]
public decimal? KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
[Description("尺码")]
public decimal? CBM { get; set; }
/// <summary>
/// 皮重
/// </summary>
[Description("皮重")]
public decimal? TAREWEIGHT { get; set; }
/// <summary>
/// 箱状态
/// </summary>
[Description("箱状态")]
public string CTNSTATUS { get; set; }
/// <summary>
/// 称重方式
/// </summary>
[Description("称重方式")]
public string WEIGHTYPE { get; set; }
/// <summary>
/// 称重重量
/// </summary>
[Description("称重重量")]
public decimal? WEIGHKGS { get; set; }
/// <summary>
/// 称重联系人
/// </summary>
[Description("称重联系人")]
public string WEIGHATTN { get; set; }
/// <summary>
/// VGM联系公司
/// </summary>
[Description("VGM联系公司")]
public string VGMCONNCOM { get; set; }
/// <summary>
/// VGM联系电话
/// </summary>
[Description("VGM联系电话")]
public string WEIGHTEL { get; set; }
/// <summary>
/// 称重日期
/// </summary>
[Description("称重日期")]
public string WEIGHDATE { get; set; }
/// <summary>
/// VGM地址
/// </summary>
[Description("VGM地址")]
public string VGMADDR { get; set; }
/// <summary>
/// VGM邮箱
/// </summary>
[Description("VGM邮箱")]
public string VGMEMAIL { get; set; }
/// <summary>
/// 备注
/// </summary>
[Description("备注")]
public string REMARK { get; set; }
}
}

@ -0,0 +1,957 @@
using System;
using SqlSugar;
using System.ComponentModel;
namespace BookingCustomer.Core.DbEntity
{
/// <summary>
/// 订舱主表
/// </summary>
[SugarTable("booking_order")]
[Description("订舱主表")]
public class BookingOrder : DBEntityTenant
{
/// <summary>
/// 第三方系统编号
/// </summary>
//[Description("第三方系统编号")]
public string BSNO { get; set; }
/// <summary>
/// 业务状态
/// </summary>
//[Description("业务状态")]
public string BSSTATUS { get; set; }
/// <summary>
/// 业务状态名称
/// </summary>
//[Description("业务状态名称")]
public string BSSTATUSNAME { get; set; }
/// <summary>
/// 业务日期
/// </summary>
//[Description("业务日期")]
public DateTime? BSDATE { get; set; }
/// <summary>
/// 主提单号
/// </summary>
[Description("主提单号")]
public string MBLNO { get; set; }
/// <summary>
/// 分提单号
/// </summary>
[Description("分提单号")]
public string HBLNO { get; set; }
/// <summary>
/// 业务编号
/// </summary>
[Description("业务编号")]
public string BOOKINGNO { get; set; }
/// <summary>
/// 合约号
/// </summary>
[Description("合约号")]
public string CONTRACTNO { get; set; }
/// <summary>
/// 客户合同号
/// </summary>
[Description("客户合同号")]
public string SERVICECONTRACTNO { get; set; }
/// <summary>
/// 发货人代码
/// </summary>
//[Description("发货人代码")]
public string SHIPPERID { get; set; }
/// <summary>
/// 收货人代码
/// </summary>
//[Description("收货人代码")]
public string CONSIGNEEID { get; set; }
/// <summary>
/// 通知人代码
/// </summary>
//[Description("通知人代码")]
public string NOTIFYPARTYID { get; set; }
/// <summary>
/// 发货人
/// </summary>
[Description("发货人")]
public string SHIPPER { get; set; }
/// <summary>
/// 收货人
/// </summary>
[Description("收货人")]
public string CONSIGNEE { get; set; }
/// <summary>
/// 通知人
/// </summary>
[Description("通知人")]
public string NOTIFYPARTY { get; set; }
/// <summary>
/// 第二通知人
/// </summary>
[Description("第二通知人")]
public string NOTIFYPARTY2 { get; set; }
/// <summary>
/// 场站代码
/// </summary>
//[Description("场站代码")]
public string YARDID { get; set; }
/// <summary>
/// 场站
/// </summary>
[Description("场站")]
public string YARD { get; set; }
/// <summary>
/// 船舶呼号
/// </summary>
[Description("船舶呼号")]
public string VESSELID { get; set; }
/// <summary>
/// 船名
/// </summary>
[Description("船名")]
public string VESSEL { get; set; }
/// <summary>
/// 海关航次
/// </summary>
[Description("海关航次")]
public string VOYNO { get; set; }
/// <summary>
/// 内部航次
/// </summary>
[Description("内部航次")]
public string VOYNOINNER { get; set; }
/// <summary>
/// 截港日期
/// </summary>
[Description("截港日期")]
public DateTime? CLOSINGDATE { get; set; }
/// <summary>
/// 截单日期
/// </summary>
[Description("截单日期")]
public DateTime? CLOSEDOCDATE { get; set; }
/// <summary>
/// 截VGM时间
/// </summary>
[Description("截VGM时间")]
public DateTime? CLOSEVGMDATE { get; set; }
/// <summary>
/// 收货地代码
/// </summary>
//[Description("收货地代码")]
public string PLACERECEIPTID { get; set; }
/// <summary>
/// 收货地
/// </summary>
[Description("收货地")]
public string PLACERECEIPT { get; set; }
/// <summary>
/// 起运港代码
/// </summary>
[Description("起运港代码")]
public string PORTLOADID { get; set; }
/// <summary>
/// 起运港
/// </summary>
[Description("起运港")]
public string PORTLOAD { get; set; }
/// <summary>
/// 卸货港代码
/// </summary>
[Description("卸货港代码")]
public string PORTDISCHARGEID { get; set; }
/// <summary>
/// 卸货港
/// </summary>
[Description("卸货港")]
public string PORTDISCHARGE { get; set; }
/// <summary>
/// 交货地代码
/// </summary>
[Description("交货地代码")]
public string PLACEDELIVERYID { get; set; }
/// <summary>
/// 交货地
/// </summary>
[Description("交货地")]
public string PLACEDELIVERY { get; set; }
/// <summary>
/// 目的地代码
/// </summary>
[Description("目的地代码")]
public string DESTINATIONID { get; set; }
/// <summary>
///
///
/// 目的地
/// </summary>
[Description("目的地")]
public string DESTINATION { get; set; }
/// <summary>
/// 提单份数
/// </summary>
[Description("提单份数")]
public string NOBILL { get; set; }
/// <summary>
/// 副本提单份数
/// </summary>
[Description("副本提单份数")]
public string COPYNOBILL { get; set; }
/// <summary>
/// 签单方式
/// </summary>
[Description("签单方式")]
public string ISSUETYPE { get; set; }
/// <summary>
/// 签单日期
/// </summary>
[Description("签单日期")]
public DateTime? ISSUEDATE { get; set; }
/// <summary>
/// 签单地点代码
/// </summary>
[Description("签单地点代码")]
public string ISSUEPLACEID { get; set; }
/// <summary>
/// 签单地点
/// </summary>
[Description("签单地点")]
public string ISSUEPLACE { get; set; }
/// <summary>
/// 付费方式
/// </summary>
[Description("付费方式")]
public string BLFRT { get; set; }
/// <summary>
/// 预付地点
/// </summary>
[Description("预付地点")]
public string PREPARDAT { get; set; }
/// <summary>
/// 到付地点
/// </summary>
[Description("到付地点")]
public string PAYABLEAT { get; set; }
/// <summary>
/// 运输条款
/// </summary>
[Description("运输条款")]
public string SERVICE { get; set; }
/// <summary>
/// 唛头
/// </summary>
[Description("唛头")]
public string MARKS { get; set; }
/// <summary>
/// HS代码
/// </summary>
[Description("HS代码")]
public string HSCODE { get; set; }
/// <summary>
/// 货描
/// </summary>
[Description("货描")]
public string DESCRIPTION { get; set; }
/// <summary>
/// 件数
/// </summary>
[Description("件数")]
public int? PKGS { get; set; }
/// <summary>
/// 包装
/// </summary>
[Description("包装")]
public string KINDPKGS { get; set; }
/// <summary>
/// 毛重
/// </summary>
[Description("毛重")]
public decimal? KGS { get; set; }
/// <summary>
/// 尺码
/// </summary>
[Description("尺码")]
public decimal? CBM { get; set; }
/// <summary>
/// 件数大写
/// </summary>
[Description("件数大写")]
public string TOTALNO { get; set; }
/// <summary>
/// 集装箱
/// </summary>
[Description("集装箱")]
public string CNTRTOTAL { get; set; }
/// <summary>
/// 船公司代号
/// </summary>
[Description("船公司代号")]
public string CARRIERID { get; set; }
/// <summary>
/// 船公司
/// </summary>
[Description("船公司")]
public string CARRIER { get; set; }
/// <summary>
/// 货物标识
/// </summary>
[Description("货物标识")]
public string CARGOID { get; set; }
/// <summary>
/// 危险品类别
/// </summary>
[Description("危险品类别")]
public string DCLASS { get; set; }
/// <summary>
/// 危险品编号
/// </summary>
[Description("危险品编号")]
public string DUNNO { get; set; }
/// <summary>
/// 危险品页号
/// </summary>
[Description("危险品页号")]
public string DPAGE { get; set; }
/// <summary>
/// 危险品标签
/// </summary>
[Description("危险品标签")]
public string DLABEL { get; set; }
/// <summary>
/// 危险品联系人
/// </summary>
[Description("危险品联系人")]
public string LINKMAN { get; set; }
/// <summary>
/// 温度单位
/// </summary>
[Description("温度单位")]
public string TEMPID { get; set; }
/// <summary>
/// 设置温度
/// </summary>
[Description("设置温度")]
public string TEMPSET { get; set; }
/// <summary>
/// 通风度
/// </summary>
[Description("通风度")]
public string REEFERF { get; set; }
/// <summary>
/// 湿度
/// </summary>
[Description("湿度")]
public string HUMIDITY { get; set; }
/// <summary>
/// 最低温度
/// </summary>
[Description("最低温度")]
public string TEMPMIN { get; set; }
/// <summary>
/// 最高温度
/// </summary>
[Description("最高温度")]
public string TEMPMAX { get; set; }
/// <summary>
/// 是否SOC箱
/// </summary>
[Description("是否SOC箱")]
public bool? ISCONTAINERSOC { get; set; }
/// <summary>
/// SO备注
/// </summary>
[Description("SO备注")]
public string SOREMARK { get; set; }
/// <summary>
/// SI备注
/// </summary>
[Description("SI备注")]
public string SIREMARK { get; set; }
/// <summary>
/// 场站备注
/// </summary>
[Description("场站备注")]
public string YARDREMARK { get; set; }
/// <summary>
/// 公司ID
/// </summary>
//[Description("公司ID")]
public string COMPID { get; set; }
/// <summary>
/// 公司名称
/// </summary>
[Description("公司名称")]
public string COMPNAME { get; set; }
/// <summary>
/// 发货人名称
/// </summary>
[Description("发货人名称")]
public string SHIPPERNAME { get; set; }
/// <summary>
/// 发货人地址1
/// </summary>
[Description("发货人地址1")]
public string SHIPPERADDR1 { get; set; }
/// <summary>
/// 发货人地址2
/// </summary>
[Description("发货人地址2")]
public string SHIPPERADDR2 { get; set; }
/// <summary>
/// 发货人地址3
/// </summary>
[Description("发货人地址3")]
public string SHIPPERADDR3 { get; set; }
/// <summary>
/// 发货人城市
/// </summary>
[Description("发货人城市")]
public string SHIPPERCITY { get; set; }
/// <summary>
/// 发货人省份代码
/// </summary>
[Description("发货人省份代码")]
public string SHIPPERPROVINCE { get; set; }
/// <summary>
/// 发货人邮编
/// </summary>
[Description("发货人邮编")]
public string SHIPPERPOSTCODE { get; set; }
/// <summary>
/// 发货人国家代码
/// </summary>
[Description("发货人国家代码")]
public string SHIPPERCOUNTRY { get; set; }
/// <summary>
/// 发货人联系人
/// </summary>
[Description("发货人联系人")]
public string SHIPPERATTN { get; set; }
/// <summary>
/// 发货人电话
/// </summary>
[Description("发货人电话")]
public string SHIPPERTEL { get; set; }
/// <summary>
/// 收货人名称
/// </summary>
[Description("收货人名称")]
public string CONSIGNEENAME { get; set; }
/// <summary>
/// 收货人地址1
/// </summary>
[Description("收货人地址1")]
public string CONSIGNEEADDR1 { get; set; }
/// <summary>
/// 收货人地址2
/// </summary>
[Description("收货人地址2")]
public string CONSIGNEEADDR2 { get; set; }
/// <summary>
/// 收货人地址3
/// </summary>
[Description("收货人地址3")]
public string CONSIGNEEADDR3 { get; set; }
/// <summary>
/// 收货人城市
/// </summary>
[Description("收货人城市")]
public string CONSIGNEECITY { get; set; }
/// <summary>
/// 收货人省份代码
/// </summary>
[Description("收货人省份代码")]
public string CONSIGNEEPROVINCE { get; set; }
/// <summary>
/// 收货人邮编
/// </summary>
[Description("收货人邮编")]
public string CONSIGNEEPOSTCODE { get; set; }
/// <summary>
/// 收货人国家代码
/// </summary>
[Description("收货人国家代码")]
public string CONSIGNEERCOUNTRY { get; set; }
/// <summary>
/// 收货人联系人
/// </summary>
[Description("收货人联系人")]
public string CONSIGNEEATTN { get; set; }
/// <summary>
/// 收货人电话
/// </summary>
[Description("收货人电话")]
public string CONSIGNEETEL { get; set; }
/// <summary>
/// 通知人名称
/// </summary>
[Description("通知人名称")]
public string NOTIFYPARTYNAME { get; set; }
/// <summary>
/// 通知人地址1
/// </summary>
[Description("通知人地址1")]
public string NOTIFYPARTYADDR1 { get; set; }
/// <summary>
/// 通知人地址2
/// </summary>
[Description("通知人地址2")]
public string NOTIFYPARTYADDR2 { get; set; }
/// <summary>
/// 通知人地址3
/// </summary>
[Description("通知人地址3")]
public string NOTIFYPARTYADDR3 { get; set; }
/// <summary>
/// 通知人城市
/// </summary>
[Description("通知人城市")]
public string NOTIFYPARTYCITY { get; set; }
/// <summary>
/// 通知人省份代码
/// </summary>
[Description("通知人省份代码")]
public string NOTIFYPARTYPROVINCE { get; set; }
/// <summary>
/// 通知人邮编
/// </summary>
[Description("通知人邮编")]
public string NOTIFYPARTYPOSTCODE { get; set; }
/// <summary>
/// 通知人国家代码
/// </summary>
[Description("通知人国家代码")]
public string NOTIFYPARTYCOUNTRY { get; set; }
/// <summary>
/// 通知人联系人
/// </summary>
[Description("通知人联系人")]
public string NOTIFYPARTYATTN { get; set; }
/// <summary>
/// 通知人电话
/// </summary>
[Description("通知人电话")]
public string NOTIFYPARTYTEL { get; set; }
/// <summary>
/// PO号
/// </summary>
[Description("PO号")]
public string PONO { get; set; }
/// <summary>
/// 操作id
/// </summary>
public string OPID { get; set; }
/// <summary>
/// 单证id
/// </summary>
public string DOCID { get; set; }
/// <summary>
/// 操作
/// </summary>
[Description("操作")]
public string OP { get; set; }
/// <summary>
/// 单证
/// </summary>
//[Description("单证")]
public string DOC { get; set; }
/// <summary>
/// 销售ID
/// </summary>
public string SALEID { get; set; }
/// <summary>
/// 销售
/// </summary>
[Description("销售")]
public string SALE { get; set; }
/// <summary>
/// 客服ID
/// </summary>
public string CUSTSERVICEID { get; set; }
/// <summary>
/// 客服
/// </summary>
[Description("客服")]
public string CUSTSERVICE { get; set; }
/// <summary>
/// 客户
/// </summary>
[Description("客户")]
public string CUSTOMERNAME { get; set; }
/// <summary>
/// 订舱代理
/// </summary>
[Description("订舱代理")]
public string FORWARDER { get; set; }
/// <summary>
/// 船代
/// </summary>
[Description("船代")]
public string SHIPAGENCY { get; set; }
/// <summary>
/// 报关行
/// </summary>
[Description("报关行")]
public string CUSTOMSER { get; set; }
/// <summary>
/// 车队
/// </summary>
[Description("车队")]
public string TRUCKER { get; set; }
/// <summary>
/// 国外代理
/// </summary>
[Description("国外代理")]
public string AGENTID { get; set; }
/// <summary>
/// 客户ID
/// </summary>
public long? CUSTOMERID { get; set; }
/// <summary>
/// 订舱代理ID
/// </summary>
public string FORWARDERID { get; set; }
/// <summary>
/// 船代ID
/// </summary>
public string SHIPAGENCYID { get; set; }
/// <summary>
/// 报关行ID
/// </summary>
public string CUSTOMSERID { get; set; }
/// <summary>
/// 车队ID
/// </summary>
public string TRUCKERID { get; set; }
/// <summary>
/// 国外代理名称
/// </summary>
[Description("国外代理名称")]
public string AGENTNAME { get; set; }
/// <summary>
/// 委托方
/// </summary>
[Description("委托方")]
public string WEITUO { get; set; }
/// <summary>
/// 收货人DOOR地址
/// </summary>
[Description("收货人DOOR地址")]
public string CONSIGNEEDOORADDR { get; set; }
/// <summary>
/// 发货人DOOR地址
/// </summary>
[Description("发货人DOOR地址")]
public string SHIPPERDOORADDR { get; set; }
/// <summary>
/// SCAC代码
/// </summary>
[Description("SCAC代码")]
public string SCACCODE { get; set; }
/// <summary>
/// ITN编号
/// </summary>
[Description("ITN编号")]
public string ITNCODE { get; set; }
/// <summary>
/// 预付地点ID
/// </summary>
public string PREPARDATID { get; set; }
/// <summary>
/// 到付地点ID
/// </summary>
public string PAYABLEATID { get; set; }
/// <summary>
/// 订舱编号
/// </summary>
[Description("订舱编号")]
public string CUSTNO { get; set; }
/// <summary>
/// 中转港代码
/// </summary>
[Description("中转港代码")]
public string TRANSPORTID { get; set; }
/// <summary>
/// 中转港
/// </summary>
[Description("中转港")]
public string TRANSPORT { get; set; }
/// <summary>
/// 第三付款地
/// </summary>
[Description("第三付款地")]
public string THIRDPAYADDR { get; set; }
/// <summary>
/// 场站联系人
/// </summary>
[Description("场站联系人")]
public string YARDCONTRACT { get; set; }
/// <summary>
/// 场站联系人电话
/// </summary>
[Description("场站联系人电话")]
public string YARDCONTRACTTEL { get; set; }
/// <summary>
/// 场站联系人邮箱
/// </summary>
[Description("场站联系人邮箱")]
public string YARDCONTRACTEMAIL { get; set; }
/// <summary>
/// 费用自结
/// </summary>
[Description("费用自结")]
public bool? FEESELF { get; set; }
/// <summary>
/// 航线代码(船公司)
/// </summary>
[Description("航线代码")]
public string LANECODE { get; set; }
/// <summary>
/// 航线名称(船公司)
/// </summary>
[Description("航线名称")]
public string LANENAME { get; set; }
/// <summary>
/// 付款方
/// </summary>
[Description("付款方")]
public string FREIGHTPAYER { get; set; }
/// <summary>
/// 品名代码
/// </summary>
[Description("品名代码")]
public string GOODSCODE { get; set; }
/// <summary>
/// 品名
/// </summary>
[Description("品名")]
public string GOODSNAME { get; set; }
/// <summary>
/// 租户名称
/// </summary>
//[Description("租户名称")]
public string TenantName { get; set; }
/// <summary>
/// 主单ID
/// </summary>
//[Description("主单ID")]
public long? ParentId { get; set; }
/// <summary>
/// 件数合计
/// </summary>
[Description("件数合计")]
public string PKGSTOTAL { get; set; }
/// <summary>
/// 毛重合计
/// </summary>
[Description("毛重合计")]
public string KGSTOTAL { get; set; }
/// <summary>
/// 尺寸合计
/// </summary>
[Description("尺寸合计")]
public string CBMTOTAL { get; set; }
/// <summary>
/// 航线操作ID
/// </summary>
public string ROUTEID { get; set; }
/// <summary>
/// 航线操作
/// </summary>
[Description("航线操作")]
public string ROUTE { get; set; }
/// <summary>
/// 仓库
/// </summary>
[Description("仓库")]
public string Warehouse { get; set; }
/// <summary>
/// 仓库ID
/// </summary>
public string WarehouseID { get; set; }
/// <summary>
/// ep号作废使用真提单号字段
/// </summary>
[Description("ep号")]
public string EPCode { get; set; }
/// <summary>
/// 航线
/// </summary>
[Description("航线")]
public string LineName { get; set; }
/// <summary>
/// 单证备注
/// </summary>
[Description("单证备注")]
public string DZRemark { get; set; }
/// <summary>
/// 操作备注
/// </summary>
[Description("操作备注")]
public string CZRemark { get; set; }
/// <summary>
/// 真提单号
/// </summary>
[Description("真提单号")]
public string TMBLNO { get; set; }
/// <summary>
/// 装运方式
/// </summary>
[Description("装运方式")]
public string ShippingMethod { get; set; }
/// <summary>
/// 航线管理
/// </summary>
[Description("航线管理")]
public string LineManage { get; set; }
/// <summary>
/// 航线管理ID
/// </summary>
public string LineManageID { get; set; }
/// <summary>
/// 最后下货纸比对状态 NO_DIFF-无异常;DIFF-有差异;NO_YARD-无场站数据;EXPT-异常
/// </summary>
public string LstShipOrderCompareRlt { get; set; }
/// <summary>
/// 最后下货纸比对时间
/// </summary>
public Nullable<DateTime> LstShipOrderCompareDate { get; set; }
/// <summary>
/// 最后下货纸比对批次号
/// </summary>
public string LstShipOrderCompareId { get; set; }
/// <summary>
/// 最后下货纸比对状态 NO_DIFF-无异常;DIFF-有差异;NO_YARD-无场站数据;EXPT-异常
/// </summary>
public string LstShipOrderCompareRltName { get; set; }
/// <summary>
/// 最后下货纸比对方式 MANUAL-手动 AUTO-自动
/// </summary>
public string LstShipOrderCompareMode { get; set; }
/// <summary>
/// 是否占舱
/// </summary>
public string ZhanCangFlag { get; set; }
/// <summary>
/// 业务来源代码
/// </summary>
public string SourceCode { get; set; }
/// <summary>
/// 业务来源名称
/// </summary>
public string SourceName { get; set; }
#region 船舶日期相关
/// <summary>
/// 开船日期(船司提供的开船日期,操作填写)
/// </summary>
[Description("开船日期")]
public DateTime? ETD { get; set; }
/// <summary>
/// 运港通ETD爬取的ETD
/// </summary>
[Description("ETD")]
public DateTime? YgtETD { get; set; }
/// <summary>
/// 实际开船日期
/// </summary>
[Description("实际开船日期")]
public DateTime? ATD { get; set; }
/// <summary>
/// 预计到港日期(目的港)
/// </summary>
[Description("预计到港日期")]
public DateTime? ETA { get; set; }
/// <summary>
/// 起始港预抵日期
/// </summary>
[Description("预抵日期")]
public DateTime? StartETA { get; set; }
/// <summary>
/// 起始港实际抵港
/// </summary>
[Description("实际抵港")]
public DateTime? StartATA { get; set; }
/// <summary>
/// 中转预抵
/// </summary>
[Description("预抵日期")]
public DateTime? MiddleETA { get; set; }
/// <summary>
/// 中转预计离港
/// </summary>
[Description("中转预计离港")]
public DateTime? MiddleETD { get; set; }
/// <summary>
/// 中转实际到港
/// </summary>
[Description("中转实际到港")]
public DateTime? MiddleATA { get; set; }
/// <summary>
/// 中转实际离港
/// </summary>
[Description("中转实际离港")]
public DateTime? MiddleATD { get; set; }
/// <summary>
/// 实际到港(目的港)
/// </summary>
[Description("实际到港")]
public DateTime? ATA { get; set; }
#endregion
}
}

@ -0,0 +1,22 @@

using Furion;
using SqlSugar;
using System;
namespace BookingCustomer.Core.DbEntity;
/// <summary>
/// 自定义租户基类实体
/// </summary>
public abstract class DBEntityTenant : DEntityBase
{
/// <summary>
/// 租户id
/// </summary>
//[SugarColumn(ColumnDescription = "租户id")]
public virtual long? TenantId { get; set; }
}

@ -0,0 +1,132 @@
using Furion;
using SqlSugar;
using System;
using System.ComponentModel.DataAnnotations;
namespace BookingCustomer.Core.DbEntity;
/// <summary>
/// 自定义实体基类
/// </summary>
public abstract class DEntityBase : PrimaryKeyEntity
{
/// <summary>
/// 创建时间
/// </summary>
//[SugarColumn(ColumnDescription = "创建时间")]
public virtual DateTime? CreatedTime { get; set; }
/// <summary>
/// 更新时间
/// </summary>
//[SugarColumn(ColumnDescription = "更新时间")]
public virtual DateTime? UpdatedTime { get; set; }
/// <summary>
/// 创建者Id
/// </summary>
//[SugarColumn(ColumnDescription = "创建者Id")]
public virtual long? CreatedUserId { get; set; }
/// <summary>
/// 创建者名称
/// </summary>
[MaxLength(20)]
//[SugarColumn(ColumnDescription = "创建者名称")]
public virtual string CreatedUserName { get; set; }
/// <summary>
/// 修改者Id
/// </summary>
//[SugarColumn(ColumnDescription = "修改者Id")]
public virtual long? UpdatedUserId { get; set; }
/// <summary>
/// 修改者名称
/// </summary>
[MaxLength(20)]
//[SugarColumn(ColumnDescription = "修改者名称")]
public virtual string UpdatedUserName { get; set; }
/// <summary>
/// 软删除
/// </summary>
//[SugarColumn(ColumnDescription = "软删除")]
public virtual bool IsDeleted { get; set; } = false;
//public virtual void Create()
//{
// var userId = App.User.FindFirst(ClaimConst.CLAINM_USERID)?.Value;
// var userName = App.User.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value;
// Id = YitIdHelper.NextId();
// CreatedTime = DateTime.Now;
// if (!string.IsNullOrEmpty(userId))
// {
// CreatedUserId = long.Parse(userId);
// CreatedUserName = userName;
// }
//}
//public void Modify()
//{
// var userId = App.User.FindFirst(ClaimConst.CLAINM_USERID)?.Value;
// var userName = App.User.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value;
// UpdatedTime = DateTime.Now;
// if (!string.IsNullOrEmpty(userId))
// {
// UpdatedUserId = long.Parse(userId);
// UpdatedUserName = userName;
// }
//}
/// <summary>
/// 更新信息列
/// </summary>
/// <returns></returns>
public virtual string[] UpdateColumn()
{
var result = new[] {nameof(UpdatedUserId), nameof(UpdatedUserName), nameof(UpdatedTime)};
return result;
}
/// <summary>
/// 假删除的列,包含更新信息
/// </summary>
/// <returns></returns>
public virtual string[] FalseDeleteColumn()
{
var updateColumn = UpdateColumn();
var deleteColumn = new[] {nameof(IsDeleted)};
var result = new string [updateColumn.Length + deleteColumn.Length];
deleteColumn.CopyTo(result, 0);
updateColumn.CopyTo(result, deleteColumn.Length);
return result;
}
}
/// <summary>
/// 递增主键实体基类
/// </summary>
public abstract class AutoIncrementEntity
{
/// <summary>
/// 主键Id
/// </summary>
[SugarColumn(IsIdentity = true, ColumnDescription = "Id主键", IsPrimaryKey = true)] //通过特性设置主键和自增列
// 注意是在这里定义你的公共实体
public virtual int Id { get; set; }
}
/// <summary>
/// 主键实体基类
/// </summary>
public abstract class PrimaryKeyEntity
{
/// <summary>
/// 主键Id
/// </summary>
[SugarColumn(ColumnDescription = "Id主键", IsPrimaryKey = true)]
// 注意是在这里定义你的公共实体
public virtual long Id { get; set; }
}

@ -0,0 +1,25 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookingCustomer.Core.DbEntity
{
[SugarTable("sys_param_set")]
[Description("系统参数")]
public class SysParamSet
{
[SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true)]
public string GID { get; set; }
public string PARAMNAME { get; set; }
public string PARAMDESCRIPTION { get; set; }
public string PARAMVALUE { get; set; }
public string MODIFIEDUSER { get; set; }
public DateTime? MODIFIEDTIME { get; set; }
public string PARAMTYPE { get; set; }
public string FIELDTYPE { get; set; }
}
}

@ -0,0 +1,170 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookingCustomer.Core.Extentions
{
public static class JsonExtension
{
/// <summary>
/// 获取JObject
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static JObject GetJObjectValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return null;
}
return jt as JObject;
}
/// <summary>
/// 获取JArray
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static JArray GetJArrayValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return null;
}
return jt as JArray;
}
/// <summary>
/// 获取字符串值
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static string GetStringValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return string.Empty;
}
return jt.ToString();
}
/// <summary>
/// 获取int值
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static int GetIntValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return 0;
}
var strVal = jt.ToString();
int rtnVal = 0;
int.TryParse(strVal, out rtnVal);
return rtnVal;
}
/// <summary>
/// 获取decimal值
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static decimal GetDecimalValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return 0;
}
var strVal = jt.ToString();
decimal rtnVal = 0;
decimal.TryParse(strVal, out rtnVal);
return rtnVal;
}
/// <summary>
/// 获取datetime值
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static DateTime? GetDateTimeValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return null;
}
var strVal = jt.ToString();
DateTime rtnVal = DateTime.MinValue;
if (DateTime.TryParse(strVal, out rtnVal))
{
return rtnVal;
}
return null;
}
/// <summary>
/// 获取datetime值不带秒yyyy-MM-dd HH:mm
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static DateTime? GetDateTimeMinuteValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return null;
}
var strVal = jt.ToString() + ":00";
DateTime rtnVal = DateTime.MinValue;
if (DateTime.TryParse(strVal, out rtnVal))
{
return rtnVal;
}
return null;
}
/// <summary>
/// 获取int值
/// </summary>
/// <param name="jobj"></param>
/// <param name="prop"></param>
/// <returns></returns>
public static bool GetBooleanValue(this JObject jobj, string prop)
{
var jt = jobj[prop];
if (jt == null)
{
return false;
}
var strVal = jt.ToString();
bool.TryParse(strVal, out bool rtnVal);
return rtnVal;
}
}
}

@ -0,0 +1,97 @@
using BookingCustomer.Core.Extentions;
using Furion;
using Furion.DataEncryption;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Furion.RemoteRequest.Extensions;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BookingCustomer.Core.Service
{
/// <summary>
/// 授权跳转接口
/// </summary>
public class AuthService : IDynamicApiController
{
private readonly IHttpContextAccessor _httpContextAccessor;
public AuthService(IHttpContextAccessor httpContextAccessor)
{
_httpContextAccessor = httpContextAccessor;
}
[AllowAnonymous]
/// <summary>
/// 使用跳转code登录
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public async Task<string> LoginWithCode(string code)
{
var djyAuthUrl = App.GetConfig<string>("DjyAuthUrl");
if (!djyAuthUrl.EndsWith("/"))
{
djyAuthUrl += "/";
}
var loginUrl = djyAuthUrl + "user/login";
var infoUrl = djyAuthUrl + "user/info";
var result = await loginUrl
.SetBody(new { code }, "application/json")
.PostAsStringAsync();
var jRtn = JObject.Parse(result);
if (jRtn.GetIntValue("code") == 200)
{
var jData = jRtn.GetJObjectValue("data");
var token = jData.GetStringValue("token");
var headers = new Dictionary<string, object>();
headers.Add("Authorization", $"Bearer {token}");
result = await infoUrl
.SetHeaders(headers)
.GetAsStringAsync();
jRtn = JObject.Parse(result);
if (jRtn.GetIntValue("code") == 200)
{
jData = jRtn.GetJObjectValue("data");
var dic = new Dictionary<string, object>();
foreach (var prop in jData.Properties())
{
dic.Add(prop.Name, jData[prop.Name]);
}
var accessToken = JWTEncryption.Encrypt(dic);
// 设置Swagger自动登录
_httpContextAccessor.HttpContext.SigninToSwagger(accessToken);
// 生成刷新Token令牌
var refreshToken = JWTEncryption.GenerateRefreshToken(accessToken, 30);
// 设置刷新Token令牌
_httpContextAccessor.HttpContext.Response.Headers["x-access-token"] = refreshToken;
return accessToken;
}
else
{
throw Oops.Bah(jRtn.GetStringValue("message"));
}
}
else
{
throw Oops.Bah(jRtn.GetStringValue("message"));
}
}
}
}

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<NoWarn>1701;1702;1591</NoWarn>
<DocumentationFile>BookingCustomer.Web.Core.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<None Remove="BookingCustomer.Web.Core.xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\BookingCustomer.Application\BookingCustomer.Application.csproj" />
</ItemGroup>
</Project>

@ -0,0 +1,8 @@
<?xml version="1.0"?>
<doc>
<assembly>
<name>BookingCustomer.Web.Core</name>
</assembly>
<members>
</members>
</doc>

@ -0,0 +1,17 @@
using Furion.Authorization;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using System.Threading.Tasks;
namespace BookingCustomer.Web.Core
{
public class JwtHandler : AppAuthorizeHandler
{
public override Task<bool> PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext)
{
// 这里写您的授权判断逻辑,授权通过返回 true否则返回 false
return Task.FromResult(true);
}
}
}

@ -0,0 +1,47 @@
using Furion;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace BookingCustomer.Web.Core
{
public class Startup : AppStartup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddConsoleFormatter();
services.AddJwt<JwtHandler>(enableGlobalAuthorize: true);
services.AddCorsAccessor();
services.AddRemoteRequest();
services.AddControllers()
.AddInjectWithUnifyResult();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseHttpsRedirection();
app.UseRouting();
app.UseCorsAccessor();
app.UseAuthentication();
app.UseAuthorization();
app.UseInject(string.Empty);
app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});
}
}
}

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<SatelliteResourceLanguages>en-US</SatelliteResourceLanguages>
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\BookingCustomer.Web.Core\BookingCustomer.Web.Core.csproj" />
</ItemGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties properties_4launchsettings_1json__JsonSchema="" />
</VisualStudio>
</ProjectExtensions>
</Project>

@ -0,0 +1 @@
Serve.Run(RunOptions.Default.WithArgs(args));

@ -0,0 +1,31 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:53785",
"sslPort": 44342
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"BookingCustomer.Web.Entry": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "",
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

@ -0,0 +1,23 @@
using Furion;
using System.Reflection;
namespace BookingCustomer.Web.Entry
{
public class SingleFilePublish : ISingleFilePublish
{
public Assembly[] IncludeAssemblies()
{
return Array.Empty<Assembly>();
}
public string[] IncludeAssemblyNames()
{
return new[]
{
"BookingCustomer.Application",
"BookingCustomer.Core",
"BookingCustomer.Web.Core"
};
}
}
}

@ -0,0 +1,10 @@
{
"$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Information"
}
}
}

@ -0,0 +1,38 @@
{
"$schema": "https://gitee.com/dotnetchina/Furion/raw/v4/schemas/v4/furion-schema.json",
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.EntityFrameworkCore": "Information"
}
},
"AllowedHosts": "*",
"ConnectionConfigs": [
{
"ConfigId": "booking",
"ConnectionString": "Data Source=60.209.125.238;Database=booking_hechuan_dev;User ID=djy;Password=123qwe;pooling=true;port=28012;sslmode=none;CharSet=utf8mb4;Convert Zero Datetime=True;Allow Zero Datetime=True;",
"DbType": "MySql",
"IsAutoCloseConnection": true
},
{
"ConfigId": "myshipping",
"ConnectionString": "Server=60.209.125.238,28000;Database=DevDsPingTai;User=dev;Password=dev123;MultipleActiveResultSets=True;",
"DbType": "SqlServer",
"IsAutoCloseConnection": true
}
],
"JWTSettings": {
"ValidateIssuerSigningKey": true, // bool true
"IssuerSigningKey": "BE9966C0C7774073B62C457E081C88CB", // string 16
"ValidateIssuer": true, // bool true
"ValidIssuer": "myshipping", // string
"ValidateAudience": true, // bool true
"ValidAudience": "myshipping", // string
"ValidateLifetime": true, // bool truetrue
"ExpiredTime": 240, // long 20
"ClockSkew": 5, // long 5
"Algorithm": "HS256" // string HS256
},
"DjyAuthUrl": "http://60.209.125.238:35101"
}
Loading…
Cancel
Save