...
This commit is contained in:
@@ -32,7 +32,7 @@ namespace Hushian.Application.Services
|
||||
var entity = new AIA
|
||||
{
|
||||
CompanyID = dto.companyId,
|
||||
UserID = dto.userId,
|
||||
aiKeyUser = dto.aiKeyUser,
|
||||
Request = dto.requestText,
|
||||
Response = responeai,
|
||||
Cdatetime = DateTime.Now
|
||||
@@ -50,11 +50,11 @@ namespace Hushian.Application.Services
|
||||
return response;
|
||||
}
|
||||
|
||||
public async Task<List<aiResponseDto>> GetCurrent(int companyId, int userId)
|
||||
public async Task<List<aiResponseDto>> GetCurrent(int companyId, string aiKeyUser)
|
||||
{
|
||||
return await _aiaRepository
|
||||
.Get()
|
||||
.Where(w => w.CompanyID == companyId && w.UserID == userId && w.Cdatetime.AddHours(3) >= DateTime.Now)
|
||||
.Where(w => w.CompanyID == companyId && w.aiKeyUser == aiKeyUser && w.Cdatetime.AddHours(3) >= DateTime.Now)
|
||||
.OrderBy(o => o.ID)
|
||||
.Select(s=>new aiResponseDto() { responseText = s.Response, requestText = s.Request,dateTime=s.Cdatetime})
|
||||
.ToListAsync();
|
||||
|
Reference in New Issue
Block a user