更新项目配置,新增设备同步模块,优化WebSocket和Swagger配置,增强SCADA系统的免登录接口,支持数据字典项和登录日志的免登录查询与记录。调整Java编译设置,确保更好的开发体验。

This commit is contained in:
geht
2026-04-28 10:23:58 +08:00
parent bbe46dcf2d
commit 142a0bdaba
1013 changed files with 41858 additions and 28 deletions

View File

@@ -0,0 +1,49 @@
using System.IO;
using System.Text.Json;
namespace YY.Admin.Services.Service.Jeecg
{
/// <summary>
/// 读写本地 Jeecg 同步状态文件(与 appsettings 同目录下的 Configuration
/// </summary>
public class JeecgSyncStateStore
{
private readonly string _filePath;
public JeecgSyncStateStore()
{
var dir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Configuration");
_filePath = Path.Combine(dir, "jeecg-sync-state.json");
}
public JeecgSyncState Load()
{
try
{
if (!File.Exists(_filePath))
{
return new JeecgSyncState();
}
var json = File.ReadAllText(_filePath);
return JsonSerializer.Deserialize<JeecgSyncState>(json) ?? new JeecgSyncState();
}
catch
{
return new JeecgSyncState();
}
}
public void Save(JeecgSyncState state)
{
var dir = Path.GetDirectoryName(_filePath);
if (!string.IsNullOrEmpty(dir))
{
Directory.CreateDirectory(dir);
}
var json = JsonSerializer.Serialize(state, new JsonSerializerOptions { WriteIndented = true });
File.WriteAllText(_filePath, json);
}
}
}