@@ -72,7 +72,6 @@ | |||||
| LastActiveTime| DateTime| 最后上线时间| | | LastActiveTime| DateTime| 最后上线时间| | ||||
| StartTime| DateTime| 上线时间| | | StartTime| DateTime| 上线时间| | ||||
| TerminalPhoneNo|string| 终端手机号| | | TerminalPhoneNo|string| 终端手机号| | ||||
| LoaclAddressIP| string| 本地ip地址| | |||||
| WebApiPort| string| WebApi端口号| | | WebApiPort| string| WebApi端口号| | ||||
| RemoteAddressIP| string| 远程ip地址| | | RemoteAddressIP| string| 远程ip地址| | ||||
@@ -100,7 +99,6 @@ | |||||
"LastActiveTime":"2018-11-27 20:00:00", | "LastActiveTime":"2018-11-27 20:00:00", | ||||
"StartTime":"2018-11-25 20:00:00", | "StartTime":"2018-11-25 20:00:00", | ||||
"TerminalPhoneNo":"123456789012", | "TerminalPhoneNo":"123456789012", | ||||
"LoaclAddressIP":"127.0.0.1:808", | |||||
"WebApiPort":828, | "WebApiPort":828, | ||||
"RemoteAddressIP":"127.0.0.1:11808" | "RemoteAddressIP":"127.0.0.1:11808" | ||||
},{ | },{ | ||||
@@ -108,7 +106,6 @@ | |||||
"LastActiveTime":"2018-11-27 20:00:00", | "LastActiveTime":"2018-11-27 20:00:00", | ||||
"StartTime":"2018-11-25 20:00:00", | "StartTime":"2018-11-25 20:00:00", | ||||
"TerminalPhoneNo":"123456789013", | "TerminalPhoneNo":"123456789013", | ||||
"LoaclAddressIP":"127.0.0.1:808", | |||||
"WebApiPort":828, | "WebApiPort":828, | ||||
"RemoteAddressIP":"127.0.0.1:11808" | "RemoteAddressIP":"127.0.0.1:11808" | ||||
} | } | ||||
@@ -1,10 +1,14 @@ | |||||
| | ||||
Microsoft Visual Studio Solution File, Format Version 12.00 | Microsoft Visual Studio Solution File, Format Version 12.00 | ||||
# Visual Studio 15 | # Visual Studio 15 | ||||
VisualStudioVersion = 15.0.28010.2050 | |||||
VisualStudioVersion = 15.0.28307.168 | |||||
MinimumVisualStudioVersion = 10.0.40219.1 | MinimumVisualStudioVersion = 10.0.40219.1 | ||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.Dashbord", "JT808.DotNetty.Dashbord\JT808.DotNetty.Dashbord.csproj", "{3A9698C3-CEBB-4C93-A40C-3F7FE650217C}" | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.DotNetty.Dashbord", "JT808.DotNetty.Dashbord\JT808.DotNetty.Dashbord.csproj", "{3A9698C3-CEBB-4C93-A40C-3F7FE650217C}" | ||||
EndProject | EndProject | ||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0D20F469-7269-4D64-A3C6-BE08700EEDEB}" | |||||
EndProject | |||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JT808.Protocol", "JT808.Protocol\src\JT808.Protocol\JT808.Protocol.csproj", "{2F2FF360-A037-4C73-AF42-D252F1B86BD6}" | |||||
EndProject | |||||
Global | Global | ||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||||
Debug|Any CPU = Debug|Any CPU | Debug|Any CPU = Debug|Any CPU | ||||
@@ -15,10 +19,17 @@ Global | |||||
{3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Debug|Any CPU.Build.0 = Debug|Any CPU | {3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||||
{3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Release|Any CPU.ActiveCfg = Release|Any CPU | {3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||||
{3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Release|Any CPU.Build.0 = Release|Any CPU | {3A9698C3-CEBB-4C93-A40C-3F7FE650217C}.Release|Any CPU.Build.0 = Release|Any CPU | ||||
{2F2FF360-A037-4C73-AF42-D252F1B86BD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |||||
{2F2FF360-A037-4C73-AF42-D252F1B86BD6}.Debug|Any CPU.Build.0 = Debug|Any CPU | |||||
{2F2FF360-A037-4C73-AF42-D252F1B86BD6}.Release|Any CPU.ActiveCfg = Release|Any CPU | |||||
{2F2FF360-A037-4C73-AF42-D252F1B86BD6}.Release|Any CPU.Build.0 = Release|Any CPU | |||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(SolutionProperties) = preSolution | GlobalSection(SolutionProperties) = preSolution | ||||
HideSolutionNode = FALSE | HideSolutionNode = FALSE | ||||
EndGlobalSection | EndGlobalSection | ||||
GlobalSection(NestedProjects) = preSolution | |||||
{2F2FF360-A037-4C73-AF42-D252F1B86BD6} = {0D20F469-7269-4D64-A3C6-BE08700EEDEB} | |||||
EndGlobalSection | |||||
GlobalSection(ExtensibilityGlobals) = postSolution | GlobalSection(ExtensibilityGlobals) = postSolution | ||||
SolutionGuid = {0DDBE27F-708F-46DC-837F-BEF34A50A0B1} | SolutionGuid = {0DDBE27F-708F-46DC-837F-BEF34A50A0B1} | ||||
EndGlobalSection | EndGlobalSection | ||||
@@ -0,0 +1,29 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using JT808.DotNetty.Dtos; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
namespace JT808.DotNetty.Dashbord.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 计数器管理 | |||||
/// </summary> | |||||
[Route("jt808webapi/AtomicCounter")] | |||||
[ApiController] | |||||
public class JT808AtomicCounterController : ControllerBase | |||||
{ | |||||
/// <summary> | |||||
/// 获取包计算器 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public ActionResult<JT808AtomicCounterDto> GetAtomicCounter() | |||||
{ | |||||
return new JT808AtomicCounterDto { | |||||
MsgSuccessCount=100000, | |||||
MsgFailCount=0 | |||||
}; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,67 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using JT808.DotNetty.Dtos; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
namespace JT808.DotNetty.Dashbord.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 会话管理 | |||||
/// </summary> | |||||
[Route("jt808webapi/Session")] | |||||
[ApiController] | |||||
public class JT808SessionController : ControllerBase | |||||
{ | |||||
/// <summary> | |||||
/// 通过终端设备号删除会话 | |||||
/// </summary> | |||||
/// <param name="terminalPhoneNo"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult<bool> RemoveByTerminalPhoneNo(string terminalPhoneNo) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 通过通道Id删除会话 | |||||
/// </summary> | |||||
/// <param name="channelId"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult<bool> RemoveByChannelId(string channelId) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 获取会话集合 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult<List<JT808SessionInfoDto>> GetAll() | |||||
{ | |||||
return new List<JT808SessionInfoDto>() { | |||||
new JT808SessionInfoDto { | |||||
ChannelId="0x00x0", | |||||
LastActiveTime=DateTime.Now, | |||||
RemoteAddressIP="127.0.0.1:559", | |||||
TerminalPhoneNo="123456789012", | |||||
StartTime=DateTime.Now, | |||||
WebApiPort=8091 | |||||
}, | |||||
new JT808SessionInfoDto { | |||||
ChannelId="0x00x1", | |||||
LastActiveTime=DateTime.Now, | |||||
RemoteAddressIP="127.0.0.1:558", | |||||
TerminalPhoneNo="123456789013", | |||||
StartTime=DateTime.Now, | |||||
WebApiPort=8092 | |||||
} | |||||
}; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,63 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using JT808.DotNetty.Dtos; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
namespace JT808.DotNetty.Dashbord.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 原包管理 | |||||
/// </summary> | |||||
[Route("jt808webapi/SourcePackage")] | |||||
[ApiController] | |||||
public class JT808SourcePackageController : ControllerBase | |||||
{ | |||||
/// <summary> | |||||
/// 添加地址 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
public ActionResult<bool> Add([FromBody]JT808IPAddressDto jT808IPAddressDto) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 删除地址 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
public ActionResult<bool> Remove([FromBody]JT808IPAddressDto jT808IPAddressDto) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 删除地址 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult<List<JT808SourcePackageChannelInfoDto>> GetAll() | |||||
{ | |||||
return new List<JT808SourcePackageChannelInfoDto>() { | |||||
new JT808SourcePackageChannelInfoDto { | |||||
Active=true, | |||||
Open=true, | |||||
Registered=true, | |||||
RemoteAddress="127.0.0.1:56" | |||||
}, | |||||
new JT808SourcePackageChannelInfoDto { | |||||
Active=true, | |||||
Open=true, | |||||
Registered=true, | |||||
RemoteAddress="127.0.0.1:57" | |||||
} | |||||
}; | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,50 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using JT808.DotNetty.Dtos; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
namespace JT808.DotNetty.Dashbord.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 转发管理 | |||||
/// </summary> | |||||
[Route("jt808webapi/Transmit")] | |||||
[ApiController] | |||||
public class JT808TransmitController : ControllerBase | |||||
{ | |||||
/// <summary> | |||||
/// 添加地址 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
public ActionResult<bool> Add([FromBody]JT808IPAddressDto jT808IPAddressDto) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 删除地址 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
public ActionResult<bool> Remove([FromBody]JT808IPAddressDto jT808IPAddressDto) | |||||
{ | |||||
return true; | |||||
} | |||||
/// <summary> | |||||
/// 获取转发IP地址集合 | |||||
/// </summary> | |||||
/// <param name="jT808IPAddressDto"></param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult<List<string>> GetAll() | |||||
{ | |||||
return new List<string>() { "127.0.0.1:80", "127.0.0.1:81" }; | |||||
} | |||||
} | |||||
} |
@@ -13,36 +13,17 @@ namespace JT808.DotNetty.Dashbord.Controllers | |||||
[ApiController] | [ApiController] | ||||
public class JT808UnificationSendController : ControllerBase | public class JT808UnificationSendController : ControllerBase | ||||
{ | { | ||||
// GET api/values | |||||
[HttpGet] | |||||
public ActionResult<IEnumerable<string>> Get() | |||||
{ | |||||
return new string[] { "value1", "value2" }; | |||||
} | |||||
// GET api/values/5 | |||||
[HttpGet("{id}")] | |||||
public ActionResult<string> Get(int id) | |||||
/// <summary> | |||||
/// 文本信息下发 | |||||
/// </summary> | |||||
/// <param name="terminalPhoneNo">终端设备号</param> | |||||
/// <param name="text">下发文本信息</param> | |||||
/// <returns></returns> | |||||
[HttpGet("{terminalPhoneNo}/{text}")] | |||||
public ActionResult<string> SendText(string terminalPhoneNo, string text) | |||||
{ | { | ||||
return "value"; | return "value"; | ||||
} | } | ||||
// POST api/values | |||||
[HttpPost] | |||||
public void Post([FromBody] string value) | |||||
{ | |||||
} | |||||
// PUT api/values/5 | |||||
[HttpPut("{id}")] | |||||
public void Put(int id, [FromBody] string value) | |||||
{ | |||||
} | |||||
// DELETE api/values/5 | |||||
[HttpDelete("{id}")] | |||||
public void Delete(int id) | |||||
{ | |||||
} | |||||
} | } | ||||
} | } |
@@ -0,0 +1,21 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | |||||
/// <summary> | |||||
/// 包计数器服务 | |||||
/// </summary> | |||||
public class JT808AtomicCounterDto | |||||
{ | |||||
/// <summary> | |||||
/// 成功数 | |||||
/// </summary> | |||||
public long MsgSuccessCount { get; set; } | |||||
/// <summary> | |||||
/// 失败数 | |||||
/// </summary> | |||||
public long MsgFailCount { get; set; } | |||||
} | |||||
} |
@@ -0,0 +1,35 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Net; | |||||
using System.Text; | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | |||||
public class JT808IPAddressDto | |||||
{ | |||||
public string Host { get; set; } | |||||
public int Port { get; set; } | |||||
private EndPoint endPoint; | |||||
public EndPoint EndPoint | |||||
{ | |||||
get | |||||
{ | |||||
if (endPoint == null) | |||||
{ | |||||
if (IPAddress.TryParse(Host, out IPAddress ip)) | |||||
{ | |||||
endPoint = new IPEndPoint(ip, Port); | |||||
} | |||||
else | |||||
{ | |||||
endPoint = new DnsEndPoint(Host, Port); | |||||
} | |||||
} | |||||
return endPoint; | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -2,7 +2,7 @@ | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT808.DotNetty.Dashbord.Dtos | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | { | ||||
public class JT808ResultDto<T> | public class JT808ResultDto<T> | ||||
{ | { | ||||
@@ -12,4 +12,12 @@ namespace JT808.DotNetty.Dashbord.Dtos | |||||
public T Data { get; set; } | public T Data { get; set; } | ||||
} | } | ||||
internal class JT808ResultCode | |||||
{ | |||||
public const int Ok = 200; | |||||
public const int Empty = 201; | |||||
public const int NotFound = 404; | |||||
public const int Error = 500; | |||||
} | |||||
} | } |
@@ -2,7 +2,7 @@ | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT808.DotNetty.Dashbord.Dtos | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | { | ||||
public class JT808SessionInfoDto | public class JT808SessionInfoDto | ||||
{ | { | ||||
@@ -23,10 +23,6 @@ namespace JT808.DotNetty.Dashbord.Dtos | |||||
/// </summary> | /// </summary> | ||||
public string TerminalPhoneNo { get; set; } | public string TerminalPhoneNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 本地ip地址 | |||||
/// </summary> | |||||
public string LoaclAddressIP { get; set; } | |||||
/// <summary> | |||||
/// WebApi端口号 | /// WebApi端口号 | ||||
/// </summary> | /// </summary> | ||||
public int WebApiPort { get; set; } | public int WebApiPort { get; set; } | ||||
@@ -0,0 +1,29 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Text; | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | |||||
/// <summary> | |||||
/// 原包通道信息 | |||||
/// </summary> | |||||
public class JT808SourcePackageChannelInfoDto | |||||
{ | |||||
/// <summary> | |||||
/// 远程地址 | |||||
/// </summary> | |||||
public string RemoteAddress { get; set; } | |||||
/// <summary> | |||||
/// 是否注册 | |||||
/// </summary> | |||||
public bool Registered { get; set; } | |||||
/// <summary> | |||||
/// 是否活动 | |||||
/// </summary> | |||||
public bool Active { get; set; } | |||||
/// <summary> | |||||
/// 是否打开 | |||||
/// </summary> | |||||
public bool Open { get; set; } | |||||
} | |||||
} |
@@ -2,7 +2,7 @@ | |||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Text; | using System.Text; | ||||
namespace JT808.DotNetty.Dashbord.Dtos | |||||
namespace JT808.DotNetty.Dtos | |||||
{ | { | ||||
/// <summary> | /// <summary> | ||||
/// 统一下发请求参数 | /// 统一下发请求参数 | ||||
@@ -0,0 +1,36 @@ | |||||
using JT808.DotNetty.Dtos; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using WebApiClient; | |||||
using WebApiClient.Attributes; | |||||
namespace JT808.DotNetty.Dashbord.Internal | |||||
{ | |||||
public interface IJT808DotNettyWebApi : IHttpApi | |||||
{ | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> UnificationSend([Uri]string uri, [FormContent]JT808UnificationSendRequestDto jT808UnificationSendRequestDto); | |||||
[HttpGet] | |||||
ITask<JT808ResultDto<List<JT808SessionInfoDto>>> SessionGetAll([Uri]string uri); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> SessionRemoveByChannelId([Uri]string uri,[FormContent]string channelId); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> SessionRemoveByTerminalPhoneNo([Uri]string uri, [FormContent]string terminalPhoneNo); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> SourcePackageAdd([Uri]string uri, [FormContent]JT808IPAddressDto jT808IPAddressDto); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> SourcePackageRemove([Uri]string uri, [FormContent]JT808IPAddressDto jT808IPAddressDto); | |||||
[HttpGet] | |||||
ITask<JT808ResultDto<List<JT808SourcePackageChannelInfoDto>>> SourcePackageGetAll([Uri]string uri); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> TransmitAdd([Uri]string uri, [FormContent]JT808IPAddressDto jT808IPAddressDto); | |||||
[HttpPost] | |||||
ITask<JT808ResultDto<bool>> TransmitRemove([Uri]string uri, [FormContent]JT808IPAddressDto jT808IPAddressDto); | |||||
[HttpGet] | |||||
ITask<JT808ResultDto<List<string>>> TransmitGetAll([Uri]string uri); | |||||
[HttpGet] | |||||
ITask<JT808ResultDto<JT808AtomicCounterDto>> GetAtomicCounter([Uri]string uri); | |||||
} | |||||
} |
@@ -1,7 +1,7 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk.Web"> | <Project Sdk="Microsoft.NET.Sdk.Web"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFramework>netcoreapp2.1</TargetFramework> | |||||
<TargetFramework>netcoreapp2.2</TargetFramework> | |||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -10,7 +10,8 @@ | |||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.AspNetCore.App" /> | <PackageReference Include="Microsoft.AspNetCore.App" /> | ||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.1.2" PrivateAssets="All" /> | |||||
<PackageReference Include="Microsoft.AspNetCore.Razor.Design" Version="2.2.0" PrivateAssets="All" /> | |||||
<PackageReference Include="WebApiClient.JIT" Version="0.2.9" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
</Project> | </Project> |
@@ -24,7 +24,7 @@ namespace JT808.DotNetty.Dashbord | |||||
// This method gets called by the runtime. Use this method to add services to the container. | // This method gets called by the runtime. Use this method to add services to the container. | ||||
public void ConfigureServices(IServiceCollection services) | public void ConfigureServices(IServiceCollection services) | ||||
{ | { | ||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1); | |||||
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2); | |||||
} | } | ||||
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. | ||||
@@ -2,16 +2,16 @@ | |||||
<PropertyGroup> | <PropertyGroup> | ||||
<OutputType>Exe</OutputType> | <OutputType>Exe</OutputType> | ||||
<TargetFramework>netcoreapp2.1</TargetFramework> | |||||
<TargetFramework>netcoreapp2.2</TargetFramework> | |||||
<ServerGarbageCollection>true</ServerGarbageCollection> | <ServerGarbageCollection>true</ServerGarbageCollection> | ||||
<LangVersion>latest</LangVersion> | <LangVersion>latest</LangVersion> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="2.2.0" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -1,18 +1,21 @@ | |||||
<Project Sdk="Microsoft.NET.Sdk"> | <Project Sdk="Microsoft.NET.Sdk"> | ||||
<PropertyGroup> | <PropertyGroup> | ||||
<TargetFramework>netcoreapp2.1</TargetFramework> | |||||
<TargetFramework>netcoreapp2.2</TargetFramework> | |||||
<IsPackable>false</IsPackable> | <IsPackable>false</IsPackable> | ||||
</PropertyGroup> | </PropertyGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.8.0" /> | |||||
<PackageReference Include="xunit" Version="2.3.1" /> | |||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" /> | |||||
<PackageReference Include="xunit" Version="2.4.1" /> | |||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1"> | |||||
<PrivateAssets>all</PrivateAssets> | |||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | |||||
</PackageReference> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
@@ -23,10 +23,6 @@ namespace JT808.DotNetty.Dtos | |||||
/// </summary> | /// </summary> | ||||
public string TerminalPhoneNo { get; set; } | public string TerminalPhoneNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 本地ip地址 | |||||
/// </summary> | |||||
public string LoaclAddressIP { get; set; } | |||||
/// <summary> | |||||
/// WebApi端口号 | /// WebApi端口号 | ||||
/// </summary> | /// </summary> | ||||
public int WebApiPort { get; set; } | public int WebApiPort { get; set; } | ||||
@@ -36,7 +36,6 @@ namespace JT808.DotNetty.Internal | |||||
StartTime = s.StartTime, | StartTime = s.StartTime, | ||||
TerminalPhoneNo = s.TerminalPhoneNo, | TerminalPhoneNo = s.TerminalPhoneNo, | ||||
WebApiPort = jT808Configuration.WebApiPort, | WebApiPort = jT808Configuration.WebApiPort, | ||||
LoaclAddressIP = s.Channel.LocalAddress.ToString(), | |||||
RemoteAddressIP = s.Channel.RemoteAddress.ToString(), | RemoteAddressIP = s.Channel.RemoteAddress.ToString(), | ||||
}).ToList(); | }).ToList(); | ||||
resultDto.Code = JT808ResultCode.Ok; | resultDto.Code = JT808ResultCode.Ok; | ||||
@@ -30,11 +30,11 @@ | |||||
<PackageReference Include="DotNetty.Codecs.Http" Version="0.6.0" /> | <PackageReference Include="DotNetty.Codecs.Http" Version="0.6.0" /> | ||||
<PackageReference Include="DotNetty.Handlers" Version="0.6.0" /> | <PackageReference Include="DotNetty.Handlers" Version="0.6.0" /> | ||||
<PackageReference Include="DotNetty.Transport.Libuv" Version="0.6.0" /> | <PackageReference Include="DotNetty.Transport.Libuv" Version="0.6.0" /> | ||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Options" Version="2.1.1" /> | |||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.1.1" /> | |||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> | |||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Options" Version="2.2.0" /> | |||||
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="2.2.0" /> | |||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" /> | |||||
<PackageReference Include="Polly" Version="6.1.2" /> | <PackageReference Include="Polly" Version="6.1.2" /> | ||||
</ItemGroup> | </ItemGroup> | ||||