重构服务类和仓库类

This commit is contained in:
2025-07-19 22:29:50 +08:00
parent 5cf25dd9ac
commit 7faac9aef1
25 changed files with 324 additions and 502 deletions

View File

@@ -2,21 +2,18 @@ using DMS.Core.Models;
using DMS.Core.Enums;
using System.Collections.Generic;
using System.Threading.Tasks;
using DMS.Infrastructure.Entities;
namespace DMS.Infrastructure.Interfaces
{
public interface IMenuRepository
{
Task<int> DeleteAsync(MenuBean menu);
Task<int> DeleteAsync(MenuBean menu, ITransaction db);
Task<List<MenuBean>> GetMenuTreesAsync();
Task<int> AddAsync(MenuBean menu);
Task<int> AddAsync(MenuBean menu, ITransaction db);
Task<int> AddVarTableMenuAsync(Device dbDevice, int parentMenuId, ITransaction db);
Task<int> AddAsync(Device device, ITransaction db);
Task<int> UpdateAsync(MenuBean menu);
Task<MenuBean?> GetMenuByDataIdAsync(int dataId, MenuType menuType);
Task<MenuBean> GetMainMenuByNameAsync(string name);
Task<int> DeleteAsync(DbMenu menu);
Task<List<DbMenu>> GetMenuTreesAsync();
Task<DbMenu> AddAsync(DbMenu menu);
Task<int> UpdateAsync(DbMenu menu);
Task BeginTranAsync();
Task CommitTranAsync();
Task RollbackTranAsync();
}
}