Files
jinko.yikatong/Src/Dlhis.Basic/Organization/Services/Implements/WerkService.cs
2024-01-10 16:23:20 +08:00

35 lines
995 B
C#

/*using Dlhis.Basic.Organization.Response;
using Dlhis.Entity.Basic.Entity;
using Kurisu.Core.User.Abstractions;
using Kurisu.SqlSugar.Services;
namespace Dlhis.Basic.Organization.Services.Implements;
public class WerkService : IWerkService
{
private readonly IDbContext _dbContext;
private readonly ICurrentUser _currentUser;
public WerkService(IDbContext dbContext, ICurrentUser currentUser)
{
_dbContext = dbContext;
_currentUser = currentUser;
}
public async Task<List<WerkResponse>> GetListAsync()
{
return await _dbContext.Queryable<WerkEntity>()
.Select<WerkResponse>()
.ToListAsync();
}
public async Task<WerkResponse> GetCurrentAsync()
{
var tenant = _currentUser.GetStringTenantId();
return await _dbContext.Queryable<WerkEntity>()
.Where(x => x.Code == tenant)
.Select<WerkResponse>()
.FirstAsync();
}
}
*/