25 lines
702 B
C#
25 lines
702 B
C#
using SqlSugar;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace YY.Admin.Services.Service.Role
|
|
{
|
|
public class SysRoleMenuService : ISysRoleMenuService, ISingletonDependency
|
|
{
|
|
private readonly ISqlSugarClient _dbContext;
|
|
public SysRoleMenuService(ISqlSugarClient context)
|
|
{
|
|
_dbContext = context;
|
|
}
|
|
public async Task<List<long>> GetRoleMenuIdList(List<long> roleIdList)
|
|
{
|
|
return await _dbContext.Queryable<SysRoleMenu>()
|
|
.Where(u => roleIdList.Contains(u.RoleId))
|
|
.Select(u => u.MenuId).ToListAsync();
|
|
}
|
|
}
|
|
}
|