实现获取启动器最新版本接口
This commit is contained in:
parent
937eca3566
commit
2231fec71d
|
@ -4,7 +4,7 @@
|
|||
<ActiveDebugProfile>CompetitionAPI</ActiveDebugProfile>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
<NameOfLastUsedPublishProfile>F:\项目\禄口机场农电竞赛\web\LKJCpowerSupplyOfficeSimulationSystem\CompetitionAPI\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\Properties\PublishProfiles\FolderProfile1.pubxml</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Competition.Common.Util;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace CompetitionAPI.Controllers.version
|
||||
|
@ -7,5 +8,29 @@ namespace CompetitionAPI.Controllers.version
|
|||
[ApiController]
|
||||
public class GetLastVersionController : Controller
|
||||
{
|
||||
Competition.Mysql.BLL.v_starter_version bll = new Competition.Mysql.BLL.v_starter_version();
|
||||
|
||||
public GetLastVersionController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取启动器最新版本接口
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public JsonResult GetLatestVersion()
|
||||
{
|
||||
var model = bll.GetModelList("").FirstOrDefault();
|
||||
if (model != null)
|
||||
{
|
||||
return Json(Tool.GetJsonWithCode(APICode.Success, new { VersionNumber = model.VersionNumber, UpdateResources = model.UpdateResources }));
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(Tool.GetJsonWithCode(APICode.Success, model));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<PublishProvider>FileSystem</PublishProvider>
|
||||
<PublishUrl>bin\Release\net6.0\publish\</PublishUrl>
|
||||
<WebPublishMethod>FileSystem</WebPublishMethod>
|
||||
<_TargetId>Folder</_TargetId>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ProjectGuid>282944fe-ebe1-43de-8a19-ac2227eb0b49</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
</Project>
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<_PublishTargetUrl>F:\项目\福州海关散货系统\项目\FuZhou_Custom_BulkCargo_Server\CompetitionAPI\CompetitionAPI\CompetitionAPI\bin\Release\net6.0\publish\</_PublishTargetUrl>
|
||||
<History>False|2024-06-19T01:51:07.8834743Z;False|2024-06-19T09:50:19.8828059+08:00;False|2024-06-19T09:49:31.4782067+08:00;True|2024-06-19T09:48:29.2943012+08:00;False|2024-06-19T09:48:02.6516665+08:00;True|2024-06-19T09:47:33.8215337+08:00;True|2024-06-17T13:24:10.4995074+08:00;False|2024-06-17T13:21:44.7372628+08:00;False|2024-06-17T13:21:10.7509626+08:00;True|2024-06-17T09:13:25.9817638+08:00;True|2024-06-17T09:00:04.5016133+08:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
Loading…
Reference in New Issue