29 lines
776 B
C#
29 lines
776 B
C#
using AI.Common.Dtos;
|
|
using AI.Common.Entities;
|
|
using AI.Common.Services.Interface;
|
|
using Mapster;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace AI.Api.Controllers
|
|
{
|
|
[Route("[controller]")]
|
|
public class QuestLogController : BaseController
|
|
{
|
|
private readonly IQuestionLogService _questionLogService;
|
|
|
|
public QuestLogController(IQuestionLogService questionLogService)
|
|
{
|
|
this._questionLogService = questionLogService;
|
|
}
|
|
|
|
[HttpGet("record")]
|
|
public async Task<long> RecordAsync([FromBody] QuestionLogDto questionLogDto)
|
|
{
|
|
var entity = questionLogDto.Adapt<QuestionLog>();
|
|
entity.Uid = UId;
|
|
|
|
return await _questionLogService.RecordAsync(entity);
|
|
}
|
|
}
|
|
}
|