2025-06-24 08:55:34 +08:00
|
|
|
|
using LinqToDB;
|
|
|
|
|
using MasaBlazorApp3.DataAccess.Dao;
|
|
|
|
|
using MasaBlazorApp3.Pojo;
|
|
|
|
|
using MasaBlazorApp3.Pojo.Config;
|
|
|
|
|
using MasaBlazorApp3.Port;
|
|
|
|
|
using Microsoft.Extensions.Options;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Data.Common;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
2025-08-11 14:58:39 +08:00
|
|
|
|
using System.Text.RegularExpressions;
|
2025-06-24 08:55:34 +08:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace MasaBlazorApp3.DataAccess.Impl
|
|
|
|
|
{
|
|
|
|
|
public class SettingManuDao : ISettingManuDao
|
|
|
|
|
{
|
|
|
|
|
private AppDataConnection _connection;
|
|
|
|
|
private readonly SettingConfig _setting;
|
|
|
|
|
private GlobalStateService _globalStateService;
|
|
|
|
|
public SettingManuDao(AppDataConnection connection, IOptions<SettingConfig> setting, GlobalStateService globalStateService, PortUtil portUtil)
|
|
|
|
|
{
|
|
|
|
|
_globalStateService = globalStateService;
|
|
|
|
|
_connection = connection;
|
|
|
|
|
_setting = setting.Value;
|
|
|
|
|
}
|
2025-08-11 14:58:39 +08:00
|
|
|
|
public async Task<List<SettingManu>> GetMenuItemsAsync(string culture)
|
2025-06-24 08:55:34 +08:00
|
|
|
|
{
|
2025-08-11 14:58:39 +08:00
|
|
|
|
var query = _connection.SettingManu.AsQueryable().Where(it=>it.Culture==culture);
|
2025-06-24 08:55:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await query
|
|
|
|
|
.OrderBy((sm) => sm.Id)
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|