feat:添加大学记录
parent
cf45659d05
commit
976d0cae18
|
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using New_College.IServices;
|
using New_College.IServices;
|
||||||
|
|
@ -16,6 +17,7 @@ namespace New_College.Api.Controllers.Front
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/front/[controller]/[action]")]
|
[Route("api/front/[controller]/[action]")]
|
||||||
[ApiController]
|
[ApiController]
|
||||||
|
[Authorize]
|
||||||
public class MyHistoryInfoController : ControllerBase
|
public class MyHistoryInfoController : ControllerBase
|
||||||
{
|
{
|
||||||
private readonly ID_MyHistoryInfoServices _MyHistory;
|
private readonly ID_MyHistoryInfoServices _MyHistory;
|
||||||
|
|
@ -27,6 +29,28 @@ namespace New_College.Api.Controllers.Front
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加浏览记录
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="requestDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<MessageModel<bool>> Add([FromBody] MyHistoryRequestDto requestDto)
|
||||||
|
{
|
||||||
|
var res = new MessageModel<bool>();
|
||||||
|
///
|
||||||
|
var status = await _MyHistory.Add(new Model.Models.D_MyHistoryInfo()
|
||||||
|
{
|
||||||
|
CreateTime = DateTime.Now,
|
||||||
|
CustomerId = requestDto.CustomerId,
|
||||||
|
Type = 0,
|
||||||
|
UId = requestDto.UId,
|
||||||
|
});
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 浏览历史记录列表
|
/// 浏览历史记录列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -399,6 +399,13 @@
|
||||||
历史大学
|
历史大学
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:New_College.Api.Controllers.Front.MyHistoryInfoController.Add(New_College.Model.ViewModels.Result.MyHistoryRequestDto)">
|
||||||
|
<summary>
|
||||||
|
添加浏览记录
|
||||||
|
</summary>
|
||||||
|
<param name="requestDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:New_College.Api.Controllers.Front.MyHistoryInfoController.GetMyHistory(System.Int32)">
|
<member name="M:New_College.Api.Controllers.Front.MyHistoryInfoController.GetMyHistory(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
浏览历史记录列表
|
浏览历史记录列表
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,15 @@ using System.Text;
|
||||||
|
|
||||||
namespace New_College.Model.ViewModels.Result
|
namespace New_College.Model.ViewModels.Result
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
public class MyHistoryRequestDto
|
||||||
|
{
|
||||||
|
public int CustomerId { get; set; }
|
||||||
|
|
||||||
|
public int UId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class MyHistoryResponse
|
public class MyHistoryResponse
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue