修改获取公告接口
This commit is contained in:
parent
dfb75d795b
commit
032941a018
|
|
@ -13,14 +13,17 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
using CoreCms.Net.Auth.HttpContextUser;
|
using CoreCms.Net.Auth.HttpContextUser;
|
||||||
using CoreCms.Net.Configuration;
|
using CoreCms.Net.Configuration;
|
||||||
using CoreCms.Net.IServices;
|
using CoreCms.Net.IServices;
|
||||||
using CoreCms.Net.Model.FromBody;
|
using CoreCms.Net.Model.FromBody;
|
||||||
using CoreCms.Net.Model.ViewModels.UI;
|
using CoreCms.Net.Model.ViewModels.UI;
|
||||||
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
|
||||||
namespace CoreCms.Net.Web.WebApi.Controllers
|
namespace CoreCms.Net.Web.WebApi.Controllers
|
||||||
|
|
@ -73,14 +76,18 @@ namespace CoreCms.Net.Web.WebApi.Controllers
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取单个公告内容
|
/// 获取单个公告内容
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="entity"></param>
|
/// <param name="id"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpGet]
|
||||||
public async Task<WebApiCallBack> NoticeInfo([FromBody] FMIntId entity)
|
public async Task<WebApiCallBack> NoticeInfo([FromQuery] int id)
|
||||||
{
|
{
|
||||||
|
if (id == 0)
|
||||||
|
{
|
||||||
|
throw new ArgumentNullException("id");
|
||||||
|
}
|
||||||
var jm = new WebApiCallBack();
|
var jm = new WebApiCallBack();
|
||||||
|
|
||||||
var model = await _noticeServices.QueryByIdAsync(entity.id);
|
var model = await _noticeServices.QueryByIdAsync(id);
|
||||||
if (model == null)
|
if (model == null)
|
||||||
{
|
{
|
||||||
jm.msg = "数据获取失败";
|
jm.msg = "数据获取失败";
|
||||||
|
|
|
||||||
|
|
@ -463,7 +463,7 @@
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:CoreCms.Net.Web.WebApi.Controllers.NoticeController.NoticeInfo(CoreCms.Net.Model.FromBody.FMIntId)">
|
<member name="M:CoreCms.Net.Web.WebApi.Controllers.NoticeController.NoticeInfo(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
获取单个公告内容
|
获取单个公告内容
|
||||||
</summary>
|
</summary>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user