2026-03-27 10:53:02 +08:00
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using YD_YiLu.Api.Services.Interface;
|
|
|
|
|
using YD_YiLu.Commons.Dto.DeviceSync;
|
|
|
|
|
|
|
|
|
|
namespace YD_YiLu.Api.Controllers
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设置接口
|
|
|
|
|
/// </summary>
|
|
|
|
|
[AllowAnonymous]
|
|
|
|
|
public class SettingController : ControllerBase
|
|
|
|
|
{
|
|
|
|
|
private readonly IDeviceSyncService _deviceSyncService;
|
|
|
|
|
|
|
|
|
|
public SettingController(IDeviceSyncService deviceSyncService)
|
|
|
|
|
{
|
|
|
|
|
_deviceSyncService = deviceSyncService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 拉取安装包新版本
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("/setting/verify/app")]
|
|
|
|
|
public async Task<object> AppVerify([FromBody] AppVerifyRequestDto dto)
|
|
|
|
|
{
|
|
|
|
|
return await _deviceSyncService.AppVerifyAsync(dto);
|
|
|
|
|
}
|
2026-04-13 10:11:41 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 新增app版本
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="dto"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost("app/version/add")]
|
|
|
|
|
public async Task<long> AddAppVersion([FromBody] AppVersionAddRequestDto dto)
|
|
|
|
|
{
|
|
|
|
|
return await _deviceSyncService.AppVersionAddAsync(dto);
|
|
|
|
|
}
|
2026-03-27 10:53:02 +08:00
|
|
|
}
|
|
|
|
|
}
|