2.调整http接口部分请求参数为json对象不以string作为post请求参数 3.修改http接口文档 4.调整demo的各自解决方案tags/v1.1.5-pipeline
@@ -84,6 +84,13 @@ | |||
| TerminalPhoneNo| string| 设备终端号| | |||
| HexData| string| JT808 Hex String JT808数据包字符串| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
"HexData":"7E****7E" | |||
} | |||
``` | |||
返回数据: | |||
|属性|数据类型|参数说明| | |||
@@ -155,7 +162,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -188,7 +201,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -261,7 +280,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -294,7 +319,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -324,7 +355,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -352,7 +389,13 @@ | |||
|属性|数据类型|参数说明| | |||
|:------:|:------:|:------| | |||
| terminalPhoneNo| string| 设备终端号| | |||
| TerminalPhoneNo| string| 设备终端号| | |||
``` 1 | |||
{ | |||
"TerminalPhoneNo":"123456789012", | |||
} | |||
``` | |||
返回数据: | |||
@@ -370,7 +413,7 @@ | |||
} | |||
``` | |||
#### 3.移除sim卡黑名单 | |||
#### 3.获取sim卡黑名单 | |||
请求地址:Blacklist/Get | |||
@@ -0,0 +1,51 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio Version 17 | |||
VisualStudioVersion = 17.0.31903.59 | |||
MinimumVisualStudioVersion = 10.0.40219.1 | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simples", "simples", "{2459FB59-8A33-49A4-ADBC-A0B12C5886A6}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleClient", "JT808.DotNetty.SimpleClient\JT808.DotNetty.SimpleClient.csproj", "{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleServer", "JT808.DotNetty.SimpleServer\JT808.DotNetty.SimpleServer.csproj", "{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueServer", "JT808.DotNetty.SimpleQueueServer\JT808.DotNetty.SimpleQueueServer.csproj", "{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueService", "JT808.DotNetty.SimpleQueueService\JT808.DotNetty.SimpleQueueService.csproj", "{90E1F1C9-A953-4341-9792-9E2AF4471B68}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
Release|Any CPU = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.Build.0 = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(SolutionProperties) = preSolution | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
GlobalSection(NestedProjects) = preSolution | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
EndGlobalSection | |||
GlobalSection(ExtensibilityGlobals) = postSolution | |||
SolutionGuid = {FC0FFCEA-E1EF-4C97-A1C5-F89418B6834B} | |||
EndGlobalSection | |||
EndGlobal |
@@ -2,14 +2,14 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="DotPulsar" Version="1.0.1" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> | |||
<PackageReference Include="DotPulsar" Version="1.1.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" /> | |||
</ItemGroup> | |||
<Import Project="..\pipeline.props" /> | |||
</Project> |
@@ -2,14 +2,14 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" /> | |||
</ItemGroup> | |||
<Import Project="..\pipeline.props" /> | |||
</Project> |
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk.Web"> | |||
<PropertyGroup> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
@@ -2,14 +2,14 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" /> | |||
</ItemGroup> | |||
<Import Project="..\pipeline.props" /> | |||
<ItemGroup> | |||
@@ -2,14 +2,14 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" /> | |||
</ItemGroup> | |||
<Import Project="..\pipeline.props" /> | |||
<ItemGroup> | |||
@@ -2,13 +2,13 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="6.0.0" /> | |||
</ItemGroup> | |||
<Import Project="..\pipeline.props" /> | |||
<ItemGroup> | |||
@@ -1,14 +1,10 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio Version 16 | |||
VisualStudioVersion = 16.0.29418.71 | |||
# Visual Studio Version 17 | |||
VisualStudioVersion = 17.0.31903.59 | |||
MinimumVisualStudioVersion = 10.0.40219.1 | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "simples", "simples", "{2459FB59-8A33-49A4-ADBC-A0B12C5886A6}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleClient", "JT808.DotNetty.SimpleClient\JT808.DotNetty.SimpleClient.csproj", "{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleServer", "JT808.DotNetty.SimpleServer\JT808.DotNetty.SimpleServer.csproj", "{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleServer", "JT808.Gateway.SimpleServer\JT808.Gateway.SimpleServer.csproj", "{98E1CDD0-4D4E-48FE-968E-260F0CD5F4D3}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleClient", "JT808.Gateway.SimpleClient\JT808.Gateway.SimpleClient.csproj", "{09AFAC3E-4E4D-4B51-962D-BF8489D8BEC6}" | |||
@@ -19,11 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleQueueSe | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.SimpleQueueNotification", "JT808.Gateway.SimpleQueueNotification\JT808.Gateway.SimpleQueueNotification.csproj", "{163D2EE2-9A62-4E8A-B203-BF147909E89A}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueServer", "JT808.DotNetty.SimpleQueueServer\JT808.DotNetty.SimpleQueueServer.csproj", "{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}" | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.SimpleQueueService", "JT808.DotNetty.SimpleQueueService\JT808.DotNetty.SimpleQueueService.csproj", "{90E1F1C9-A953-4341-9792-9E2AF4471B68}" | |||
EndProject | |||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JT808.Gateway.NBIotSimpleClient", "JT808.Gateway.NBIotSimpleClient\JT808.Gateway.NBIotSimpleClient.csproj", "{95F159E4-07A3-4736-9D05-2D88EE43FD5E}" | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.NBIotSimpleClient", "JT808.Gateway.NBIotSimpleClient\JT808.Gateway.NBIotSimpleClient.csproj", "{95F159E4-07A3-4736-9D05-2D88EE43FD5E}" | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
@@ -31,14 +23,6 @@ Global | |||
Release|Any CPU = Release|Any CPU | |||
EndGlobalSection | |||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{98E1CDD0-4D4E-48FE-968E-260F0CD5F4D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{98E1CDD0-4D4E-48FE-968E-260F0CD5F4D3}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{98E1CDD0-4D4E-48FE-968E-260F0CD5F4D3}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
@@ -59,14 +43,6 @@ Global | |||
{163D2EE2-9A62-4E8A-B203-BF147909E89A}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{163D2EE2-9A62-4E8A-B203-BF147909E89A}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{163D2EE2-9A62-4E8A-B203-BF147909E89A}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68}.Release|Any CPU.Build.0 = Release|Any CPU | |||
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||
{95F159E4-07A3-4736-9D05-2D88EE43FD5E}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||
@@ -76,15 +52,11 @@ Global | |||
HideSolutionNode = FALSE | |||
EndGlobalSection | |||
GlobalSection(NestedProjects) = preSolution | |||
{E6F61CE8-BFB4-4946-A0D3-AECCE77824E5} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{CCE6AEFB-1AB0-4BD9-8EA2-8B4CDD097E88} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{98E1CDD0-4D4E-48FE-968E-260F0CD5F4D3} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{09AFAC3E-4E4D-4B51-962D-BF8489D8BEC6} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{8594AC7F-18B4-439D-B58B-1CEFF0833A1A} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{E2D1CFEF-417A-4C44-BC2E-E5A160602485} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{163D2EE2-9A62-4E8A-B203-BF147909E89A} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{1DEAC7EA-D662-420B-A1A7-A6E840568F7B} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{90E1F1C9-A953-4341-9792-9E2AF4471B68} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
{95F159E4-07A3-4736-9D05-2D88EE43FD5E} = {2459FB59-8A33-49A4-ADBC-A0B12C5886A6} | |||
EndGlobalSection | |||
GlobalSection(ExtensibilityGlobals) = postSolution |
@@ -1,3 +1,4 @@ | |||
dotnet build | |||
dotnet build JT808.PipelineSimples.sln | |||
dotnet build JT808.DotNettySimples.sln | |||
pause |
@@ -0,0 +1,14 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Text; | |||
namespace JT808.Gateway.Abstractions.Dtos | |||
{ | |||
public class JT808TerminalPhoneNoDto | |||
{ | |||
/// <summary> | |||
/// 终端手机号 | |||
/// </summary> | |||
public string TerminalPhoneNo { get; set; } | |||
} | |||
} |
@@ -1,8 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | |||
@@ -27,12 +27,13 @@ | |||
<Compile Remove="IJT808QueueGatewayBuilder.cs" /> | |||
<Compile Remove="JT808QueueReplyMessageHandler.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="JT808" Version="2.4.4" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" /> | |||
<PackageReference Include="JT808" Version="2.4.5-preview1" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="..\..\LICENSE" Pack="true" PackagePath="" /> | |||
@@ -85,6 +85,11 @@ | |||
远程ip地址 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto.TerminalPhoneNo"> | |||
<summary> | |||
终端手机号 | |||
</summary> | |||
</member> | |||
<member name="P:JT808.Gateway.Abstractions.Dtos.JT808UdpSessionInfoDto.LastActiveTime"> | |||
<summary> | |||
最后上线时间 | |||
@@ -2,8 +2,8 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5</TargetFramework> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFramework>net6</TargetFramework> | |||
<LangVersion>10.0</LangVersion> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
@@ -16,11 +16,11 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.3" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.4" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -2,14 +2,14 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5</TargetFramework> | |||
<TargetFramework>net6</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.3" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.4" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -2,8 +2,8 @@ | |||
<Import Project="..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -24,10 +24,10 @@ | |||
<ItemGroup> | |||
<PackageReference Include="JT808" Version="2.4.4" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0" /> | |||
<PackageReference Include="System.IO.Pipelines" Version="5.0.1" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="6.0.0" /> | |||
<PackageReference Include="System.IO.Pipelines" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="6.0.0" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<None Include="..\..\LICENSE" Pack="true" PackagePath="" /> | |||
@@ -1,8 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -21,7 +21,7 @@ | |||
<Version>$(JT808GatewayPackageVersion)</Version> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Confluent.Kafka" Version="1.8.1" /> | |||
<PackageReference Include="Confluent.Kafka" Version="1.8.2" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -2,7 +2,7 @@ | |||
<Import Project="..\..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
@@ -2,8 +2,8 @@ | |||
<Import Project="..\..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -1,8 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -2,8 +2,8 @@ | |||
<Import Project="..\..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -2,8 +2,8 @@ | |||
<Import Project="..\..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<RepositoryUrl>https://github.com/SmallChi/JT808Gateway</RepositoryUrl> | |||
@@ -2,15 +2,15 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5</TargetFramework> | |||
<TargetFramework>net6</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.3" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.4" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -2,7 +2,7 @@ | |||
<PropertyGroup> | |||
<OutputType>Exe</OutputType> | |||
<TargetFramework>net5</TargetFramework> | |||
<TargetFramework>net6</TargetFramework> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
@@ -10,10 +10,10 @@ | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.8" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.3" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.11.1" /> | |||
<PackageReference Include="NLog.Extensions.Logging" Version="1.7.4" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
@@ -1,16 +1,16 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<PropertyGroup> | |||
<TargetFramework>net5.0</TargetFramework> | |||
<TargetFramework>net6.0</TargetFramework> | |||
<IsPackable>false</IsPackable> | |||
</PropertyGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="6.0.0" /> | |||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0" /> | |||
<PackageReference Include="xunit" Version="2.4.1" /> | |||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> | |||
<PrivateAssets>all</PrivateAssets> | |||
@@ -1,7 +1,7 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>9.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
@@ -25,7 +25,7 @@ | |||
<None Include="..\..\LICENSE" Pack="true" PackagePath="" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" /> | |||
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\JT808.Gateway.Abstractions\JT808.Gateway.Abstractions.csproj" /> | |||
@@ -24,7 +24,7 @@ | |||
<summary> | |||
统一下发信息 | |||
</summary> | |||
<param name="jT808UnificationSendRequestDto"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.GetTcpSessionAll"> | |||
@@ -33,18 +33,18 @@ | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.QueryTcpSessionByTerminalPhoneNo(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.QueryTcpSessionByTerminalPhoneNo(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
会话服务-通过设备终端号查询对应会话信息 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.RemoveTcpByTerminalPhoneNo(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.RemoveTcpByTerminalPhoneNo(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
会话服务-通过设备终端号移除对应会话 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.GetUdpSessionAll"> | |||
@@ -53,32 +53,32 @@ | |||
</summary> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.QueryUdpSessionByTerminalPhoneNo(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.QueryUdpSessionByTerminalPhoneNo(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
会话服务-通过设备终端号查询对应会话信息 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.RemoveUdpByTerminalPhoneNo(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.RemoveUdpByTerminalPhoneNo(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
会话服务-通过设备终端号移除对应会话 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.BlacklistAdd(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.BlacklistAdd(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
SIM卡黑名单服务-将对应SIM号加入黑名单 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.BlacklistRemove(System.String)"> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.BlacklistRemove(JT808.Gateway.Abstractions.Dtos.JT808TerminalPhoneNoDto)"> | |||
<summary> | |||
SIM卡黑名单服务-将对应SIM号移除黑名单 | |||
</summary> | |||
<param name="terminalPhoneNo"></param> | |||
<param name="parameter"></param> | |||
<returns></returns> | |||
</member> | |||
<member name="M:JT808.Gateway.WebApiClientTool.JT808HttpClient.GetBlacklistAll"> | |||
@@ -32,12 +32,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// 统一下发信息 | |||
/// </summary> | |||
/// <param name="jT808UnificationSendRequestDto"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<bool>> UnificationSend(JT808UnificationSendRequestDto jT808UnificationSendRequestDto) | |||
public async ValueTask<JT808ResultDto<bool>> UnificationSend(JT808UnificationSendRequestDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.UnificationSend); | |||
request.Content = new StringContent(JsonSerializer.Serialize(jT808UnificationSendRequestDto)); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -62,12 +62,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// 会话服务-通过设备终端号查询对应会话信息 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<JT808TcpSessionInfoDto>> QueryTcpSessionByTerminalPhoneNo(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<JT808TcpSessionInfoDto>> QueryTcpSessionByTerminalPhoneNo(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.QueryTcpSessionByTerminalPhoneNo); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -78,12 +78,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// 会话服务-通过设备终端号移除对应会话 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<bool>> RemoveTcpByTerminalPhoneNo(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<bool>> RemoveTcpByTerminalPhoneNo(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.SessionRemoveByTerminalPhoneNo); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -108,12 +108,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// 会话服务-通过设备终端号查询对应会话信息 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<JT808UdpSessionInfoDto>> QueryUdpSessionByTerminalPhoneNo(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<JT808UdpSessionInfoDto>> QueryUdpSessionByTerminalPhoneNo(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.QueryUdpSessionByTerminalPhoneNo); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -124,12 +124,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// 会话服务-通过设备终端号移除对应会话 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<bool>> RemoveUdpByTerminalPhoneNo(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<bool>> RemoveUdpByTerminalPhoneNo(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.RemoveUdpByTerminalPhoneNo); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -140,12 +140,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// SIM卡黑名单服务-将对应SIM号加入黑名单 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<bool>> BlacklistAdd(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<bool>> BlacklistAdd(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.BlacklistAdd); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -156,12 +156,12 @@ namespace JT808.Gateway.WebApiClientTool | |||
/// <summary> | |||
/// SIM卡黑名单服务-将对应SIM号移除黑名单 | |||
/// </summary> | |||
/// <param name="terminalPhoneNo"></param> | |||
/// <param name="parameter"></param> | |||
/// <returns></returns> | |||
public async ValueTask<JT808ResultDto<bool>> BlacklistRemove(string terminalPhoneNo) | |||
public async ValueTask<JT808ResultDto<bool>> BlacklistRemove(JT808TerminalPhoneNoDto parameter) | |||
{ | |||
var request = new HttpRequestMessage(HttpMethod.Post, JT808GatewayConstants.JT808WebApiRouteTable.BlacklistRemove); | |||
request.Content = new StringContent(terminalPhoneNo); | |||
request.Content = new StringContent(JsonSerializer.Serialize(parameter)); | |||
var response = await HttpClient.SendAsync(request); | |||
response.EnsureSuccessStatusCode(); | |||
var data = await response.Content.ReadAsStreamAsync(); | |||
@@ -1,7 +1,7 @@ | |||
| |||
Microsoft Visual Studio Solution File, Format Version 12.00 | |||
# Visual Studio Version 16 | |||
VisualStudioVersion = 16.0.29409.12 | |||
# Visual Studio Version 17 | |||
VisualStudioVersion = 17.0.31903.59 | |||
MinimumVisualStudioVersion = 10.0.40219.1 | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway", "JT808.Gateway\JT808.Gateway.csproj", "{4C8A2546-8333-416D-B123-91062B630087}" | |||
EndProject | |||
@@ -39,6 +39,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.CleintBenchma | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Gateway.MsgIdHandler", "JT808.Gateway.Services\JT808.Gateway.MsgIdHandler\JT808.Gateway.MsgIdHandler.csproj", "{41E5252C-CA52-453A-BBFE-CBCB58D232ED}" | |||
EndProject | |||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{2336747A-28A3-443E-8E23-4B25E3F2D971}" | |||
ProjectSection(SolutionItems) = preProject | |||
Version.props = Version.props | |||
EndProjectSection | |||
EndProject | |||
Global | |||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | |||
Debug|Any CPU = Debug|Any CPU | |||
@@ -73,10 +73,12 @@ namespace JT808.Gateway.Handlers | |||
{ | |||
return EmptyHttpResponse(); | |||
} | |||
JT808ResultDto<JT808TcpSessionInfoDto> resultDto = new JT808ResultDto<JT808TcpSessionInfoDto>(); | |||
try | |||
{ | |||
resultDto.Data = SessionManager.GetTcpAll().Where(w => w.TerminalPhoneNo == json).Select(s => new JT808TcpSessionInfoDto | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
resultDto.Data = SessionManager.GetTcpAll(w => w.TerminalPhoneNo == parameter.TerminalPhoneNo).Select(s => new JT808TcpSessionInfoDto | |||
{ | |||
LastActiveTime = s.ActiveTime, | |||
StartTime = s.StartTime, | |||
@@ -108,7 +110,8 @@ namespace JT808.Gateway.Handlers | |||
JT808ResultDto<bool> resultDto = new JT808ResultDto<bool>(); | |||
try | |||
{ | |||
SessionManager.RemoveByTerminalPhoneNo(json); | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
SessionManager.RemoveByTerminalPhoneNo(parameter.TerminalPhoneNo); | |||
resultDto.Code = JT808ResultCode.Ok; | |||
resultDto.Data = true; | |||
} | |||
@@ -169,7 +172,8 @@ namespace JT808.Gateway.Handlers | |||
JT808ResultDto<JT808UdpSessionInfoDto> resultDto = new JT808ResultDto<JT808UdpSessionInfoDto>(); | |||
try | |||
{ | |||
resultDto.Data = SessionManager.GetUdpAll().Where(w => w.TerminalPhoneNo == json).Select(s => new JT808UdpSessionInfoDto | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
resultDto.Data = SessionManager.GetUdpAll(w => w.TerminalPhoneNo == parameter.TerminalPhoneNo).Select(s => new JT808UdpSessionInfoDto | |||
{ | |||
LastActiveTime = s.ActiveTime, | |||
StartTime = s.StartTime, | |||
@@ -201,7 +205,8 @@ namespace JT808.Gateway.Handlers | |||
JT808ResultDto<bool> resultDto = new JT808ResultDto<bool>(); | |||
try | |||
{ | |||
SessionManager.RemoveByTerminalPhoneNo(json); | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
SessionManager.RemoveByTerminalPhoneNo(parameter.TerminalPhoneNo); | |||
resultDto.Code = JT808ResultCode.Ok; | |||
resultDto.Data = true; | |||
} | |||
@@ -263,7 +268,8 @@ namespace JT808.Gateway.Handlers | |||
JT808ResultDto<bool> resultDto = new JT808ResultDto<bool>(); | |||
try | |||
{ | |||
BlacklistManager.Add(json); | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
BlacklistManager.Add(parameter.TerminalPhoneNo); | |||
resultDto.Data = true; | |||
resultDto.Code = JT808ResultCode.Ok; | |||
} | |||
@@ -290,7 +296,8 @@ namespace JT808.Gateway.Handlers | |||
JT808ResultDto<bool> resultDto = new JT808ResultDto<bool>(); | |||
try | |||
{ | |||
BlacklistManager.Remove(json); | |||
JT808TerminalPhoneNoDto parameter = JsonSerializer.Deserialize<JT808TerminalPhoneNoDto>(json); | |||
BlacklistManager.Remove(parameter.TerminalPhoneNo); | |||
resultDto.Data = true; | |||
resultDto.Code = JT808ResultCode.Ok; | |||
} | |||
@@ -304,7 +311,7 @@ namespace JT808.Gateway.Handlers | |||
} | |||
/// <summary> | |||
/// 移除sim卡黑名单 | |||
/// 查询sim卡黑名单 | |||
/// </summary> | |||
/// <param name="json"></param> | |||
/// <returns></returns> | |||
@@ -1,8 +1,8 @@ | |||
<Project Sdk="Microsoft.NET.Sdk"> | |||
<Import Project="..\Version.props" /> | |||
<PropertyGroup> | |||
<TargetFrameworks>netstandard2.1;net5.0;</TargetFrameworks> | |||
<LangVersion>8.0</LangVersion> | |||
<TargetFrameworks>netstandard2.1;net6.0;</TargetFrameworks> | |||
<LangVersion>10.0</LangVersion> | |||
<Copyright>Copyright 2019.</Copyright> | |||
<Authors>SmallChi(Koike)</Authors> | |||
<GeneratePackageOnBuild>false</GeneratePackageOnBuild> | |||
@@ -25,11 +25,11 @@ | |||
<Compile Remove="Internal\JT808NormalGatewayBuilderDefault.cs" /> | |||
<Compile Remove="Internal\JT808QueueGatewayBuilderDefault.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="System.IO.Pipelines" Version="5.0.1" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<PackageReference Include="System.IO.Pipelines" Version="6.0.0" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\JT808.Gateway.Abstractions\JT808.Gateway.Abstractions.csproj" /> | |||
</ItemGroup> | |||
@@ -81,7 +81,7 @@ | |||
</member> | |||
<member name="M:JT808.Gateway.Handlers.JT808MsgIdDefaultWebApiHandler.QueryBlacklist(System.String)"> | |||
<summary> | |||
移除sim卡黑名单 | |||
查询sim卡黑名单 | |||
</summary> | |||
<param name="json"></param> | |||
<returns></returns> | |||
@@ -64,7 +64,7 @@ namespace JT808.Gateway | |||
Logger.LogWarning(ex, $"{ex.Message}:使用cmd命令[netsh http add urlacl url=http://*:{Configuration.WebApiPort}/ user=Everyone]"); | |||
} | |||
Logger.LogInformation($"JT808 Http Server start at {IPAddress.Any}:{Configuration.WebApiPort}."); | |||
Task.Factory.StartNew(async () => | |||
Task.Run(async () => | |||
{ | |||
while (listener.IsListening) | |||
{ | |||
@@ -95,7 +95,7 @@ namespace JT808.Gateway | |||
public Task StartAsync(CancellationToken cancellationToken) | |||
{ | |||
Logger.LogInformation($"JT808 TCP Server start at {IPAddress.Any}:{ConfigurationMonitor.CurrentValue.TcpPort}."); | |||
Task.Factory.StartNew(async () => | |||
Task.Run(async () => | |||
{ | |||
while (!cancellationToken.IsCancellationRequested) | |||
{ | |||
@@ -80,12 +80,10 @@ namespace JT808.Gateway | |||
{ | |||
Logger.LogError(ex, "Receive MessageFrom Async"); | |||
} | |||
#pragma warning disable CA1031 // Do not catch general exception types | |||
catch (Exception ex) | |||
{ | |||
Logger.LogError(ex, $"Received Bytes"); | |||
} | |||
#pragma warning restore CA1031 // Do not catch general exception types | |||
finally | |||
{ | |||
ArrayPool<byte>.Shared.Return(buffer); | |||
@@ -261,14 +261,24 @@ namespace JT808.Gateway.Session | |||
} | |||
} | |||
public List<JT808TcpSession> GetTcpAll() | |||
public List<JT808TcpSession> GetTcpAll(Func<IJT808Session, bool> predicate=null) | |||
{ | |||
return TerminalPhoneNoSessions.Where(w => w.Value.TransportProtocolType == JT808TransportProtocolType.tcp).Select(s => (JT808TcpSession)s.Value).ToList(); | |||
var query = TerminalPhoneNoSessions.Where(w => w.Value.TransportProtocolType == JT808TransportProtocolType.tcp); | |||
if (predicate != null) | |||
{ | |||
query = query.Where(s => predicate(s.Value)); | |||
} | |||
return query.Select(s => (JT808TcpSession)s.Value).ToList(); | |||
} | |||
public List<JT808UdpSession> GetUdpAll() | |||
public List<JT808UdpSession> GetUdpAll(Func<IJT808Session, bool> predicate = null) | |||
{ | |||
return TerminalPhoneNoSessions.Where(w => w.Value.TransportProtocolType == JT808TransportProtocolType.udp).Select(s => (JT808UdpSession)s.Value).ToList(); | |||
var query = TerminalPhoneNoSessions.Where(w => w.Value.TransportProtocolType == JT808TransportProtocolType.udp); | |||
if (predicate != null) | |||
{ | |||
query = query.Where(s => predicate(s.Value)); | |||
} | |||
return query.Select(s => (JT808UdpSession)s.Value).ToList(); | |||
} | |||
} | |||
} |
@@ -1,6 +1,6 @@ | |||
<Project> | |||
<PropertyGroup> | |||
<JT808DotNettyPackageVersion>2.3.6</JT808DotNettyPackageVersion> | |||
<JT808GatewayPackageVersion>1.1.4</JT808GatewayPackageVersion> | |||
<JT808GatewayPackageVersion>1.1.5-preview1</JT808GatewayPackageVersion> | |||
</PropertyGroup> | |||
</Project> |